From cb76163c8346ae46d2f07847ab70d61b1c01f2b8 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Tue, 4 Jan 2011 17:57:30 +0000 Subject: [PATCH] --- inc/ws/Controlleur/class.ws.flash.php | 9 +----- .../class.ws.document.conversioninfos.php | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/inc/ws/Controlleur/class.ws.flash.php b/inc/ws/Controlleur/class.ws.flash.php index 9093e3030..386504b66 100644 --- a/inc/ws/Controlleur/class.ws.flash.php +++ b/inc/ws/Controlleur/class.ws.flash.php @@ -32,14 +32,7 @@ class wsFlash extends cubeFlashGateway { $li->creationDate = $this->args['creationDate']; $li->modificationDate = $this->args['modificationDate']; $data['localInfos'] = $li; - - $ci = new cubeObject(); - $ci->global=new cubeObject(); - $ci->resolution = 150; - $ci->method = wsDocument::NORMAL; - $ci->quality = 85; - - $data['conversionInfos'] = $ci; + $data['conversionInfos'] = new wsDocumentConversionInfos($this->args['resolution'], $this->args['method'], $this->args['quality']); $document = $dao->sauve($data); $document->copyOriginal($infos['tmp_name']); } diff --git a/inc/ws/Metier/class.ws.document.conversioninfos.php b/inc/ws/Metier/class.ws.document.conversioninfos.php index e69de29bb..c6411edd0 100644 --- a/inc/ws/Metier/class.ws.document.conversioninfos.php +++ b/inc/ws/Metier/class.ws.document.conversioninfos.php @@ -0,0 +1,29 @@ +resolution = $resolution; + $this->method = $method; + $this->quality = $quality; + + $this->pages = array(); + } + + public function setPagesNumber($n) + { + // Set defaults + for($i = 1;$i <= $n;$n++) { + if (!isset($this->pages[$i])) { + $this->pages[$i] = new wsDocumentConversionInfos($this->resolution, $this->method, $this->quality); + } + } + } +} + +?> \ No newline at end of file -- 2.39.5