From: Vincent Vanwaelscappel Date: Wed, 4 Sep 2024 07:41:56 +0000 (+0200) Subject: wip #6998 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=73bb6cce228abe2b557339799fa21059d271f516;p=fluidbook_tools.git wip #6998 @0.25 --- diff --git a/src/Links/HTMLMultimediaLink.php b/src/Links/HTMLMultimediaLink.php index d290d2d..94a044a 100644 --- a/src/Links/HTMLMultimediaLink.php +++ b/src/Links/HTMLMultimediaLink.php @@ -82,15 +82,18 @@ class HTMLMultimediaLink extends Link // ob_end_clean(); // $this->compiler->log("##### Multimedia Link getHTMLContent ID: {$this->id} | {$this->to} ######\n\n!!!! BACKTRACE !!!!!\n$trace\n===============\n"); - foreach ($this->_config['inject'] as $i) { - $infos = ['path' => 'data/links/' . str_replace('.', '_', $this->to) . '/']; - $i = str_replace('$id', '"#l_' . $this->id . '"', $i); - $i = str_replace('$path', '"' . $infos['path'] . '"', $i); - $i = str_replace('$init', Json::encode($infos), $i); - // Key the array with the ID so we don't get duplicates even when this function is called multiple times - $this->compiler->HTMLMultimedia[$this->id] = $i; + if(isset($this->_config['inject'])) { + foreach ($this->_config['inject'] as $i) { + $infos = ['path' => 'data/links/' . str_replace('.', '_', $this->to) . '/']; + $i = str_replace('$id', '"#l_' . $this->id . '"', $i); + $i = str_replace('$path', '"' . $infos['path'] . '"', $i); + $i = str_replace('$init', Json::encode($infos), $i); + // Key the array with the ID so we don't get duplicates even when this function is called multiple times + $this->compiler->HTMLMultimedia[$this->id] = $i; + } } + if (isset($this->_config['injectcss'])) { foreach ($this->_config['injectcss'] as $i) {