IAlex has uploaded a new change for review.
https://gerrit.wikimedia.org/r/75310
Change subject: (bug 51542) make "Special:FilePath?file=.." work again
......................................................................
(bug 51542) make "Special:FilePath?file=.." work again
bug: 51542
Change-Id: I2418e33ebd91dc0dc6968ba003a46857ec7524d3
---
M RELEASE-NOTES-1.22
M includes/specials/SpecialFilepath.php
2 files changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/10/75310/1
diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index 858a6f3..22f79b3 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -206,6 +206,7 @@
instead of just Parent/name).
* Added $wgAPIUselessQueryPages to allow extensions to flag their query pages
for non-inclusion in ApiQueryQueryPages.
+* (bug 51542) "Special:FilePath?file=.." works again
=== API changes in 1.22 ===
* (bug 25553) The JSON output formatter now leaves forward slashes unescaped
diff --git a/includes/specials/SpecialFilepath.php
b/includes/specials/SpecialFilepath.php
index 57e552b..e7ced52 100644
--- a/includes/specials/SpecialFilepath.php
+++ b/includes/specials/SpecialFilepath.php
@@ -35,7 +35,8 @@
// implement by redirecting through Special:Redirect/file
function getRedirect( $par ) {
- return SpecialPage::getSafeTitleFor( 'Redirect', 'file/' . $par
);
+ $file = $par ?: $this->getRequest()->getText( 'file' );
+ return SpecialPage::getSafeTitleFor( 'Redirect', 'file/' .
$file );
}
protected function getGroupName() {
--
To view, visit https://gerrit.wikimedia.org/r/75310
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2418e33ebd91dc0dc6968ba003a46857ec7524d3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits