r54537 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54536‎ | r54537 | r54538 >
Date:20:08, 6 August 2009
Author:ialex
Status:deferred
Tags:
Comment:
* changed egreg_replace to preg_replace, the former is deprecated since PHP 5.3
* fixed E_NOTICE: undefined variable $subdir
Modified paths:
  • /trunk/phase3/js2/mwEmbed/jsScriptLoader.php (modified) (history)

Diff [purge]

Index: trunk/phase3/js2/mwEmbed/jsScriptLoader.php
@@ -184,7 +184,7 @@
185185 continue;
186186 }
187187
188 - $reqClass = ereg_replace("[^A-Za-z0-9_\-\.]", '', $reqClass );
 188+ $reqClass = preg_replace("/[^A-Za-z0-9_\-\.]/", '', $reqClass );
189189
190190 if( isset( $wgJSAutoloadLocalClasses[$reqClass] ) ){
191191 $this->jsFileList[$reqClass] = $wgJSAutoloadLocalClasses[$reqClass];
@@ -305,7 +305,7 @@
306306
307307 $hash1 = substr( $hash, 0, 1 );
308308 $hash2 = substr( $hash, 0, 2 );
309 - $this->mFileCache = "{$wgFileCacheDirectory}/{$subdir}{$hash1}/{$hash2}/{$this->rKey}.js";
 309+ $this->mFileCache = "{$wgFileCacheDirectory}/{$hash1}/{$hash2}/{$this->rKey}.js";
310310
311311 if( $wgUseGzip )
312312 $this->mFileCache .= '.gz';

Status & tagging log