From: stephen@cubedesigners.com Date: Thu, 21 Sep 2017 14:43:05 +0000 (+0000) Subject: Latest merge from master + compiler changes for menu icon order. WIP #1676 @0.75 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=0a94cf941477be55ea961ecdc74663fb67ed057a;p=cubeextranet.git Latest merge from master + compiler changes for menu icon order. WIP #1676 @0.75 --- diff --git a/inc/ws/Util/html5/burgermenu/class.ws.html5.compiler.php b/inc/ws/Util/html5/burgermenu/class.ws.html5.compiler.php index cbee4239b..eb4d991e0 100644 --- a/inc/ws/Util/html5/burgermenu/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/burgermenu/class.ws.html5.compiler.php @@ -38,6 +38,7 @@ class wsHTML5Compiler { 'js/libs/fluidbook/fluidbook.viewport.js', 'js/libs/fluidbook/fluidbook.desktop.js', 'js/libs/fluidbook/fluidbook.service.js', + 'js/libs/fluidbook/fluidbook.share.js', 'js/libs/fluidbook/fluidbook.l10n.js', 'js/libs/fluidbook/fluidbook.slider.js', 'js/libs/fluidbook/fluidbook.nav.js', @@ -1027,17 +1028,23 @@ class wsHTML5Compiler { if ($this->phonegap && ($this->book->parametres->offlineLink == '' || $this->book->parametres->offlineLink == 'http://')) { $this->config->share = false; } - $o = trim($this->config->navOrderH) != '' ? $this->config->navOrderH : $this->config->navOrder; - $navOrder = array(); - $oo = explode(',', $o); - foreach ($oo as $ooo) { - $ooo = trim($ooo); - if ($ooo == '') { - continue; - } - $navOrder[] = $ooo; - } - $this->config->navOrder = $navOrder; + + // We need to be able to reference both navOrder and navOrderH so convert both to arrays + // We also make sure there are no empty items in the arrays (see: http://php.net/manual/en/function.array-filter.php#111091) + $this->config->navOrder = array_filter(array_map('trim', explode(',', $this->config->navOrder)), 'strlen'); + $this->config->navOrderH = array_filter(array_map('trim', explode(',', $this->config->navOrderH)), 'strlen'); + +// $o = trim($this->config->navOrderH) != '' ? $this->config->navOrderH : $this->config->navOrder; +// $navOrder = array(); +// $oo = explode(',', $o); +// foreach ($oo as $ooo) { +// $ooo = trim($ooo); +// if ($ooo == '') { +// continue; +// } +// $navOrder[] = $ooo; +// } +// $this->config->navOrder = $navOrder; $this->config->standalone = $this->standalone; if ($this->config->phonegap) { @@ -1497,7 +1504,7 @@ class wsHTML5Compiler { $less->setArg(null, $destination_less); $less->setArg(null, $this->vdir . '/' . $destination_css); $less->execute(); - if(!file_exists($this->vdir . '/' . $destination_css)){ + if (!file_exists($this->vdir . '/' . $destination_css)) { die($less->output); } if ($f != 'widget') {