Needs review
Project:
Views PHP
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 May 2012 at 13:12 UTC
Updated:
8 Feb 2021 at 23:38 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
muschpusch commentedI had a quick look at the code and the problem seems to be that the php code is executed in hook_views_post_execute. At that moment current_page and items_per_page aren't populated and php is executed for every result. I added items_per_page and current_page and skip the php execution for all records which won't be shown to the user. I have no idea how this will affect views_php sorting because i didn't looked at the code for it. So please review wisely. It works nicely with exposed filters btw.
Comment #2
geerlingguy commentedThis would most likely mess with a Views PHP sort filter, because that filter would require every row to be loaded in order to work correctly. Note that I haven't tested it, but it seems like that would be the case...
Comment #3
liam morland