From 48c3617df1bd6321d8cc2e2d3c34de6ffbd7ae0e Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Tue, 19 Mar 2013 12:56:10 +0000 Subject: [PATCH] --- inc/ws/Controlleur/class.ws.ajax.php | 1 + inc/ws/Controlleur/class.ws.url.php | 2 +- inc/ws/DAO/class.ws.dao.document.php | 8 +++++++- inc/ws/Metier/class.ws.book.parametres.php | 5 +++-- inc/ws/Util/class.ws.links.php | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/inc/ws/Controlleur/class.ws.ajax.php b/inc/ws/Controlleur/class.ws.ajax.php index 50508258b..6aa2cb0d0 100644 --- a/inc/ws/Controlleur/class.ws.ajax.php +++ b/inc/ws/Controlleur/class.ws.ajax.php @@ -878,6 +878,7 @@ class wsAjax extends cubeAjax { if ($book_id < 10000) { $dao->setLinksFromOldFluidbook($book_id); } else { + fb($book_id); $dao->setFluidbookLinksFromCSV($book_id); } return; diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index c03469e24..5d93dae08 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -777,7 +777,7 @@ html{height:100%}' . "\n"; $res.='
'; $res.='

' . __('Réimporter les liens du fichier PDF') . '

'; - $res.='Restaurer'; + $res.='Restaurer'; $res.='
'; $res.='

' . __('Historique') . '

'; diff --git a/inc/ws/DAO/class.ws.dao.document.php b/inc/ws/DAO/class.ws.dao.document.php index c4a46c11a..1de7b546c 100644 --- a/inc/ws/DAO/class.ws.dao.document.php +++ b/inc/ws/DAO/class.ws.dao.document.php @@ -67,6 +67,8 @@ class wsDAODocument extends commonDAO { continue; } + $newformat = (filemtime($csv) > 1363685416); + $log[] = 'Links file of page ' . $page . ' found'; @@ -83,7 +85,11 @@ class wsDAODocument extends commonDAO { continue; } $link = array(); - $cols = array('page' => '', 'type' => '', 'to' => '', 'left' => '', 'top' => '', 'width' => '', 'height' => '', 'target' => '_blank', 'video_loop' => true, 'video_auto_start' => true, 'video_controls' => true, 'video_sound_on' => true, 'infobulle' => '', 'numerotation' => 'physical'); + if ($newformat) { + $cols = array('page' => '', 'left' => '', 'top' => '', 'width' => '', 'height' => '', 'type' => '', 'to' => '', 'target' => '_blank', 'video_loop' => true, 'video_auto_start' => true, 'video_controls' => true, 'video_sound_on' => true, 'infobulle' => '', 'numerotation' => 'physical'); + } else { + $cols = array('page' => '', 'type' => '', 'to' => '', 'left' => '', 'top' => '', 'width' => '', 'height' => '', 'target' => '_blank', 'video_loop' => true, 'video_auto_start' => true, 'video_controls' => true, 'video_sound_on' => true, 'infobulle' => '', 'numerotation' => 'physical'); + } $k = 0; foreach ($cols as $col => $default) { if (isset($line[$k])) { diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index 50c83faf7..b2a03508a 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -215,6 +215,7 @@ class wsBookParametres extends wsParametres { $this->fields['customLinkClass'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Classe pour les liens personnalisés'), 'grade' => 5); $this->fields['permanentLinks'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Liens visibles en permanence'), 'grade' => 3); + $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['linkBlinkTime'] = array('type' => 'float', 'default' => 1.0, 'editable' => true, 'label' => __("Temps d'apparition du lien à l'ouverture de la page (en secondes)")); $this->fields['linkTooltipManager'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __("Gestionnaire des info-bulles"), 'grade' => 5); $this->fields['linkTracker'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Tracking des liens'), 'grade' => 5); @@ -225,7 +226,7 @@ class wsBookParametres extends wsParametres { $this->fields['videoReset'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Réinitialiser les vidéos après la lecture'), 'grade' => 3); $this->fields['videoBigPlay'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Afficher le gros bouton Play'), 'grade' => 3); $this->forms['multimedia'] = array('label' => __('Liens et multimédia'), - 'fieldsnames' => array('permanentLinks', 'linkBlinkTime', 'customLinkClass', 'linkTooltipManager', 'linkCornerSize', '|', 'linkTracker', 'linkTrackerRegexp', '|', 'linkMultimediaPerformanceMode', 'linkMultimediaQuality', '|', 'videoReset', 'videoBigPlay')); + 'fieldsnames' => array('permanentLinks', 'linkBlinkTime', 'customLinkClass','ignoreLinksTypes', 'linkTooltipManager', 'linkCornerSize', '|', 'linkTracker', 'linkTrackerRegexp', '|', 'linkMultimediaPerformanceMode', 'linkMultimediaQuality', '|', 'videoReset', 'videoBigPlay')); //. $this->fields['externalArchives'] = array('type' => 'freefile', 'default' => '', 'editable' => true, 'label' => __('Archives'), 'grade' => 3, 'fileFilter' => $swfFilter); @@ -339,7 +340,7 @@ class wsBookParametres extends wsParametres { $this->forms['v1'] = array('label' => __('Options spécifiques au fluidbook version 1'), 'fieldsnames' => array('extras', 'v1SWF')); - $this->fields['themeEnableAfterSearch'] = array('type' => 'boolean', 'default' => true,'editable'=>true, 'label' => __("Afficher l'image supplémentaire à droite du moteur de recherche"), 'grade' => 3); + $this->fields['themeEnableAfterSearch'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __("Afficher l'image supplémentaire à droite du moteur de recherche"), 'grade' => 3); $this->forms['theme'] = array('label' => __('Options du thème'), 'fieldsnames' => array('themeEnableAfterSearch')); diff --git a/inc/ws/Util/class.ws.links.php b/inc/ws/Util/class.ws.links.php index 65aba188c..fa82a2710 100644 --- a/inc/ws/Util/class.ws.links.php +++ b/inc/ws/Util/class.ws.links.php @@ -128,7 +128,7 @@ class wsLinks { $c->user = $user; $c->update = $time; $c->insert(); - + $core->con->execute('DELETE FROM document_links WHERE document_id=' . $document_id); $c1->insert(); } -- 2.39.5