* Enable QueryPage classes to override list formatting; return Contribs
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 4 Dec 2006 22:54:12 +0000 (22:54 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 4 Dec 2006 22:54:12 +0000 (22:54 +0000)
  to unordered list display to improve readability

RELEASE-NOTES
includes/QueryPage.php
includes/SpecialContributions.php

index 52e491c..9401459 100644 (file)
@@ -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 ==
index b69277a..b8fedc4 100644 (file)
@@ -341,7 +341,7 @@ class QueryPage {
                if ( $num > 0 ) {
                        $s = array();
                        if ( ! $this->listoutput )
-                               $s[] = "<ol start='" . ( $offset + 1 ) . "' class='special'>";
+                               $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[] = '</ol>';
+                               $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 "<ol start='" . ( $offset + 1 ) . "' class='special'>";
+       }
+       
+       function closeList() {
+               return '</ol>';
+       }
 
        /**
         * Do any necessary preprocessing of the result object.
index 0a142d7..933d7ee 100644 (file)
@@ -20,6 +20,14 @@ class ContributionsPage extends QueryPage {
                $this->user = User::newFromName( $username, false );
        }
 
+       function openList( $offset ) {
+               return "<ul class='special'>";
+       }
+       
+       function closeList() {
+               return '</ul>';
+       }
+       
        /**
         * @return string Name of this special page.
         */