From 9a31b5ff6fa57bb4d53a4eee86db42603442ba51 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sun, 7 Sep 2014 19:20:34 +0200 Subject: [PATCH] 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 --- includes/specialpage/RedirectSpecialPage.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 -- 2.20.1