A very specific issue - but I'm writing a module that allows multiple views access plugins to work on the same view - combining them with a logical operator. In the UI for a view the user can choose multiple access plugins and set their options in one form.

To help the UI I call each access plugins' summary_title() method before calling their options_form() method. Now, it appears that the role access plugin calls array_unshift($this->options['role']) during it's summary_title() method to grab the role selected. However this inadvertently wipes out that option for the rest of the lifetime of that instance of the plugin.

While I realise that it has never caused a problem before - essentially a call to an access plugin's summary_title() method has never been followed by a call to any other method on the plugin, it is causing a problem for my module. And the solution is so simple.

I've fixed the issue in all branches - I'll add a patch here shortly.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jamsilver’s picture

I know it seems insignificant, but it's quite annoying for http://drupal.org/project/views_access_many and it makes most sense for it to be corrected here.

jamsilver’s picture

Oops, didn't mean to add tags

jamsilver’s picture

Sorry! Those weren't rolled correctly. I've confirmed that these ones apply.

jamsilver’s picture

Status: Needs review » Active

probably a more appropriate starting status..

jamsilver’s picture

Status: Active » Needs review

OK, on reflection - please review my patch =)

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

They make sense.

dawehner’s picture

Status: Reviewed & tested by the community » Fixed

And commited to all three branches.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.