]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 17 Jul 2013 09:31:29 +0000 (09:31 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 17 Jul 2013 09:31:29 +0000 (09:31 +0000)
inc/ws/Util/html5/class.ws.html5.links.php

index c665440030651c2d33f487c0f1441b1ddd01acac..da42a9d3b05e5cdf032dfde7611c37b6df4f8529 100644 (file)
@@ -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);
        }