From: Aaron Schulz Date: Tue, 6 Dec 2011 18:48:48 +0000 (+0000) Subject: Reverted r105208 per CR X-Git-Tag: 1.31.0-rc.0~26155 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=cb399e076d549ef13103ecb082973381b34fccf1;p=lhc%2Fweb%2Fwiklou.git Reverted r105208 per CR --- diff --git a/img_auth.php b/img_auth.php index fc431f8b61..8b121812f6 100644 --- a/img_auth.php +++ b/img_auth.php @@ -94,12 +94,12 @@ function wfImageAuthMain() { return; } - // Extract the file name and chop off the size specifier + // Extract the file name and chop off the size specifier. // (e.g. 120px-Foo.png => Foo.png or page2-120px-Foo.png => Foo.png). - // This only applies to thumbnails, and all thumbnails should have - // a width indicator and be under a folder that has the source file name. + // This only applies to thumbnails, and all thumbnails should + // be under a folder that has the source file name. $name = wfBaseName( $path ); - if ( preg_match( '!(?:[^-]*-)*?\d+px-(.*)!i', $name ) ) { + if ( strpos( $path, '/thumb/' ) === 0 ) { $name = wfBaseName( dirname( $path ) ); // this file is a thumbnail }