]> _ Git - cubeextranet.git/commitdiff
wip #5329 @4
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 21 Jun 2022 16:07:15 +0000 (16:07 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 21 Jun 2022 16:07:15 +0000 (16:07 +0000)
inc/config.inc.php
inc/ws/Controlleur/class.ws.maintenance.php
inc/ws/Util/class.ws.util.php
inc/ws/Util/html5/master/class.ws.html5.compiler.php

index ed7b42ef6d907ec0c0fbf32777fc63a35096c381..627e3109b3125e6c5457eb1faa13caaf243bce7d 100644 (file)
@@ -52,7 +52,7 @@ define('JS', JS_PATH);
 define('MINIMIZE_JS', false);
 
 define('JOURNEE', 8);
-define('TAUX_JOURNALIER', 550);
+define('TAUX_JOURNALIER', 600);
 define('AVAILABLE_LANGS', 'fr,en');
 
 // Zend
index 1eca5f90f5cb9368c3cb8114747a35abe2da872c..c3adc66d05b731bd94b8cb3ac8c63f53be986b50 100644 (file)
@@ -1411,10 +1411,10 @@ class wsMaintenance
     {
         $ctx = stream_context_create(array('http' =>
             array(
-                'timeout' => 1,  //1200 Seconds is 20 Minutes
+                'timeout' => 1,
             )
         ));
-        file_get_contents('https://workshop.fluidbook.com/services/facebook_thumbnail?cid=' . $cid . '&j=' . TIME, $ctx);
+        @file_get_contents('https://workshop.fluidbook.com/services/facebook_thumbnail?cid=' . $cid . '&j=' . TIME, true, $ctx);
     }
 
     public static function mergeLangs()
index f74e4af6ce32d492a03da79f521360b51496ab98..7a3928a47d3b5de8a192a014d60ad8ab532b50ca 100644 (file)
@@ -37,7 +37,8 @@ class wsUtil
             $worksheets = json_decode(file_get_contents($cacheFile), true);\r
         } else {\r
             set_time_limit(0);\r
-            include_once ROOT . '/inc/ZendFramework/PHPExcel/PHPExcel.php';\r
+\r
+            require_once ROOT . '/inc/ZendFramework/PHPExcel/PHPExcel.php';\r
             $objReader = PHPExcel_IOFactory::createReader($reader);\r
             if ($reader === 'CSV') {\r
                 $objReader->setDelimiter(';');\r
@@ -55,15 +56,19 @@ class wsUtil
                     $title = cubeCountry::getCountry($title);\r
                 }\r
 \r
+                $a = self::worksheetToArray($worksheet);\r
                 if ($assoc) {\r
-                    $worksheets[$title] = self::_assocSheet(self::worksheetToArray($worksheet));\r
+                    $worksheets[$title] = self::_assocSheet($a);\r
                 } else {\r
-                    $worksheets[$title] = self::worksheetToArray($worksheet);\r
+                    $worksheets[$title] = $a;\r
                 }\r
             }\r
+\r
+\r
             file_put_contents($cacheFile, json_encode($worksheets));\r
         }\r
 \r
+\r
         return $worksheets;\r
     }\r
 \r
@@ -73,7 +78,13 @@ class wsUtil
      */\r
     public static function worksheetToArray($worksheet)\r
     {\r
-        $w = $worksheet->toArray(null, true, true);\r
+\r
+        try {\r
+            $w = $worksheet->toArray(null, true, true);\r
+        }catch (Exception $e){\r
+            die($e->getMessage());\r
+        }\r
+\r
         $res = [];\r
         foreach ($w as $line) {\r
             $empty = true;\r
@@ -149,7 +160,6 @@ class wsUtil
 \r
     public static function excelToArrayKeyVars($excelFile, $reader = 'Excel2007', $skipEmptyId = false)\r
     {\r
-        global $core;\r
 \r
         $e = explode('#', $excelFile);\r
         $excelFile = $e[0];\r
@@ -160,7 +170,6 @@ class wsUtil
             $sheetName = trim($e[1]);\r
         }\r
 \r
-\r
         if (isset($sheetName, $worksheets[$sheetName])) {\r
             $worksheet = $worksheets[$sheetName];\r
         } else {\r
@@ -184,7 +193,7 @@ class wsUtil
                 }\r
                 $r = [];\r
                 foreach ($vars as $j => $varname) {\r
-                    if(!trim($varname)){\r
+                    if (!trim($varname)) {\r
                         continue;\r
                     }\r
                     $r[$varname] = trim($line[$j]);\r
index 0151d4bcc0c72394b6144cc8cec986169b2df17e..b4f8247a552cf91114b450d40e2603f5ad945187 100644 (file)
@@ -304,7 +304,6 @@ class wsHTML5Compiler
         }
         $this->themeRoot = WS_FILES . '/themes3/' . $this->theme->theme_id . '/';
 
-
         $daoDoc = new wsDAODocument($core->con);
         $firstDoc = $daoDoc->selectById($this->pages[1]['document_id']);
         $firstDoc->checkInfos();
@@ -1098,6 +1097,7 @@ class wsHTML5Compiler
         }
 
         if ($this->book->parametres->tagcommander_id) {
+
             $id = $this->book->parametres->tagcommander_id;
             if (!$this->book->parametres->tagcommander_prod) {
                 $id .= '/uat';
@@ -1114,7 +1114,9 @@ class wsHTML5Compiler
             }
 
             if ($this->book->parametres->tagcommander_plan) {
-                $plan = wsUtil::excelToArrayKeyVars($this->_wdirOrAbsolute($this->book->parametres->tagcommander_plan));
+                $planPath = $this->_wdirOrAbsolute($this->book->parametres->tagcommander_plan);
+
+                $plan = wsUtil::excelToArrayKeyVars($planPath);
                 $fixedplan = [];
                 foreach ($plan as $k => $v) {
                     $e = explode('#', $k);
@@ -3040,6 +3042,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
         $this->lessVariables['menu-select-text'] = wsHTML5::colorToCSS($this->theme->parametres->subTextSelectColor);
         $this->lessVariables['icon-color'] = wsHTML5::colorToCSS($this->theme->parametres->couleurI);
         $this->lessVariables['menu-overlay'] = wsHTML5::colorToCSS($this->theme->parametres->popupVideoOverlay);
+
         $this->log('CSS 10');
         // Chapters
         $this->lessVariables['menu-chapters-columns-count'] = max(1, min(6, $this->book->parametres->chaptersColumns));