https://bugzilla.wikimedia.org/show_bug.cgi?id=18620

           Summary: Improve TablePager (patch)
           Product: MediaWiki
           Version: 1.15-svn
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: need-review, patch
          Severity: enhancement
          Priority: Normal
         Component: General/Unknown
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Created an attachment (id=6068)
 --> (https://bugzilla.wikimedia.org/attachment.cgi?id=6068)
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


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to