r53658 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53657‎ | r53658 | r53659 >
Date:19:42, 22 July 2009
Author:ialex
Status:deferred
Tags:
Comment:
* no need to pass "$asyncdownload = false", this is not python :)
* added new line at the end of wfDebug() call
* change ereg(i) to preg_match, the former is deprecated since PHP 5.3
Modified paths:
  • /trunk/phase3/includes/upload/UploadBase.php (modified) (history)
  • /trunk/phase3/includes/upload/UploadFromUrl.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/upload/UploadFromUrl.php
@@ -62,7 +62,7 @@
6363 return $this->initialize(
6464 $desiredDestName,
6565 $request->getVal( 'wpUploadFileURL' ),
66 - $asyncdownload = false
 66+ false
6767 );
6868 }
6969
Index: trunk/phase3/includes/upload/UploadBase.php
@@ -66,7 +66,7 @@
6767
6868 $type = ucfirst( $type );
6969 $className = 'UploadFrom' . $type;
70 - wfDebug( __METHOD__ . ": class name: $className" );
 70+ wfDebug( __METHOD__ . ": class name: $className\n" );
7171 if( !in_array( $type, self::$uploadHandlers ) )
7272 return null;
7373
@@ -638,7 +638,7 @@
639639 wfDebug( __METHOD__ . ": checking for embedded scripts and HTML stuff\n" );
640640
641641 #check for HTML doctype
642 - if( eregi( "<!DOCTYPE *X?HTML", $chunk ) )
 642+ if ( preg_match( "/<!DOCTYPE *X?HTML/i", $chunk ) )
643643 return true;
644644
645645 /**
@@ -951,7 +951,7 @@
952952 substr( $partname , 3, 3 ) == 'px-' ||
953953 substr( $partname , 2, 3 ) == 'px-'
954954 ) &&
955 - ereg( "[0-9]{2}" , substr( $partname , 0, 2) );
 955+ preg_match( "/[0-9]{2}/" , substr( $partname , 0, 2 ) );
956956 }
957957
958958 /**

Status & tagging log