mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
synced 2024-11-27 17:51:00 +00:00
Replace WebRequest::getVal by ::getRawVal or ::getText
The UTF-8 normalization of getVal is not needed at all places. Change-Id: If8fef794ff75671e32f965c7a780681d9cbd9a4a
This commit is contained in:
parent
3d8e911979
commit
aec8d75570
|
@ -40,7 +40,7 @@ class CategoryTreeCategoryViewer extends CategoryViewer {
|
|||
|
||||
$options = $this->getConfig()->get( 'CategoryTreeCategoryPageOptions' );
|
||||
|
||||
$mode = $this->getRequest()->getVal( 'mode' );
|
||||
$mode = $this->getRequest()->getRawVal( 'mode' );
|
||||
if ( $mode !== null ) {
|
||||
$options['mode'] = CategoryTree::decodeMode( $mode );
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ class CategoryTreePage extends SpecialPage {
|
|||
if ( $par ) {
|
||||
$this->target = trim( $par );
|
||||
} else {
|
||||
$this->target = trim( $request->getVal( 'target', '' ) );
|
||||
$this->target = trim( $request->getText( 'target' ) );
|
||||
if ( $this->target === '' ) {
|
||||
$rootcategory = $this->msg( 'rootcategory' );
|
||||
if ( $rootcategory->exists() ) {
|
||||
|
@ -116,9 +116,9 @@ class CategoryTreePage extends SpecialPage {
|
|||
* Input form for entering a category
|
||||
*/
|
||||
private function executeInputForm() {
|
||||
$namespaces = $this->getRequest()->getVal( 'namespaces', '' );
|
||||
$namespaces = $this->getRequest()->getRawVal( 'namespaces' );
|
||||
// mode may be overriden by namespaces option
|
||||
$mode = ( $namespaces === '' ? $this->getOption( 'mode' ) : CategoryTreeMode::ALL );
|
||||
$mode = ( $namespaces === null ? $this->getOption( 'mode' ) : CategoryTreeMode::ALL );
|
||||
if ( $mode === CategoryTreeMode::CATEGORIES ) {
|
||||
$modeDefault = 'categories';
|
||||
} elseif ( $mode === CategoryTreeMode::PAGES ) {
|
||||
|
|
Loading…
Reference in a new issue