From c2e4ef5378a4d33c7888754aecc4c319e4f1fbd2 Mon Sep 17 00:00:00 2001 From: Ran Yefet Date: Mon, 9 Jan 2012 13:51:27 +0000 Subject: [PATCH] we need separate cache file for http/https protocols (our loader contains full URLs which includes protocol) git-svn-id: http://www.kaltura.org/kalorg/html5video/trunk/mwEmbed@3727 b58a29cf-3064-46da-94c6-1c29cc75c8e5 --- mwEmbedLoader.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mwEmbedLoader.php b/mwEmbedLoader.php index 5581857e5a..9164d7fbc1 100644 --- a/mwEmbedLoader.php +++ b/mwEmbedLoader.php @@ -71,13 +71,13 @@ mkdir( $wgScriptCacheDirectory ); } - $loaderCacheFile = $wgScriptCacheDirectory . '/loader.min.' . $wgMwEmbedVersion . '.js'; + $loaderCacheFile = $wgScriptCacheDirectory . '/loader_' . $wgHTTPProtocol . '.min.' . $wgMwEmbedVersion . '.js'; $javascriptModTime = @filemtime( 'mwEmbedLoader.js' ); $cacheModTime = @filemtime( $loaderCacheFile ); // check if there were any updates to the mwEmbedLoader file - if( is_file( $loaderCacheFile ) && $javascriptModTime < $cacheModTime && $loaderCacheFile && is_file( $loaderCacheFile ) ){ + if( is_file( $loaderCacheFile ) && $javascriptModTime < $cacheModTime ){ echo file_get_contents( $loaderCacheFile ); } else { $loaderMin = JSMin::minify( $loaderJs );