http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88520

Revision: 88520
Author:   jeroendedauw
Date:     2011-05-21 15:03:06 +0000 (Sat, 21 May 2011)
Log Message:
-----------
get rid of strict error

Modified Paths:
--------------
    trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_QueryPage.php

Modified: 
trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_QueryPage.php
===================================================================
--- trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_QueryPage.php    
2011-05-21 15:00:17 UTC (rev 88519)
+++ trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_QueryPage.php    
2011-05-21 15:03:06 UTC (rev 88520)
@@ -37,9 +37,8 @@
         *
         * @param $offset database query offset
         * @param $limit database query limit
-        * @param $shownavigation show navigation like "next 200"?
         */
-       function doQuery( $offset, $limit, $shownavigation = true ) {
+       function doQuery( $offset = false, $limit = false ) {
                global $wgOut, $wgContLang;
 
                $options = new SMWRequestOptions();
@@ -52,27 +51,26 @@
                $sk = $this->getSkin();
                $sname = $this->getName();
 
-               if ( $shownavigation ) {
-                       $wgOut->addHTML( $this->getPageHeader() );
+               $wgOut->addHTML( $this->getPageHeader() );
 
-                       // if list is empty, show it
-                       if ( $num == 0 ) {
-                               smwfLoadExtensionMessages( 'SemanticMediaWiki' 
);
-                               $wgOut->addHTML( '<p>' . wfMsgHTML( 
'specialpage-empty' ) . '</p>' );
-                               return;
-                       }
+               // if list is empty, show it
+               if ( $num == 0 ) {
+                       smwfLoadExtensionMessages( 'SemanticMediaWiki' );
+                       $wgOut->addHTML( '<p>' . wfMsgHTML( 'specialpage-empty' 
) . '</p>' );
+                       return;
+               }
 
-                       $top = wfShowingResults( $offset, $num );
-                       $wgOut->addHTML( "<p>{$top}\n" );
+               $top = wfShowingResults( $offset, $num );
+               $wgOut->addHTML( "<p>{$top}\n" );
 
-                       // often disable 'next' link when we reach the end
-                       $atend = $num < $limit;
+               // often disable 'next' link when we reach the end
+               $atend = $num < $limit;
 
-                       $sl = wfViewPrevNext( $offset, $limit ,
-                               $wgContLang->specialPage( $sname ),
-                               wfArrayToCGI( $this->linkParameters() ), $atend 
);
-                       $wgOut->addHTML( "<br />{$sl}</p>\n" );
-               }
+               $sl = wfViewPrevNext( $offset, $limit ,
+                       $wgContLang->specialPage( $sname ),
+                       wfArrayToCGI( $this->linkParameters() ), $atend );
+               $wgOut->addHTML( "<br />{$sl}</p>\n" );
+                       
                if ( $num > 0 ) {
                        $s = array();
                        if ( ! $this->listoutput )
@@ -90,9 +88,9 @@
                        $str = $this->listoutput ? $wgContLang->listToText( $s 
) : implode( '', $s );
                        $wgOut->addHTML( $str );
                }
-               if ( $shownavigation ) {
-                       $wgOut->addHTML( "<p>{$sl}</p>\n" );
-               }
+               
+               $wgOut->addHTML( "<p>{$sl}</p>\n" );
+               
                return $num;
        }
 
@@ -114,4 +112,3 @@
     }    
 
 }
-


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to