From: vincent@cubedesigners.com Date: Mon, 15 Mar 2021 19:41:45 +0000 (+0000) Subject: wip #4346 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=f31c8887b8235296754d07045c12cdcb21da6f14;p=cubeextranet.git wip #4346 @0.5 --- diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index f6aa47be3..6acbeda4c 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -491,7 +491,7 @@ class wsBookParametres extends wsParametres 'fieldsnames' => ['tabsHTML5', 'tabsPages', 'tabsSections', 'tabsPagesNumbers', '|', 'tabsSide', 'tabsMargin', '|', 'tabsHideOnPages', 'tabsHideOnCover', 'tabsHideOnLastPage', 'tabsHideEdges', '|', 'tabsPriority', 'tabsLinkWidth', 'tabsHideWhenOverlapingArrows', 'tabsHideOnPortrait', 'tabsHideOnZoom']]; /*** **/ - + $this->fields['linksAssets'] = ['type' => 'freefile', 'label' => __('Charger ou remplacer des fichiers de liens'), 'default' => '', 'editable' => true, 'grade' => 3, 'multiple' => true]; $this->fields['customLinkClass'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Classe pour les liens personnalisés'), 'grade' => 5); $this->fields['ignoreLinksTypes'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Ignorer les liens de type'), 'hint' => __('Liste des numéros séparés par des virgules'), 'grade' => 5); $this->fields['mobileLinksRevealAnim'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __("Animer les liens après un changement de page"), 'grade' => 3); @@ -505,7 +505,7 @@ class wsBookParametres extends wsParametres $this->fields['mobileIgnoreBackgroundLinks'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Ignorer les liens de background')); $this->forms['links'] = array('label' => __('Liens'), - 'fieldsnames' => array('permanentLinks', 'mobileLinksRevealAnim', 'linkBlinkTime', 'linkBlinkRepetition', '|', 'openLinkAtStartup', '|', 'customLinkClass', 'ignoreLinksTypes', 'mobileIgnoreBackgroundLinks', 'linkTooltipManager', 'linkCornerSize', 'linkTooltipMaxWidth', '|', 'linkTracker', 'linkTrackerRegexp', '|', 'linkFilePrefix')); + 'fieldsnames' => array('linksAssets', '|', 'permanentLinks', 'mobileLinksRevealAnim', 'linkBlinkTime', 'linkBlinkRepetition', '|', 'openLinkAtStartup', '|', 'customLinkClass', 'ignoreLinksTypes', 'mobileIgnoreBackgroundLinks', 'linkTooltipManager', 'linkCornerSize', 'linkTooltipMaxWidth', '|', 'linkTracker', 'linkTrackerRegexp', '|', 'linkFilePrefix')); //. $this->fields['textPopupStylesheet'] = ['type' => 'freefile', 'default' => '', 'editable' => true, 'label' => __('Feuille de style des popups de texte'), 'fileFilter' => $cssFilter]; diff --git a/inc/ws/Util/class.ws.util.php b/inc/ws/Util/class.ws.util.php index e01544bfb..397f80f5b 100644 --- a/inc/ws/Util/class.ws.util.php +++ b/inc/ws/Util/class.ws.util.php @@ -31,9 +31,9 @@ class wsUtil return array(); } - $cacheFile = $cacheBase . sha1($excelFile . '/' . filemtime($excelFile)); + $cacheFile = $cacheBase . sha1($excelFile . '/' . filemtime($excelFile).'/'.$assoc); - if (!$force && file_exists($cacheFile) && filemtime($cacheFile) > filemtime($excelFile) && !$assoc) { + if (!$force && file_exists($cacheFile) && filemtime($cacheFile) > filemtime($excelFile)) { $worksheets = json_decode(file_get_contents($cacheFile), true); } else { set_time_limit(0); @@ -44,11 +44,14 @@ class wsUtil } $objPHPExcel = $objReader->load($excelFile); + + foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) { if ($worksheet->getSheetState() != PHPExcel_Worksheet::SHEETSTATE_VISIBLE) { continue; } $title = $worksheet->getTitle(); + if (strlen($title) == 2 && cubeCountry::getCountry($title)) { $title = cubeCountry::getCountry($title); } @@ -112,9 +115,9 @@ class wsUtil return $res; } - public static function excelToArrayKeyValMulti($excelFile, $reader = 'Excel2007') + public static function excelToArrayKeyValMulti($excelFile, $reader = 'Excel2007', $force = false) { - $worksheets = self::excelToArray($excelFile, false, $reader); + $worksheets = self::excelToArray($excelFile, false, $reader, $force); $res = []; foreach ($worksheets as $worksheet) { foreach ($worksheet as $line) { 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 ac2f330a1..93a02c80d 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -575,6 +575,7 @@ class wsHTML5Link $datas = parse_url($loc); if ((isset($datas['scheme']) && !is_null($datas['scheme'])) || strpos($loc, '#') === 0) { + return $loc; } else { if ($css) {