From: Brian Wolff Date: Mon, 17 Jun 2013 01:43:13 +0000 (-0300) Subject: thumb_handler.php doesn't seem to extract path_info correctly X-Git-Tag: 1.31.0-rc.0~19024^2 X-Git-Url: http://git.cyclocoop.org///%22%40url%40//%22?a=commitdiff_plain;h=377f8ffa07cd78a9fe25f3746fccba21b40c3148;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/thumb.php b/thumb.php index 4a0c9fb3d3..b9826a7887 100644 --- a/thumb.php +++ b/thumb.php @@ -62,9 +62,15 @@ function wfThumbHandle404() { # 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;