From: vincent@cubedesigners.com Date: Thu, 30 Jul 2020 18:01:13 +0000 (+0000) Subject: wait #3827 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=f98b3c482beeca70b1c981b1b3d27773930dd8ff;p=cubeextranet.git wait #3827 @0.5 --- diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index 5d94086e0..8652544a0 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -2535,10 +2535,16 @@ class wsHTML5Compiler if ($image === '') { $image = 'articles/' . $file; } - $this->vdir->copy($this->wdir . '/articles/' . $file, 'data/articles/' . $file); + $filepath = $this->wdir . '/articles/' . $file; + $this->vdir->copy($filepath, 'data/articles/' . $file); $legend = (string)$child; $caption = $legend ? '
' . $legend . '
' : ''; - $inner .= '
' . $legend . '' . $caption . '
'; + if (file_exists($filepath)) { + $dim = getimagesize($filepath); + } else { + $dim = [0 => 1024, 1 => 10]; + } + $inner .= '
' . $legend . '' . $caption . '
'; } else { $c = trim($this->SimpleXMLElement_innerXML($child)); if (!$c) { 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 53fb1622a..4942690b4 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -2301,8 +2301,10 @@ class articleLink extends normalLink public function init() { parent::init(); - $this->compiler->config->articlesList[$this->to]['page'] = $this->page; $this->article = $this->compiler->config->articlesList[$this->to]; + if (!isset($this->compiler->config->articlesList[$this->to]['page'])) { + $this->compiler->config->articlesList[$this->to]['page'] = $this->page; + } } public function getURL()