r24430 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24429‎ | r24430 | r24431 >
Date:16:50, 29 July 2007
Author:robchurch
Status:old
Tags:
Comment:
strpos() !== false is faster than strstr()
Modified paths:
  • /trunk/phase3/includes/ImagePage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ImagePage.php
@@ -554,7 +554,7 @@
555555 $wgOut->showUnexpectedValueError( 'oldimage', htmlspecialchars($oldimage) );
556556 return;
557557 }
558 - if ( strstr( $oldimage, "/" ) || strstr( $oldimage, "\\" ) ) {
 558+ if( strpos( $oldimage, '/' ) !== false || strpos( $oldimage, '\\' ) !== false ) {
559559 $wgOut->showUnexpectedValueError( 'oldimage', htmlspecialchars($oldimage) );
560560 return;
561561 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r24502Merged revisions 24415-24479 via svnmerge from...david22:31, 31 July 2007

Status & tagging log