]> _ Git - fluidbook_tools.git/commitdiff
wait #7158 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 28 Oct 2024 12:18:47 +0000 (13:18 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 28 Oct 2024 12:18:47 +0000 (13:18 +0100)
src/Compiler/CompilerInterface.php
src/Links/IFrameLink.php
src/Links/Link.php

index 6f13d20a8bce655b4ab5bc6321d2827bb62acfbc..ae1d84788df3becee2ab3528856a95d46eec1cfb 100644 (file)
@@ -14,7 +14,7 @@ interface CompilerInterface
 
     public function addBookmarkGroup($link);
 
-    public function getConfigZIP($d);
+    public function getConfigZIP($d, $file = null, $uid = null, $page = null);
 
     public function getSetting($key, $default = null);
 
index 64e1ca0e3a191c37933660fa8d6e06fcdf32c323..036ad5845fccf67dafaac17843b472b0c61851a6 100644 (file)
@@ -17,7 +17,11 @@ class IFrameLink extends Link
 
     function getHTMLContent()
     {
-        return '<iframe src="' . self::_handleFile($this) . '" width="100%" height="100%" frameborder="0" marginwidth="0" marginheight="0" data-scale="' . $this->scale . '" scrolling="' . $this->scrolling . '" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
+        $f = self::_handleFile($this);
+        if (null === $f) {
+            return '';
+        }
+        return '<iframe src="' . $f . '" width="100%" height="100%" frameborder="0" marginwidth="0" marginheight="0" data-scale="' . $this->scale . '" scrolling="' . $this->scrolling . '" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
     }
 
     /**
@@ -39,6 +43,9 @@ class IFrameLink extends Link
                     $config = $link->getConfigZip($d['dir']);
                     $link->copyExternalDir($d['dir'], $d['fdir']);
                 }
+                if (null === $config) {
+                    return null;
+                }
                 if ($config['html']) {
                     return $d['fdir'] . '/' . $config['html'];
                 }
index 620a986f41e1fac79774c4f52696de2391022376..5504939f020c7c4f68b1c8a38857b4a8290953a2 100644 (file)
@@ -857,7 +857,7 @@ class Link
 
     public function getConfigZIP($d)
     {
-        return $this->compiler->getConfigZIP($d);
+        return $this->compiler->getConfigZIP($d, $this->to, $this->uid, $this->page);
     }
 
     public function getConfigHTML($d, $html)