I can't help it, each time I stumble on the pager's global variables, I have to closely look at the code to understand their meanings.
This patch aims at solving this problem by renaming the following variables:
$pager_page_array --> $pager_current_page
$pager_total --> $pager_page_count
$pager_total_items --> $pager_item_count
| Comment | File | Size | Author |
|---|---|---|---|
| pager_variable_names.patch | 7.56 KB | david lesieur |
Comments
Comment #1
dries commentedI think this is a a good patch, and I'd like to apply it. But I run all the tests 2 before and twice after applying this patch, and somehow there are two (additional) tests failing because of this patch. I can't quite figure out why ... I've stared at it for 20 minutes.
Comment #2
lilou commentedPatch non longer applied : pager.inc (Cannot apply hunk @@ 7 )
Comment #3
catchComment #4
sunNice one. However, those global variables should not exist in the first place. I'd rather remove them instead of prettifying them...
Comment #5
les limBumping this. I just encountered an issue where the search page was displaying the wrong number of pages because a pager in a views block was overriding $pager_total. Haven't looked at it too closely yet, though.
Comment #6
jhedstromtheme_pager()is gone.