From 5939ff427e2dbf2de84bbd21204f2281fc8d8fea Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Mon, 20 Jun 2011 16:51:55 +0000 Subject: [PATCH] --- inc/ws/Controlleur/class.ws.flash.php | 21 ++++++++++++++++----- inc/ws/Metier/class.ws.book.parametres.php | 6 +++--- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/inc/ws/Controlleur/class.ws.flash.php b/inc/ws/Controlleur/class.ws.flash.php index f1ba71670..e2e9d3b15 100644 --- a/inc/ws/Controlleur/class.ws.flash.php +++ b/inc/ws/Controlleur/class.ws.flash.php @@ -163,8 +163,19 @@ class wsFlash extends cubeFlashGateway { if ($infos['error']) { continue; } + + if (isset($_POST['dir'])) { + $dir = trim($_POST['dir'], '/\\ '); + } else { + $dir = ''; + } + + if ($dir != '') { + $dir = $dir . '/'; + } + $fname = cubeFiles::tidyName($infos['name']); - $dir = WS_BOOKS . '/working/' . $this->args['book_id'] . '/'; + $dir = WS_BOOKS . '/working/' . $this->args['book_id'] . '/' . $dir; if (!file_exists($dir)) { mkdir($dir, 0777, true); } @@ -453,11 +464,11 @@ class wsFlash extends cubeFlashGateway { public function saveLinks() { global $core; - - $comments=isset($this->args['comments'])?$this->args['comments']:'Saved from editor'; - + + $comments = isset($this->args['comments']) ? $this->args['comments'] : 'Saved from editor'; + $dao = new wsDAODocument($core->con); - $dao->setLinksAndRulers($this->args['book_id'], $this->args['links'], $this->args['rulers'],$comments,$core->user->utilisateur_id); + $dao->setLinksAndRulers($this->args['book_id'], $this->args['links'], $this->args['rulers'], $comments, $core->user->utilisateur_id); $daoBook = new wsDAOBook($core->con); $daoBook->setSpecialLinksAndRulers($this->args['book_id'], $this->args['specialLinks'], $this->args['specialRulers']); diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index ef4d10bfc..c15fccf03 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -141,12 +141,12 @@ class wsBookParametres extends wsParametres { $this->fields['basket'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Panier activé'), 'grade' => 5); $this->fields['basketManager'] = array('type' => 'combo', 'default' => 'classic', 'editable' => true, 'label' => __("Manager de panier"), 'datas' => array(__('Classic') => 'com.fluidbook.player.basket.BasketManager', - __('Essilor') => 'com.fluidbook.player.basket.custom.EssilorBasketManager'), 'grade' => 5); + __('Essilor') => 'com.fluidbook.player.basket.custom.essilor.EssilorBasketManager'), 'grade' => 5); $this->fields['basketReferences'] = array('type' => 'freefile', 'default' => '', 'editable' => true, - 'label' => __('Références produits'), 'grade' => 5, 'fileFilter' => $basketFilter, 'hint' => __('Fichier contenant les références produits')); + 'label' => __('Références produits'), 'grade' => 5, 'fileFilter' => $basketFilter, 'hint' => __('Fichier contenant les références produits'),'dir'=>'commerce'); $this->fields['basketImages'] = array('type' => 'freefile', 'default' => '', 'editable' => true, 'label' => __('Images des produits'), 'grade' => 5, 'fileFilter' => $imageFilter, 'hint' => __('Chaque image doit avoir pour nom exact la référence du produit'), - 'multiple' => true); + 'multiple' => true, 'dir' => 'commerce'); $this->forms['basket'] = array('label' => __('Panier'), 'fieldsnames' => array('basket', 'basketManager', 'basketReferences', 'basketImages')); -- 2.39.5