[MediaWiki-commits] [Gerrit] Allow listing old files in Special:ListFiles. Add Special:Al... - change (mediawiki/core)
TheDJ has submitted this change and it was merged. Change subject: Allow listing old files in Special:ListFiles. Add Special:AllMyUploads .. Allow listing old files in Special:ListFiles. Add Special:AllMyUploads This solves the problem of new users on commons wanting a list of their files, but something like cropbot modifying it and taking it off Special:MyUploads. I'm worried this is a bit hacky to make TablePager work with two queries. If anyone has any suggestions on how to do this in a less hacky way, please say. Some notes: * This totally removes any revdeleted entries instead of dealing with them. Some future iteration can do selective deletion. * Should maybe add links to old versions of files description page somewhere. Not sure where in ui that would fit (The date maybe) (by old file description page I mean something like flagged revs filetimestamp parameter) * The latest version column should perhaps have latest and old instead of yes or no * This is slightly different from the suggestion on the bug report as it shows all revisions (instead of say just first revisions). I think showing all revisions makes more sense for the where are my uploads use case. Second of all, the checkbox is not on by default. Bug: 30607 Change-Id: I9e58db1f212e3bb361316c05ef32d4b9c31c6490 --- M RELEASE-NOTES-1.22 M includes/AutoLoader.php M includes/SpecialPage.php M includes/SpecialPageFactory.php M includes/specials/SpecialListfiles.php M languages/messages/MessagesEn.php M languages/messages/MessagesQqq.php M maintenance/language/messages.inc 8 files changed, 250 insertions(+), 23 deletions(-) Approvals: TheDJ: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index dfc972a..c90fdbe 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -201,6 +201,9 @@ nolines, packed, packed-overlay, or packed-hover. * (bug 47399) A success message is now displayed after changing the password. * Make thumb.php give HTTP redirects for file redirects +* (bug 30607) Special:ListFiles can now show old versions of files. Additionally + Special:AllMyUploads was introduced so the user can get a list of all things + they have ever uploaded, even if it was subsequently overriden. === Bug fixes in 1.22 === * Disable Special:PasswordReset when $wgEnableEmail is false. Previously one diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index b830b16..82d204b 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -232,6 +232,7 @@ 'SpecialMypage' = 'includes/SpecialPage.php', 'SpecialMytalk' = 'includes/SpecialPage.php', 'SpecialMyuploads' = 'includes/SpecialPage.php', + 'SpecialAllMyUploads' = 'includes/SpecialPage.php', 'SpecialPage' = 'includes/SpecialPage.php', 'SpecialPageFactory' = 'includes/SpecialPageFactory.php', 'SpecialRedirectToSpecial' = 'includes/SpecialPage.php', diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index d87f910..94782db 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -1386,7 +1386,7 @@ class SpecialMyuploads extends RedirectSpecialPage { function __construct() { parent::__construct( 'Myuploads' ); - $this-mAllowedRedirectParams = array( 'limit' ); + $this-mAllowedRedirectParams = array( 'limit', 'ilshowall', 'ilsearch' ); } function getRedirect( $subpage ) { @@ -1395,6 +1395,22 @@ } /** + * Redirect Special:Listfiles?user=$wgUserilshowall=true + */ +class SpecialAllMyUploads extends RedirectSpecialPage { + function __construct() { + parent::__construct( 'AllMyUploads' ); + $this-mAllowedRedirectParams = array( 'limit', 'ilsearch' ); + } + + function getRedirect( $subpage ) { + $this-mAddedRedirectParams['ilshowall'] = 1; + return SpecialPage::getTitleFor( 'Listfiles', $this-getUser()-getName() ); + } +} + + +/** * Redirect from Special:PermanentLink/### to index.php?oldid=### */ class SpecialPermanentLink extends RedirectSpecialPage { diff --git a/includes/SpecialPageFactory.php b/includes/SpecialPageFactory.php index 9f5d4ad..a412fdb 100644 --- a/includes/SpecialPageFactory.php +++ b/includes/SpecialPageFactory.php @@ -163,6 +163,7 @@ 'Mypage'= 'SpecialMypage', 'Mytalk'= 'SpecialMytalk', 'Myuploads' = 'SpecialMyuploads', + 'AllMyUploads' = 'SpecialAllMyUploads', 'PermanentLink' = 'SpecialPermanentLink', 'Redirect' = 'SpecialRedirect', 'Revisiondelete'= 'SpecialRevisionDelete', diff --git a/includes/specials/SpecialListfiles.php
[MediaWiki-commits] [Gerrit] Allow listing old files in Special:ListFiles. Add Special:Al... - change (mediawiki/core)
Brian Wolff has uploaded a new change for review. https://gerrit.wikimedia.org/r/60088 Change subject: Allow listing old files in Special:ListFiles. Add Special:AllMyUploads .. Allow listing old files in Special:ListFiles. Add Special:AllMyUploads This solves the problem of new users on commons wanting a list of their files, but something like cropbot modifying it and taking it off Special:MyUploads. I'm worried this is a bit hacky to make TablePager work with two queries. If anyone has any suggestions on how to do this in a less hacky way, please say. Some notes: *This totally removes any revdeleted entries instead of dealing with them. Some future iteration can do selective deletion. *Should maybe add links to old versions of files description page somewhere. Not sure where in ui that would fit (The date maybe) (by old file description page I mean something like flagged revs filetimestamp parameter) *The latest version column should perhaps have latest and old instead of yes or no *This is slightly different from the suggestion on the bug report as it shows all revisions (instead of say just first revisions). I think showing all revisions makes more sense for the where are my uploads use case. Second of all, the checkbox is not on by default. Bug: 30607 Change-Id: I9e58db1f212e3bb361316c05ef32d4b9c31c6490 --- M RELEASE-NOTES-1.22 M includes/AutoLoader.php M includes/SpecialPage.php M includes/SpecialPageFactory.php M includes/specials/SpecialListfiles.php M languages/messages/MessagesEn.php M languages/messages/MessagesQqq.php M maintenance/language/messages.inc 8 files changed, 221 insertions(+), 23 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/88/60088/1 diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index e1870fd..d168184 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -29,6 +29,9 @@ * Added 'SpecialSearchResultsPrepend' and 'SpecialSearchResultsAppend' hooks. * (bug 23343) Implemented ability to apply IP blocks to the contents of X-Forwarded-For headers by adding a new configuration variable $wgApplyIpBlocksToXff (disabled by default). +* (bug 30607) Special:ListFiles can now show old versions of files. Additionally + Special:AllMyUploads was introduced so the user can get a list of all things + they have ever uploaded, even if it was subsequently overriden. === Bug fixes in 1.22 === * Disable Special:PasswordReset when $wgEnableEmail. Previously one could still diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 88bb21b..76234de 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -234,6 +234,7 @@ 'SpecialMypage' = 'includes/SpecialPage.php', 'SpecialMytalk' = 'includes/SpecialPage.php', 'SpecialMyuploads' = 'includes/SpecialPage.php', + 'SpecialAllMyUploads' = 'includes/SpecialPage.php', 'SpecialPage' = 'includes/SpecialPage.php', 'SpecialPageFactory' = 'includes/SpecialPageFactory.php', 'SpecialRedirectToSpecial' = 'includes/SpecialPage.php', diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index d8f6fd9..6e6d75f 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -1344,7 +1344,7 @@ class SpecialMyuploads extends RedirectSpecialPage { function __construct() { parent::__construct( 'Myuploads' ); - $this-mAllowedRedirectParams = array( 'limit' ); + $this-mAllowedRedirectParams = array( 'limit', 'ilshowall', 'ilsearch' ); } function getRedirect( $subpage ) { @@ -1353,6 +1353,22 @@ } /** + * Redirect Special:Listfiles?user=$wgUserilshowall=true + */ +class SpecialAllMyUploads extends RedirectSpecialPage { + function __construct() { + parent::__construct( 'AllMyUploads' ); + $this-mAllowedRedirectParams = array( 'limit', 'ilsearch' ); + } + + function getRedirect( $subpage ) { + $this-mAddedRedirectParams['ilshowall'] = 1; + return SpecialPage::getTitleFor( 'Listfiles', $this-getUser()-getName() ); + } +} + + +/** * Redirect from Special:PermanentLink/### to index.php?oldid=### */ class SpecialPermanentLink extends RedirectSpecialPage { diff --git a/includes/SpecialPageFactory.php b/includes/SpecialPageFactory.php index a53b901..ccc9e18 100644 --- a/includes/SpecialPageFactory.php +++ b/includes/SpecialPageFactory.php @@ -160,6 +160,7 @@ 'Mypage'= 'SpecialMypage', 'Mytalk'= 'SpecialMytalk', 'Myuploads' = 'SpecialMyuploads', + 'AllMyUploads' = 'SpecialAllMyUploads', 'PermanentLink' = 'SpecialPermanentLink', 'Revisiondelete'= 'SpecialRevisionDelete', 'Specialpages'