From 8fad03316a568887a83722bc6f6b6e59f97553f0 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Thu, 11 Mar 2021 13:28:14 +0000 Subject: [PATCH] wait #4343 @0.5 --- inc/ws/Util/html5/master/class.ws.html5.links.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/inc/ws/Util/html5/master/class.ws.html5.links.php b/inc/ws/Util/html5/master/class.ws.html5.links.php index 268d2a0b2..ac2f330a1 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -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; } } -- 2.39.5