Author: happy.melon.wiki
Description:
Patch to Pager.php, against r49962
I'm currently plugging away at formatting [[Special:Allmessages]] using the TablePager class, from Pager.php. In order to avoid some horrible hacks (returning a value of """foo" rowspan="2""" to fill into something like """<td class="$class">""") I made a few changes to TablePager itself, which I think can probably stand on their own, so I'm submitting them separately here. With this patch in place, the code in /extensions/CodeReview/CodeRevisionListView.php marked with evils (line273-295) can also be refactored; it shouldn't be necessary to overload the formatRow() function at all.
Changes are quite simple: setting $mCurrentRow right at the start of the function, so its context is available for the attribute-getting functions (this is the issue that forced CodeReview to clone the function), replacing the over-specific getRowClass() function with a more general getRowAttrs(), and implementing a parallel getCellAttrs(). getRowClass() is still retained for B/C, naturally. I think it's fully backwards-compatible, and it certainly works on my test install, although I haven't tested it with CodeReview itself. Bitsize chunks :D
Version: 1.15.x
Severity: enhancement
attachment diff.txt ignored as obsolete