r27510 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r27509‎ | r27510 | r27511 >
Date:02:24, 15 November 2007
Author:brion
Status:old
Tags:
Comment:
* validate namespace parameter as int, not text
* set the hidebots setting in the links so it doesn't randomly flip off
Modified paths:
  • /trunk/phase3/includes/SpecialNewpages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialNewpages.php
@@ -165,6 +165,7 @@
166166 $nondefaults = array();
167167 wfAppendToArrayIfNotDefault( 'hidepatrolled', $this->hidepatrolled, $this->defaults, $nondefaults);
168168 wfAppendToArrayIfNotDefault( 'hideliu', $this->hideliu, $this->defaults, $nondefaults);
 169+ wfAppendToArrayIfNotDefault( 'hidebots', $this->hidebots, $this->defaults, $nondefaults);
169170 wfAppendToArrayIfNotDefault( 'namespace', $this->namespace, $this->defaults, $nondefaults);
170171 wfAppendToArrayIfNotDefault( 'limit', $this->limit , $this->defaults, $nondefaults);
171172 wfAppendToArrayIfNotDefault( 'offset', $this->offset , $this->defaults, $nondefaults);
@@ -274,7 +275,7 @@
275276 }
276277 }
277278 } else {
278 - if( $ns = $wgRequest->getText( 'namespace', NS_MAIN ) )
 279+ if( $ns = $wgRequest->getInt( 'namespace', NS_MAIN ) )
279280 $namespace = $ns;
280281 if( $un = $wgRequest->getText( 'username' ) )
281282 $username = $un;

Status & tagging log