X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=thumb.php;h=b9826a78878f23ddd53810220e8e76ed65cb4ab7;hb=4fabc910d2e1bb4581ac7a80f019bd22758d089b;hp=4a0c9fb3d394b25b92e1e13ac29b7b6bb19e01ae;hpb=4c6f3d83245520ac7e853dd71cd2a86de51f2fb9;p=lhc%2Fweb%2Fwiklou.git 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;