From 6e0f16147c3480c7e519494c1452e0ead1c493eb Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 15 Nov 2007 02:24:56 +0000 Subject: [PATCH] * validate namespace parameter as int, not text * set the hidebots setting in the links so it doesn't randomly flip off --- includes/SpecialNewpages.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.20.1