Disable fulltext image name search in Special:Imagelist during MiserMode
authorJens Frank <jeluf@users.mediawiki.org>
Mon, 30 May 2005 19:02:56 +0000 (19:02 +0000)
committerJens Frank <jeluf@users.mediawiki.org>
Mon, 30 May 2005 19:02:56 +0000 (19:02 +0000)
includes/SpecialImagelist.php

index 6a8f3fa..6e7cf99 100644 (file)
@@ -9,7 +9,7 @@
  *
  */
 function wfSpecialImagelist() {
-       global $wgUser, $wgOut, $wgLang, $wgContLang, $wgRequest;
+       global $wgUser, $wgOut, $wgLang, $wgContLang, $wgRequest, $wgMiserMode;
        
        $sort = $wgRequest->getVal( 'sort' );
        $wpIlMatch = $wgRequest->getText( 'wpIlMatch' );
@@ -22,7 +22,7 @@ function wfSpecialImagelist() {
        $bydate = wfMsg( "bydate" );
        $bysize = wfMsg( "bysize" );
 
-       if ( !empty( $wpIlMatch ) ) {
+       if ( !$wgMiserMode && !empty( $wpIlMatch ) ) {
                $nt = Title::newFromUrl( $wpIlMatch );
                if($nt ) {
                        $m = $dbr->strencode( strtolower( $nt->getDBkey() ) );
@@ -60,11 +60,13 @@ function wfSpecialImagelist() {
        $titleObj = Title::makeTitle( NS_SPECIAL, "Imagelist" );
        $action = $titleObj->escapeLocalURL(  "sort={$sort}&limit={$limit}" );
 
-       $wgOut->addHTML( "<form id=\"imagesearch\" method=\"post\" action=\"" .
-         "{$action}\">" .
-         "<input type='text' size='20' name=\"wpIlMatch\" value=\"" .
-         htmlspecialchars( $wpIlMatch ) . "\" /> " .
-         "<input type='submit' name=\"wpIlSubmit\" value=\"{$sub}\" /></form>" );
+       if ( !$wgMiserMode ) {
+               $wgOut->addHTML( "<form id=\"imagesearch\" method=\"post\" action=\"" .
+                 "{$action}\">" .
+                 "<input type='text' size='20' name=\"wpIlMatch\" value=\"" .
+                 htmlspecialchars( $wpIlMatch ) . "\" /> " .
+                 "<input type='submit' name=\"wpIlSubmit\" value=\"{$sub}\" /></form>" );
+       }
        $nums = array( 50, 100, 250, 500 );
        $here = Title::makeTitle( NS_SPECIAL, 'Imagelist' );