]> _ Git - cubist_util.git/commitdiff
wip #5776 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 6 Mar 2023 15:30:22 +0000 (16:30 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 6 Mar 2023 15:30:22 +0000 (16:30 +0100)
src/Animations/OAMAnimation.php
src/Animations/ZipAnimation.php

index 0f0b4cc6166bf14405ac9e1f668f5413f7e05b85..2f755fe5c42e48a205d77e806fb63cb2c0e3a411 100644 (file)
@@ -3,6 +3,7 @@
 namespace Cubist\Util\Animations;
 
 use Cubist\Util\Files\Files;
+use Cubist\Util\Xml;
 
 class OAMAnimation
 {
@@ -44,9 +45,7 @@ class OAMAnimation
                 $res[$props[$p->_name]] = $p->_defaultValue;
             }
         }
-        preg_match('|/oam/([0-9a-z]+)/$|', $unz, $m);
-        $res['hash'] = $m[1];
-        $res['url'] = '/files/oam/' . $res['hash'] . '/Assets/' . $res['html'];
+        $res['path'] = $unz;
         return $res;
     }
 }
\ No newline at end of file
index 2f5077389ee5da79d486f4eb11893fa7af3fa2cd..7fc15e98d25a1463aa393259b0cbea922aa3796b 100644 (file)
@@ -6,7 +6,7 @@ class ZipAnimation extends OAMAnimation
 {
     public static function getZIPData($src)
     {
-        $unz = self::unzipOAM($src,null, 'zip');
+        $unz = self::unzipOAM($src, null, 'zip');
         $index = $unz . '/index.html';
         if (file_exists($index)) {
             $c = file_get_contents($index);
@@ -17,9 +17,7 @@ class ZipAnimation extends OAMAnimation
                 $res['height'] = $ad['h'];
 
             }
-            preg_match('|/zip/([0-9a-z]+)/$|', $unz, $m);
-            $res['hash'] = $m[1];
-            $res['url'] = '/files/zip/' . $res['hash'] . '/index.html';
+            $res['path'] = $unz;
             return $res;
         }
     }