Added Special:Myuploads special page that redirects to Special:Listfiles
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Fri, 3 Dec 2010 19:18:39 +0000 (19:18 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Fri, 3 Dec 2010 19:18:39 +0000 (19:18 +0000)
RELEASE-NOTES
includes/SpecialPage.php

index 86e3f72..3f0b552 100644 (file)
@@ -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 <gallery>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
index f678de3..8cf4693 100644 (file)
@@ -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