]> _ Git - cubeextranet.git/commitdiff
Latest merge from master + compiler changes for menu icon order. WIP #1676 @0.75
authorstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 21 Sep 2017 14:43:05 +0000 (14:43 +0000)
committerstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 21 Sep 2017 14:43:05 +0000 (14:43 +0000)
inc/ws/Util/html5/burgermenu/class.ws.html5.compiler.php

index cbee4239b64847d32dcf198da7a3fd605bdf56b9..eb4d991e0ca2d69bc413295f4fb8336e2b97d5fb 100644 (file)
@@ -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') {