Closed (fixed)
Project:
Views PHP
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Dec 2011 at 12:09 UTC
Updated:
8 May 2014 at 09:56 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
marco.abiuso.questar commentedThis issue can be renamed as:
views_php_access only gives access to the first display, otherwise shows default display (if any of the displays has access).
The problem was due to the fact that the checks are done on the wrong display id, i.e. $this->view->current_display instead of $this->display->id ($this is the current view object).
At the view access checking stage, the current_display variable is always 'default', so, even if the checks are run on the correct display, only the default display results accessible (the display id serves only for naming a runtime generated access function containing the custom PHP)
I'm attaching a patch.
P.S. I had to dive into views module internal workings to get the solution: not a funny task, for a so small bug ;-)
Comment #2
liquidcms commentedperhaps a different issue; but as far as i can tell php access control does not work.
my simple function:
return false;
view is still visible.
Comment #3
turtletrail commentedconfirm the issue.
if view has multiple displays, it seems that the PHP access works only for the first display it is used one.
The rest of the displays are shown/hidden based on the same condition (from first PHP access definition).
Comment #4
turtletrail commentedby the way, views_php-access_fix-1381562.patch
worked for me
Comment #5
casey commented