From a1789ddde42033f1b05cc4929491214ee6e79383 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 17 Dec 2015 09:15:42 +0100 Subject: Update to MediaWiki 1.26.0 --- includes/specials/SpecialMyRedirectPages.php | 55 +++++++++++++++++++--------- 1 file changed, 38 insertions(+), 17 deletions(-) (limited to 'includes/specials/SpecialMyRedirectPages.php') diff --git a/includes/specials/SpecialMyRedirectPages.php b/includes/specials/SpecialMyRedirectPages.php index 9b8d52bb..5ef03f13 100644 --- a/includes/specials/SpecialMyRedirectPages.php +++ b/includes/specials/SpecialMyRedirectPages.php @@ -30,16 +30,20 @@ * @ingroup SpecialPage */ class SpecialMypage extends RedirectSpecialArticle { - function __construct() { + public function __construct() { parent::__construct( 'Mypage' ); } - function getRedirect( $subpage ) { - if ( strval( $subpage ) !== '' ) { - return Title::makeTitle( NS_USER, $this->getUser()->getName() . '/' . $subpage ); - } else { + /** + * @param string|null $subpage + * @return Title + */ + public function getRedirect( $subpage ) { + if ( $subpage === null || $subpage === '' ) { return Title::makeTitle( NS_USER, $this->getUser()->getName() ); } + + return Title::makeTitle( NS_USER, $this->getUser()->getName() . '/' . $subpage ); } } @@ -49,16 +53,20 @@ class SpecialMypage extends RedirectSpecialArticle { * @ingroup SpecialPage */ class SpecialMytalk extends RedirectSpecialArticle { - function __construct() { + public function __construct() { parent::__construct( 'Mytalk' ); } - function getRedirect( $subpage ) { - if ( strval( $subpage ) !== '' ) { - return Title::makeTitle( NS_USER_TALK, $this->getUser()->getName() . '/' . $subpage ); - } else { + /** + * @param string|null $subpage + * @return Title + */ + public function getRedirect( $subpage ) { + if ( $subpage === null || $subpage === '' ) { return Title::makeTitle( NS_USER_TALK, $this->getUser()->getName() ); } + + return Title::makeTitle( NS_USER_TALK, $this->getUser()->getName() . '/' . $subpage ); } } @@ -68,13 +76,18 @@ class SpecialMytalk extends RedirectSpecialArticle { * @ingroup SpecialPage */ class SpecialMycontributions extends RedirectSpecialPage { - function __construct() { + public function __construct() { parent::__construct( 'Mycontributions' ); $this->mAllowedRedirectParams = array( 'limit', 'namespace', 'tagfilter', - 'offset', 'dir', 'year', 'month', 'feed' ); + 'offset', 'dir', 'year', 'month', 'feed', 'deletedOnly', + 'nsInvert', 'associated', 'newOnly', 'topOnly' ); } - function getRedirect( $subpage ) { + /** + * @param string|null $subpage + * @return Title + */ + public function getRedirect( $subpage ) { return SpecialPage::getTitleFor( 'Contributions', $this->getUser()->getName() ); } } @@ -85,12 +98,16 @@ class SpecialMycontributions extends RedirectSpecialPage { * @ingroup SpecialPage */ class SpecialMyuploads extends RedirectSpecialPage { - function __construct() { + public function __construct() { parent::__construct( 'Myuploads' ); $this->mAllowedRedirectParams = array( 'limit', 'ilshowall', 'ilsearch' ); } - function getRedirect( $subpage ) { + /** + * @param string|null $subpage + * @return Title + */ + public function getRedirect( $subpage ) { return SpecialPage::getTitleFor( 'Listfiles', $this->getUser()->getName() ); } } @@ -101,12 +118,16 @@ class SpecialMyuploads extends RedirectSpecialPage { * @ingroup SpecialPage */ class SpecialAllMyUploads extends RedirectSpecialPage { - function __construct() { + public function __construct() { parent::__construct( 'AllMyUploads' ); $this->mAllowedRedirectParams = array( 'limit', 'ilsearch' ); } - function getRedirect( $subpage ) { + /** + * @param string|null $subpage + * @return Title + */ + public function getRedirect( $subpage ) { $this->mAddedRedirectParams['ilshowall'] = 1; return SpecialPage::getTitleFor( 'Listfiles', $this->getUser()->getName() ); -- cgit v1.2.2 From 257401d8b2cf661adf36c84b0e3fd1cf85e33c22 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 18 Dec 2015 06:04:58 +0100 Subject: Update to MediaWiki 1.26.1 --- includes/specials/SpecialMyRedirectPages.php | 50 ++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'includes/specials/SpecialMyRedirectPages.php') diff --git a/includes/specials/SpecialMyRedirectPages.php b/includes/specials/SpecialMyRedirectPages.php index 5ef03f13..850b1f63 100644 --- a/includes/specials/SpecialMyRedirectPages.php +++ b/includes/specials/SpecialMyRedirectPages.php @@ -45,6 +45,16 @@ class SpecialMypage extends RedirectSpecialArticle { return Title::makeTitle( NS_USER, $this->getUser()->getName() . '/' . $subpage ); } + + /** + * Target identifies a specific User. See T109724. + * + * @since 1.27 + * @return bool + */ + public function personallyIdentifiableTarget() { + return true; + } } /** @@ -68,6 +78,16 @@ class SpecialMytalk extends RedirectSpecialArticle { return Title::makeTitle( NS_USER_TALK, $this->getUser()->getName() . '/' . $subpage ); } + + /** + * Target identifies a specific User. See T109724. + * + * @since 1.27 + * @return bool + */ + public function personallyIdentifiableTarget() { + return true; + } } /** @@ -90,6 +110,16 @@ class SpecialMycontributions extends RedirectSpecialPage { public function getRedirect( $subpage ) { return SpecialPage::getTitleFor( 'Contributions', $this->getUser()->getName() ); } + + /** + * Target identifies a specific User. See T109724. + * + * @since 1.27 + * @return bool + */ + public function personallyIdentifiableTarget() { + return true; + } } /** @@ -110,6 +140,16 @@ class SpecialMyuploads extends RedirectSpecialPage { public function getRedirect( $subpage ) { return SpecialPage::getTitleFor( 'Listfiles', $this->getUser()->getName() ); } + + /** + * Target identifies a specific User. See T109724. + * + * @since 1.27 + * @return bool + */ + public function personallyIdentifiableTarget() { + return true; + } } /** @@ -132,4 +172,14 @@ class SpecialAllMyUploads extends RedirectSpecialPage { return SpecialPage::getTitleFor( 'Listfiles', $this->getUser()->getName() ); } + + /** + * Target identifies a specific User. See T109724. + * + * @since 1.27 + * @return bool + */ + public function personallyIdentifiableTarget() { + return true; + } } -- cgit v1.2.2