From e08e9ad96e01fae0ade88e469f1af22d8468092e Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Thu, 6 Aug 2009 20:08:54 +0000 Subject: [PATCH] * changed egreg_replace to preg_replace, the former is deprecated since PHP 5.3 * fixed E_NOTICE: undefined variable $subdir --- js2/mwEmbed/jsScriptLoader.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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'; -- 2.20.1