From: vincent@cubedesigners.com Date: Wed, 7 Mar 2012 11:32:23 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=c0dca5ce17c980dcfd254be80ec290b8515a31e9;p=cubeextranet.git --- diff --git a/inc/ws/DAO/class.ws.dao.book.php b/inc/ws/DAO/class.ws.dao.book.php index 63ace3d40..b9b0cbc38 100644 --- a/inc/ws/DAO/class.ws.dao.book.php +++ b/inc/ws/DAO/class.ws.dao.book.php @@ -395,13 +395,13 @@ class wsDAOBook extends commonDAO { $w[] = 'status IN(' . implode(',', array_keys($this->filtres['status_book'])) . ')'; } if (commonFiltre::test('revendeur_book', $this->filtres)) { - $v=array_keys($this->filtres['revendeur_book']); - $values=array(); - foreach($v as $r){ - $values[]=$this->con->escape($r); + $v = array_keys($this->filtres['revendeur_book']); + $values = array(); + foreach ($v as $r) { + $values[] = $this->con->escape($r); } - - + + $w[] = 'facturable IN(\'' . implode('\',\'', $values) . '\')'; } return implode(' AND ', $w); @@ -773,12 +773,10 @@ class wsDAOBook extends commonDAO { $this->compilePDF($book, $pages); - //$this->indexPDF($book, $pages); if ($book->parametres->mobileVersion != 'pdf') { $this->compileHTML5($book_id); } $this->compileWidget($book, $pages); - $this->touchCompile($book_id); return $res; @@ -1150,7 +1148,13 @@ class wsDAOBook extends commonDAO { } public function compilePDF($book, $pages) { - $finalPDF = WS_BOOKS . '/final/' . $book->book_id . '/data/document.pdf'; + $pdfName = 'document.pdf'; + if (isset($book->parametres->pdfName) && $book->parametres->pdfName != '') { + $pdfName = $book->parametres->pdfName; + } + + + $finalPDF = WS_BOOKS . '/final/' . $book->book_id . '/data/' . $pdfName; if (!$book->parametres->pdf && $book->parametres->mobileVersion != 'pdf') { // Si l'export PDF n'est pas activé on supprime le fichier si il existe diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index 825ab16a8..1f71ea143 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -101,10 +101,11 @@ class wsBookParametres extends wsParametres { 'fieldsnames' => array('preload')); // . $this->fields['pdf'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __("Activer les fonctions de téléchargement")); + $this->fields['pdfName'] = array('type' => 'text', 'default' => 'document.pdf', 'editable' => true, 'label' => __("Nom du fichier PDF")); $this->fields['pdfComplex'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Téchargement de PDF avancé'), "hint" => __("Permet à l'utilisateur de sélectionner les pages qu'il souhaite télécharger"), 'grade' => 3); $this->fields['offlineExport'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Téléchargement des versions offline'), "hint" => __('Valable si le téléchargement avancé est activé'), 'grade' => 3); $this->forms['pdf'] = array('label' => __('Fonction de téléchargement'), - 'fieldsnames' => array('pdf', 'pdfComplex', 'offlineExport')); + 'fieldsnames' => array('pdf','pdfName', 'pdfComplex', 'offlineExport')); // . $this->fields['zoomMode'] = array('type' => 'combo', 'default' => '0', 'editable' => true, 'label' => __("Mode de zoom"), 'grade' => 5, 'datas' => array(__('Normal') => '0', @@ -120,7 +121,7 @@ class wsBookParametres extends wsParametres { $this->fields['googleAnalytics'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Code Google Analytics'), 'size' => 10); $this->fields['googleAnalyticsCustom'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Code Google Analytics personnalisé')); $this->forms['stats'] = array('label' => __('Statistiques'), - 'fieldsnames' => array('stats', 'stats_score', '|', 'googleAnalytics','googleAnalyticsCustom')); + 'fieldsnames' => array('stats', 'stats_score', '|', 'googleAnalytics', 'googleAnalyticsCustom')); // . $swfFilter = new stdClass(); $swfFilter->name = __('Animation SWF') . ' (*.swf)';