* cleaner indenting for query pages
authorAntoine Musso <hashar@users.mediawiki.org>
Sun, 27 May 2007 08:22:37 +0000 (08:22 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sun, 27 May 2007 08:22:37 +0000 (08:22 +0000)
* enclose the content generated in a <div id="mw-spcontent"> (for javascript)

includes/QueryPage.php

index 5374104..98e7ba2 100644 (file)
@@ -332,6 +332,8 @@ class QueryPage {
                $num = $dbr->numRows($res);
 
                $this->preprocessResults( $dbr, $res );
+
+               $wgOut->addHtml( XML::openElement( 'div', array('id' => 'mw-spcontent') ) );
                
                # Top header and navigation
                if( $shownavigation ) {
@@ -364,6 +366,8 @@ class QueryPage {
                if( $shownavigation ) {
                        $wgOut->addHtml( '<p>' . $paging . '</p>' );
                }
+
+               $wgOut->addHtml( XML::closeElement( 'div' ) );
                
                return $num;
        }
@@ -427,11 +431,11 @@ class QueryPage {
        }
        
        function openList( $offset ) {
-               return "<ol start='" . ( $offset + 1 ) . "' class='special'>";
+               return "\n<ol start='" . ( $offset + 1 ) . "' class='special'>\n";
        }
        
        function closeList() {
-               return '</ol>';
+               return "</ol>\n";
        }
 
        /**