From: Vincent Vanwaelscappel Date: Mon, 6 Mar 2023 15:30:22 +0000 (+0100) Subject: wip #5776 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=7dd3fb7684c68b9f16ced48f80d4107267d73082;p=cubist_util.git wip #5776 @0.5 --- diff --git a/src/Animations/OAMAnimation.php b/src/Animations/OAMAnimation.php index 0f0b4cc..2f755fe 100644 --- a/src/Animations/OAMAnimation.php +++ b/src/Animations/OAMAnimation.php @@ -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 diff --git a/src/Animations/ZipAnimation.php b/src/Animations/ZipAnimation.php index 2f50773..7fc15e9 100644 --- a/src/Animations/ZipAnimation.php +++ b/src/Animations/ZipAnimation.php @@ -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; } }