From 9d5a5a1ca352bcf984c7125c4a75a982f67764c9 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Mon, 24 Jun 2013 16:25:28 +0000 Subject: [PATCH] --- inc/ws/Controlleur/class.ws.flash.php | 10 +++++++++- inc/ws/Controlleur/class.ws.stats.php | 14 +++++++++----- inc/ws/DAO/class.ws.dao.theme.php | 1 - 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/inc/ws/Controlleur/class.ws.flash.php b/inc/ws/Controlleur/class.ws.flash.php index c656e7901..192b6ba32 100644 --- a/inc/ws/Controlleur/class.ws.flash.php +++ b/inc/ws/Controlleur/class.ws.flash.php @@ -489,7 +489,16 @@ class wsFlash extends cubeFlashGateway { $this->json = false; $this->json = true; + $types = array(1, 2, 3, 4, 5, 6, 7, 11, 13, 14, 15, 16, 17); + if (wsDroits::revendeur()) { + $types = array(1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21); + } + if (wsDroits::admin()) { + $types = range(1, 30); + } + if ($this->json) { + $this->jsonDatas['types'] = $types; $this->jsonDatas['pages'] = $nb_pages; $this->jsonDatas['numerotation'] = $book->numerotation; $this->jsonDatas['width'] = $size[0]; @@ -520,7 +529,6 @@ class wsFlash extends cubeFlashGateway { protected function _addSpecialInfos($book, $theme, $param, $specialName) { if ($specialName == 'archives') { $p = $book->parametres; - } else { $p = $theme->parametres; } diff --git a/inc/ws/Controlleur/class.ws.stats.php b/inc/ws/Controlleur/class.ws.stats.php index b7cde88bb..a6bb06cb7 100644 --- a/inc/ws/Controlleur/class.ws.stats.php +++ b/inc/ws/Controlleur/class.ws.stats.php @@ -110,10 +110,14 @@ class wsStats { $res .= commonPage::bMain(); - self::$xls->setActiveSheetIndex(0); - $writer = new PHPExcel_Writer_Excel2007(); - $writer->setPHPExcel(self::$xls); - $writer->save(self::_getXLSFile($bid, $annee, $mois)); + try { + self::$xls->setActiveSheetIndex(0); + $writer = new PHPExcel_Writer_Excel2007(); + $writer->setPHPExcel(self::$xls); + $writer->save(self::_getXLSFile($bid, $annee, $mois)); + } catch (Exception $e) { + + } return $res; } @@ -317,7 +321,7 @@ class wsStats { } $res = ''; // Titre - $res .= ''; + $res .= ''; // Head if (implode('', $colsTitles) != '') { $res .= ''; diff --git a/inc/ws/DAO/class.ws.dao.theme.php b/inc/ws/DAO/class.ws.dao.theme.php index 2d28707ba..4769e5ce6 100644 --- a/inc/ws/DAO/class.ws.dao.theme.php +++ b/inc/ws/DAO/class.ws.dao.theme.php @@ -48,7 +48,6 @@ class wsDAOTheme extends commonDAO { } else { $or = ''; if (wsDroits::revendeur() && !is_null($demos)) { - fb($demos); $or = ' OR theme_id IN(' . implode(',', $demos) . ')'; } $sql = 'SELECT * FROM themes_vue WHERE theme_id IN (SELECT theme FROM books WHERE proprietaire IN(' . $user->ws_rights . ') ' . $or . ')'; -- 2.39.5

' . $title. '

' . $title . '