Revert r21250
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 18 Apr 2007 19:28:15 +0000 (19:28 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 18 Apr 2007 19:28:15 +0000 (19:28 +0000)
WebRequest::getText() is for user-supplied freeform text input for which input transformations may be required (eg Esperanto x-coding).
These two variables are not freeform text inputs, but predefined internal text keys selected by a drop-down menu.
Use of getVal() is correct.

includes/SpecialProtectedpages.php

index 4125f41..b214822 100644 (file)
@@ -22,12 +22,12 @@ class ProtectedPagesForm {
                        Title::purgeExpiredRestrictions();
                }
 
-               $type = $wgRequest->getText( 'type' );
-               $level = $wgRequest->getText( 'level' );
+               $type = $wgRequest->getVal( 'type' );
+               $level = $wgRequest->getVal( 'level' );
                $minsize = $wgRequest->getIntOrNull( 'minsize' );
                $NS = $wgRequest->getIntOrNull( 'namespace' );
 
-               $pager = new ProtectedPagesPager( $this, array(), $type, $level, $NS, $minsize );
+               $pager = new ProtectedPagesPager( $this, array(), $type, $level, $NS, $minsize );       
 
                $wgOut->addHTML( $this->showOptions( $NS, $type, $level, $minsize ) );