+ $uriPath = $_SERVER['REQUEST_URI'];
+ }
+ # Just get the URI path (REDIRECT_URL/REQUEST_URI is either a full URL or a path)
+ if ( substr( $uriPath, 0, 1 ) !== '/' ) {
+ $bits = wfParseUrl( $uriPath );
+ if ( $bits && isset( $bits['path'] ) ) {
+ $uriPath = $bits['path'];
+ } else {
+ wfThumbError( 404, 'The source file for the specified thumbnail does not exist.' );
+ return;
+ }