From: Brion Vibber Date: Mon, 4 Dec 2006 22:54:12 +0000 (+0000) Subject: * Enable QueryPage classes to override list formatting; return Contribs X-Git-Tag: 1.31.0-rc.0~54990 X-Git-Url: https://git.cyclocoop.org/?a=commitdiff_plain;h=d47708b4cbfd725d14c29f7b629dde06455ab221;p=lhc%2Fweb%2Fwiklou.git * Enable QueryPage classes to override list formatting; return Contribs to unordered list display to improve readability --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 52e491cf36..9401459155 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -252,6 +252,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 8042) Make miser mode caching limits settable via $wgQueryCacheLimit instead of hardcoding to 1000 * Avoid notice when contribs query page class is instantiated in batch mode +* Enable QueryPage classes to override list formatting; return Contribs + to unordered list display to improve readability == Languages updated == diff --git a/includes/QueryPage.php b/includes/QueryPage.php index b69277ac71..b8fedc4dff 100644 --- a/includes/QueryPage.php +++ b/includes/QueryPage.php @@ -341,7 +341,7 @@ class QueryPage { if ( $num > 0 ) { $s = array(); if ( ! $this->listoutput ) - $s[] = "
    "; + $s[] = $this->openList( $offset ); # Only read at most $num rows, because $res may contain the whole 1000 for ( $i = 0; $i < $num && $obj = $dbr->fetchObject( $res ); $i++ ) { @@ -366,7 +366,7 @@ class QueryPage { $dbr->freeResult( $res ); if ( ! $this->listoutput ) - $s[] = '
'; + $s[] = $this->closeList(); $str = $this->listoutput ? $wgContLang->listToText( $s ) : implode( '', $s ); $wgOut->addHTML( $str ); } @@ -375,6 +375,14 @@ class QueryPage { } return $num; } + + function openList( $offset ) { + return "
    "; + } + + function closeList() { + return '
'; + } /** * Do any necessary preprocessing of the result object. diff --git a/includes/SpecialContributions.php b/includes/SpecialContributions.php index 0a142d79a6..933d7eebf3 100644 --- a/includes/SpecialContributions.php +++ b/includes/SpecialContributions.php @@ -20,6 +20,14 @@ class ContributionsPage extends QueryPage { $this->user = User::newFromName( $username, false ); } + function openList( $offset ) { + return "'; + } + /** * @return string Name of this special page. */