Index: trunk/phase3/thumb.php |
— | — | @@ -227,11 +227,16 @@ |
228 | 228 | function wfExtractThumbParams( $uri ) { |
229 | 229 | $repo = RepoGroup::singleton()->getLocalRepo(); |
230 | 230 | |
231 | | - $bits = wfParseUrl( $repo->getZoneUrl( 'thumb' ) ); |
232 | | - if ( !$bits ) { |
233 | | - return null; |
| 231 | + $zoneURI = $repo->getZoneUrl( 'thumb' ); |
| 232 | + if ( substr( $zoneURI, 0, 1 ) !== '/' ) { |
| 233 | + $bits = wfParseUrl( $zoneURI ); |
| 234 | + if ( $bits && isset( $bits['path'] ) ) { |
| 235 | + $zoneURI = $bits['path']; |
| 236 | + } else { |
| 237 | + return null; |
| 238 | + } |
234 | 239 | } |
235 | | - $zoneUrlRegex = preg_quote( $bits['path'] ); |
| 240 | + $zoneUrlRegex = preg_quote( $zoneURI ); |
236 | 241 | |
237 | 242 | $hashDirRegex = $subdirRegex = ''; |
238 | 243 | for ( $i = 0; $i < $repo->getHashLevels(); $i++ ) { |