From: umherirrender Date: Sun, 7 Sep 2014 17:20:34 +0000 (+0200) Subject: Allow preloadparams for Special:MyPage X-Git-Tag: 1.31.0-rc.0~14036^2 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=9a31b5ff6fa57bb4d53a4eee86db42603442ba51;p=lhc%2Fweb%2Fwiklou.git Allow preloadparams for Special:MyPage The param was added with If02cf4b3dba9f9d22a956d8bfff224677cbce00d This allows using it along with the already allowed preload= The preloadparams is a array param, which needs support in getRedirectQuery Change-Id: Ib4f369a39d989c7038b735b862883641aa3aa354 --- diff --git a/includes/specialpage/RedirectSpecialPage.php b/includes/specialpage/RedirectSpecialPage.php index cd41a1c60f..4226ee02a5 100644 --- a/includes/specialpage/RedirectSpecialPage.php +++ b/includes/specialpage/RedirectSpecialPage.php @@ -71,10 +71,13 @@ abstract class RedirectSpecialPage extends UnlistedSpecialPage { */ public function getRedirectQuery() { $params = array(); + $request = $this->getRequest(); foreach ( $this->mAllowedRedirectParams as $arg ) { - if ( $this->getRequest()->getVal( $arg, null ) !== null ) { - $params[$arg] = $this->getRequest()->getVal( $arg ); + if ( $request->getVal( $arg, null ) !== null ) { + $params[$arg] = $request->getVal( $arg ); + } elseif ( $request->getArray( $arg, null ) !== null ) { + $params[$arg] = $request->getArray( $arg ); } } @@ -188,7 +191,7 @@ abstract class RedirectSpecialArticle extends RedirectSpecialPage { 'action', 'redirect', 'rdfrom', # Options for preloaded edits - 'preload', 'editintro', 'preloadtitle', 'summary', 'nosummary', + 'preload', 'preloadparams', 'editintro', 'preloadtitle', 'summary', 'nosummary', # Options for overriding user settings 'preview', 'minor', 'watchthis', # Options for history/diffs