Skip to content

Commit

Permalink
we need separate cache file for http/https protocols (our loader cont…
Browse files Browse the repository at this point in the history
…ains full URLs which includes protocol)

git-svn-id: http://www.kaltura.org/kalorg/html5video/trunk/mwEmbed@3727 b58a29cf-3064-46da-94c6-1c29cc75c8e5
  • Loading branch information
Ran Yefet committed Jan 9, 2012
1 parent 7764e3f commit c2e4ef5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mwEmbedLoader.php
Expand Up @@ -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 );
Expand Down

0 comments on commit c2e4ef5

Please sign in to comment.