From b605c6b543d1f9ec9ee3b8e9024c6a923b7e9c14 Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Fri, 3 Dec 2010 19:18:39 +0000 Subject: [PATCH] Added Special:Myuploads special page that redirects to Special:Listfiles --- RELEASE-NOTES | 1 + includes/SpecialPage.php | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 86e3f72875..3f0b5529c1 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -215,6 +215,7 @@ LocalSettings.php. The specific bugs are listed below in the general notes. number of the textsize in Byte * (bug 3276) Give image s fluid width * Added uploads link to page subtitle in Special:Contributions +* Added Special:Myuploads special page that redirects to Special:Listfiles === Bug fixes in 1.17 === * (bug 17560) Half-broken deletion moved image files to deletion archive diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index f678de3ba0..8cf4693dbc 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -191,6 +191,7 @@ class SpecialPage { 'Mycontributions' => 'SpecialMycontributions', 'Mypage' => 'SpecialMypage', 'Mytalk' => 'SpecialMytalk', + 'Myuploads' => 'SpecialMyuploads', 'Revisiondelete' => 'SpecialRevisionDelete', 'RevisionMove' => 'SpecialRevisionMove', 'Specialpages' => 'SpecialSpecialpages', @@ -1017,3 +1018,18 @@ class SpecialMycontributions extends UnlistedSpecialPage { return SpecialPage::getTitleFor( 'Contributions', $wgUser->getName() ); } } + +/** + * Redirect to Special:Listfiles?user=$wgUser + */ +class SpecialMyuploads extends UnlistedSpecialPage { + function __construct() { + parent::__construct( 'Myuploads' ); + $this->mAllowedRedirectParams = array( 'limit' ); + } + + function getRedirect( $subpage ) { + global $wgUser; + return SpecialPage::getTitleFor( 'Listfiles', $wgUser->getName() ); + } +} \ No newline at end of file -- 2.20.1