]> _ Git - cubeextranet.git/commitdiff
wait #4343 @0.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 11 Mar 2021 13:28:14 +0000 (13:28 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 11 Mar 2021 13:28:14 +0000 (13:28 +0000)
inc/ws/Util/html5/master/class.ws.html5.links.php

index 268d2a0b24dd94bc601c2ab1343cca6dc7327b2f..ac2f330a1341d187ef1c32565a370b7f1c8c5644 100644 (file)
@@ -2688,16 +2688,17 @@ class iframeLink extends wsHTML5Link
      */
     public static function _handleFile($link)
     {
-        if (!CubeIT_Util_Url::isDistant($link->to)) {
-            $e = explode('.', $link->to);
+        $to=preg_replace('/^data\/links\//','',$link->to);
+        if (!CubeIT_Util_Url::isDistant($to)) {
+            $e = explode('.', $to);
             $ext = array_pop($e);
             if ($ext === 'oam' || $ext === 'zip') {
                 if ($ext === 'oam') {
-                    $d = $link->unzipFile($link->to, true);
+                    $d = $link->unzipFile($to, true);
                     $config = $link->getConfigOAM($d['dir']);
                     $link->copyExternalDir($d['dir'], $d['fdir']);
                 } else if ($ext === 'zip') {
-                    $d = $link->unzipFile($link->to, false);
+                    $d = $link->unzipFile($to, false);
                     $config = $link->getConfigZip($d['dir']);
                     $link->copyExternalDir($d['dir'], $d['fdir']);
                 }
@@ -2706,12 +2707,12 @@ class iframeLink extends wsHTML5Link
                 }
             } else {
                 $link->_defaultTooltip = 'click to open the file';
-                $link->copyExternalFile($link->to);
-                return wsHTML5Link::getUniversalLocation($link->to);
+                $link->copyExternalFile($to);
+                return wsHTML5Link::getUniversalLocation($to);
             }
         }
 
-        return $link->to;
+        return $to;
     }
 }