*** oldw/includes/SpecialPage.php 2012-01-04 01:07:06.000000000 +0000 --- w/includes/SpecialPage.php 2012-04-05 04:01:08.209994001 +0000 *************** *** 1026,1035 **** class SpecialMypage extends RedirectSpecialPage { function __construct() { parent::__construct( 'Mypage' ); ! $this->mAllowedRedirectParams = array( 'action' , 'preload' , 'editintro', ! 'section', 'oldid', 'diff', 'dir', ! // Options for action=raw; missing ctype can break JS or CSS in some browsers ! 'ctype', 'maxage', 'smaxage' ); } function getRedirect( $subpage ) { --- 1026,1032 ---- class SpecialMypage extends RedirectSpecialPage { function __construct() { parent::__construct( 'Mypage' ); ! $this->mAllowedRedirectParams = SpecialMypage::getAllowedRedirectParams(); } function getRedirect( $subpage ) { *************** *** 1039,1044 **** --- 1036,1057 ---- return Title::makeTitle( NS_USER, $this->getUser()->getName() ); } } + + static function getAllowedRedirectParams() { + return array( 'action', + 'redirect', 'rdfrom', + // Options for preloaded edits + 'preload', 'editintro', 'preloadtitle', 'summary', + // Options for overriding user settings + 'preview', 'internaledit', 'externaledit', 'mode', + // Options for history/diffs + 'section', 'oldid', 'diff', 'dir', + 'limit', 'offset', 'feed', + // Misc options + 'redlink', 'debug', + // Options for action=raw; missing ctype can break JS or CSS in some browsers + 'ctype', 'maxage', 'smaxage' ); + } } /** *************** *** 1048,1055 **** class SpecialMytalk extends RedirectSpecialPage { function __construct() { parent::__construct( 'Mytalk' ); ! $this->mAllowedRedirectParams = array( 'action' , 'preload' , 'editintro', ! 'section', 'oldid', 'diff', 'dir' ); } function getRedirect( $subpage ) { --- 1061,1067 ---- class SpecialMytalk extends RedirectSpecialPage { function __construct() { parent::__construct( 'Mytalk' ); ! $this->mAllowedRedirectParams = SpecialMypage::getAllowedRedirectParams(); } function getRedirect( $subpage ) {