r20739 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r20738‎ | r20739 | r20740 >
Date:16:50, 27 March 2007
Author:midom
Status:old
Tags:
Comment:
don't allow search for new images in miser mode
Modified paths:
  • /trunk/phase3/includes/SpecialNewimages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialNewimages.php
@@ -8,7 +8,7 @@
99 *
1010 */
1111 function wfSpecialNewimages( $par, $specialPage ) {
12 - global $wgUser, $wgOut, $wgLang, $wgRequest, $wgGroupPermissions;
 12+ global $wgUser, $wgOut, $wgLang, $wgRequest, $wgGroupPermissions, $wgMiserMode;
1313
1414 $wpIlMatch = $wgRequest->getText( 'wpIlMatch' );
1515 $dbr = wfGetDB( DB_SLAVE );
@@ -74,7 +74,7 @@
7575
7676 $where = array();
7777 $searchpar = '';
78 - if ( $wpIlMatch != '' ) {
 78+ if ( $wpIlMatch != '' && !$wgMiserMode) {
7979 $nt = Title::newFromUrl( $wpIlMatch );
8080 if($nt ) {
8181 $m = $dbr->strencode( strtolower( $nt->getDBkey() ) );
@@ -157,7 +157,7 @@
158158 $sub = wfMsg( 'ilsubmit' );
159159 $titleObj = SpecialPage::getTitleFor( 'Newimages' );
160160 $action = $titleObj->escapeLocalURL( $hidebots ? '' : 'hidebots=0' );
161 - if ($shownav) {
 161+ if ($shownav && !$wgMiserMode) {
162162 $wgOut->addHTML( "<form id=\"imagesearch\" method=\"post\" action=\"" .
163163 "{$action}\">" .
164164 Xml::input( 'wpIlMatch', 20, $wpIlMatch ) . ' ' .