From: Brion Vibber Date: Thu, 15 Nov 2007 02:24:56 +0000 (+0000) Subject: * validate namespace parameter as int, not text X-Git-Tag: 1.31.0-rc.0~50870 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=6e0f16147c3480c7e519494c1452e0ead1c493eb;p=lhc%2Fweb%2Fwiklou.git * validate namespace parameter as int, not text * set the hidebots setting in the links so it doesn't randomly flip off --- diff --git a/includes/SpecialNewpages.php b/includes/SpecialNewpages.php index 1f93cc3548..48b864a458 100644 --- a/includes/SpecialNewpages.php +++ b/includes/SpecialNewpages.php @@ -165,6 +165,7 @@ class NewPagesPage extends QueryPage { $nondefaults = array(); wfAppendToArrayIfNotDefault( 'hidepatrolled', $this->hidepatrolled, $this->defaults, $nondefaults); wfAppendToArrayIfNotDefault( 'hideliu', $this->hideliu, $this->defaults, $nondefaults); + wfAppendToArrayIfNotDefault( 'hidebots', $this->hidebots, $this->defaults, $nondefaults); wfAppendToArrayIfNotDefault( 'namespace', $this->namespace, $this->defaults, $nondefaults); wfAppendToArrayIfNotDefault( 'limit', $this->limit , $this->defaults, $nondefaults); wfAppendToArrayIfNotDefault( 'offset', $this->offset , $this->defaults, $nondefaults); @@ -274,7 +275,7 @@ function wfSpecialNewpages($par, $specialPage) { } } } else { - if( $ns = $wgRequest->getText( 'namespace', NS_MAIN ) ) + if( $ns = $wgRequest->getInt( 'namespace', NS_MAIN ) ) $namespace = $ns; if( $un = $wgRequest->getText( 'username' ) ) $username = $un;