From: vincent@cubedesigners.com Date: Wed, 17 Jul 2013 09:31:29 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=95aeb316237a41106dc542dc08ef79b4c9da869e;p=cubeextranet.git --- diff --git a/inc/ws/Util/html5/class.ws.html5.links.php b/inc/ws/Util/html5/class.ws.html5.links.php index c66544003..da42a9d3b 100644 --- a/inc/ws/Util/html5/class.ws.html5.links.php +++ b/inc/ws/Util/html5/class.ws.html5.links.php @@ -466,16 +466,26 @@ class htmlMultimediaLink extends wsHTML5Link { } protected function _correctFiles($dir) { - - $preloadFile = $d['dir'] . '/' . $this->_config['name'] . '_edgePreload.js'; - $preload = file_get_contents($preloadFile); - $preload = str_replace('load:"', 'load:"data/links/' . $this->to . '/', $preload); - file_put_contents($preloadFile, $preload); + $files = CubeIT_Files::getRecursiveDirectoryIterator($dir); + foreach ($files as $f) { + /* @var $f SplFileInfo */ + if ($f->getExtension() == 'js') { + $this->_correctFile($f); + } + } } + /** + * + * @param SplFileInfo $file + */ protected function _correctFile($file) { + $d = 'data/links/' . $this->to . '/'; $content = file_get_contents($file); - + foreach ($this->_config['assets'] as $a) { + $content = str_replace($a, $d . $a, $content); + } + $content = str_replace("='images/';", "='$d"."images/';",$content); file_put_contents($file, $content); }