r105330 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105329‎ | r105330 | r105331 >
Date:18:48, 6 December 2011
Author:aaron
Status:ok
Tags:
Comment:
Reverted r105208 per CR
Modified paths:
  • /trunk/phase3/img_auth.php (modified) (history)

Diff [purge]

Index: trunk/phase3/img_auth.php
@@ -94,12 +94,12 @@
9595 return;
9696 }
9797
98 - // Extract the file name and chop off the size specifier
 98+ // Extract the file name and chop off the size specifier.
9999 // (e.g. 120px-Foo.png => Foo.png or page2-120px-Foo.png => Foo.png).
100 - // This only applies to thumbnails, and all thumbnails should have
101 - // a width indicator and be under a folder that has the source file name.
 100+ // This only applies to thumbnails, and all thumbnails should
 101+ // be under a folder that has the source file name.
102102 $name = wfBaseName( $path );
103 - if ( preg_match( '!(?:[^-]*-)*?\d+px-(.*)!i', $name ) ) {
 103+ if ( strpos( $path, '/thumb/' ) === 0 ) {
104104 $name = wfBaseName( dirname( $path ) ); // this file is a thumbnail
105105 }
106106

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r105208FU r104216: keep the r103738 regex check for thumbnails but use the parent di...aaron19:17, 5 December 2011

Status & tagging log