From: Alexandre Emsenhuber Date: Thu, 6 Aug 2009 20:08:54 +0000 (+0000) Subject: * changed egreg_replace to preg_replace, the former is deprecated since PHP 5.3 X-Git-Tag: 1.31.0-rc.0~40457 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=e08e9ad96e01fae0ade88e469f1af22d8468092e;p=lhc%2Fweb%2Fwiklou.git * changed egreg_replace to preg_replace, the former is deprecated since PHP 5.3 * fixed E_NOTICE: undefined variable $subdir --- diff --git a/js2/mwEmbed/jsScriptLoader.php b/js2/mwEmbed/jsScriptLoader.php index e73612f396..97911b1412 100644 --- a/js2/mwEmbed/jsScriptLoader.php +++ b/js2/mwEmbed/jsScriptLoader.php @@ -184,7 +184,7 @@ class jsScriptLoader { continue; } - $reqClass = ereg_replace("[^A-Za-z0-9_\-\.]", '', $reqClass ); + $reqClass = preg_replace("/[^A-Za-z0-9_\-\.]/", '', $reqClass ); if( isset( $wgJSAutoloadLocalClasses[$reqClass] ) ){ $this->jsFileList[$reqClass] = $wgJSAutoloadLocalClasses[$reqClass]; @@ -305,7 +305,7 @@ class simpleFileCache { $hash1 = substr( $hash, 0, 1 ); $hash2 = substr( $hash, 0, 2 ); - $this->mFileCache = "{$wgFileCacheDirectory}/{$subdir}{$hash1}/{$hash2}/{$this->rKey}.js"; + $this->mFileCache = "{$wgFileCacheDirectory}/{$hash1}/{$hash2}/{$this->rKey}.js"; if( $wgUseGzip ) $this->mFileCache .= '.gz';