From: vincent@cubedesigners.com Date: Tue, 21 Jun 2022 16:07:15 +0000 (+0000) Subject: wip #5329 @4 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=861833f0efedc02121eabd7a492d5b2c1df83b2f;p=cubeextranet.git wip #5329 @4 --- diff --git a/inc/config.inc.php b/inc/config.inc.php index ed7b42ef6..627e3109b 100644 --- a/inc/config.inc.php +++ b/inc/config.inc.php @@ -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 diff --git a/inc/ws/Controlleur/class.ws.maintenance.php b/inc/ws/Controlleur/class.ws.maintenance.php index 1eca5f90f..c3adc66d0 100644 --- a/inc/ws/Controlleur/class.ws.maintenance.php +++ b/inc/ws/Controlleur/class.ws.maintenance.php @@ -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() diff --git a/inc/ws/Util/class.ws.util.php b/inc/ws/Util/class.ws.util.php index f74e4af6c..7a3928a47 100644 --- a/inc/ws/Util/class.ws.util.php +++ b/inc/ws/Util/class.ws.util.php @@ -37,7 +37,8 @@ class wsUtil $worksheets = json_decode(file_get_contents($cacheFile), true); } else { set_time_limit(0); - include_once ROOT . '/inc/ZendFramework/PHPExcel/PHPExcel.php'; + + require_once ROOT . '/inc/ZendFramework/PHPExcel/PHPExcel.php'; $objReader = PHPExcel_IOFactory::createReader($reader); if ($reader === 'CSV') { $objReader->setDelimiter(';'); @@ -55,15 +56,19 @@ class wsUtil $title = cubeCountry::getCountry($title); } + $a = self::worksheetToArray($worksheet); if ($assoc) { - $worksheets[$title] = self::_assocSheet(self::worksheetToArray($worksheet)); + $worksheets[$title] = self::_assocSheet($a); } else { - $worksheets[$title] = self::worksheetToArray($worksheet); + $worksheets[$title] = $a; } } + + file_put_contents($cacheFile, json_encode($worksheets)); } + return $worksheets; } @@ -73,7 +78,13 @@ class wsUtil */ public static function worksheetToArray($worksheet) { - $w = $worksheet->toArray(null, true, true); + + try { + $w = $worksheet->toArray(null, true, true); + }catch (Exception $e){ + die($e->getMessage()); + } + $res = []; foreach ($w as $line) { $empty = true; @@ -149,7 +160,6 @@ class wsUtil public static function excelToArrayKeyVars($excelFile, $reader = 'Excel2007', $skipEmptyId = false) { - global $core; $e = explode('#', $excelFile); $excelFile = $e[0]; @@ -160,7 +170,6 @@ class wsUtil $sheetName = trim($e[1]); } - if (isset($sheetName, $worksheets[$sheetName])) { $worksheet = $worksheets[$sheetName]; } else { @@ -184,7 +193,7 @@ class wsUtil } $r = []; foreach ($vars as $j => $varname) { - if(!trim($varname)){ + if (!trim($varname)) { continue; } $r[$varname] = trim($line[$j]); 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 0151d4bcc..b4f8247a5 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -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"> $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));