jenkins-bot has submitted this change and it was merged.
Change subject: thumb_handler.php doesn't seem to extract path_info correctly
......................................................................
thumb_handler.php doesn't seem to extract path_info correctly
Set $wgArticlePath so that it works the way that [[Manual:Thumb.php]]
claims it does.
Change-Id: I35b4ab73e1d84dad10503d3a098ee154e8d58d8a
---
M thumb.php
1 file changed, 7 insertions(+), 1 deletion(-)
Approvals:
Aaron Schulz: Looks good to me, approved
jenkins-bot: Verified
diff --git a/thumb.php b/thumb.php
index 4a0c9fb..b9826a7 100644
--- a/thumb.php
+++ b/thumb.php
@@ -62,9 +62,15 @@
# Set action base paths so that WebRequest::getPathInfo()
# recognizes the "X" as the 'title' in ../thumb_handler.php/X urls.
- $wgArticlePath = false; # Don't let a "/*" article path clober our
action path
+ # Note: If Custom per-extension repo paths are set, this may break.
+ $repo = RepoGroup::singleton()->getLocalRepo();
+ $oldArticlePath = $wgArticlePath;
+ $wgArticlePath = $repo->getZoneUrl( 'thumb' ) . '/$1';
$matches = WebRequest::getPathInfo();
+
+ $wgArticlePath = $oldArticlePath;
+
if ( !isset( $matches['title'] ) ) {
wfThumbError( 404, 'Could not determine the name of the
requested thumbnail.' );
return;
--
To view, visit https://gerrit.wikimedia.org/r/69025
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I35b4ab73e1d84dad10503d3a098ee154e8d58d8a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: ArielGlenn <[email protected]>
Gerrit-Reviewer: Brian Wolff <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits