From: vincent@cubedesigners.com Date: Tue, 25 Jan 2011 18:35:41 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6a674623ee489029aa5cba2993516b10e4ced8f0;p=cubeextranet.git --- diff --git a/inc/config.inc.php b/inc/config.inc.php index cc3e87f15..002432942 100644 --- a/inc/config.inc.php +++ b/inc/config.inc.php @@ -13,9 +13,9 @@ define('FONT_PATH', ROOT . '/fluidbook/fonts/'); define('FTPROOT', '/home/extranet/ftp/'); define('DEV', false); define('WINDOWS', false); -define('CONVERTER_PATH', '/bin:/usr/bin:/usr/local/bin:/home/extranet/dev/fluidbook/tools'); -define('MXMLC_PATH', '/usr/local/bin/mxmlc'); -define('AS3_SOURCES', '/home/ws/sources'); +define('CONVERTER_PATH', '/bin:/usr/bin:/usr/local/bin:/home/extranet/dev/fluidbook/tools:/usr/local/flex'); +define('MXMLC_PATH', '/usr/local/flex/bin/mxmlc'); +define('AS3_SOURCES', '/home/ws/sources/as3'); if ($dev) { // Définition de la configuration sur l'environnement de développement diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index 1fcecfe97..d3766617f 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -375,7 +375,7 @@ html{height:100%}' . "\n"; $dao = new wsDAOBook($core->con); header('Content-type: text/plain'); ob_clean(); - echo $dao->compile($args[1], 3, false); + echo $dao->compile($args[1], 3, isset($args[2])); exit; } diff --git a/inc/ws/Metier/class.ws.document.php b/inc/ws/Metier/class.ws.document.php index a5061372a..33361c30f 100644 --- a/inc/ws/Metier/class.ws.document.php +++ b/inc/ws/Metier/class.ws.document.php @@ -70,8 +70,8 @@ class wsDocument extends cubeMetier { $this->common_log_pointer = fopen($this->log . '/commons.log', 'a'); $this->pages_log_pointers = array(); - if(is_null($this->conversionInfos)){ - $this->conversionInfos=new wsDocumentConversionInfos(); + if (is_null($this->conversionInfos)) { + $this->conversionInfos = new wsDocumentConversionInfos(); } } @@ -120,6 +120,9 @@ class wsDocument extends cubeMetier { // Vérifie si la cropbox et la trimbox sont identiques pour toutes les pages $difference = false; foreach($this->generalInfos['page'] as $page => $infos) { + if (!isset($infos['crop']) || !isset($infos['crop'])) { + continue; + } if ($infos['crop'] != $infos['trim']) { $difference = true; } @@ -189,8 +192,10 @@ class wsDocument extends cubeMetier { // bookmarks // Init arrays $this->generalInfos = array(); + $this->generalInfos['size'] = array(0, 0); $this->bookmarks = array(); $this->numberSections = ''; + $bookmark_id = 0; $res['size'] = array(0, 0); $lines = explode("\n", $data); @@ -198,9 +203,16 @@ class wsDocument extends cubeMetier { $line = trim(cubeText::condenseWhite($line)); $e = explode(':', $line, 2); $k = trim($e[0]); + if (count($e) < 2) { + continue; + } $v = trim($e[1]); if ($k == 'Pages' || $k == 'NumberOfPages') { $this->pages = $this->generalInfos['pages'] = $v; + $this->generalInfos['page'] = array(); + for($i = 1;$i <= $this->pages;$i++) { + $this->generalInfos['page'][$i] = array(); + } } elseif (preg_match('|Page ([0-9]+) (.*)Box: ([0-9.]*) ([0-9.]*) ([0-9.]*) ([0-9.]*)|iu', $line, $m)) { $this->generalInfos['page'][$m[1]][strtolower($m[2])] = new wsBox($m[3], $m[4], $m[5], $m[6]); } elseif (preg_match('|Page ([0-9]+) size: ([0-9.]*) pts x ([0-9.]*) pts|iu', $line, $m)) { @@ -377,6 +389,7 @@ class wsDocument extends cubeMetier { public function makeShot($page , $prefix = '', $resolution = 72, $quality = 90, $antialiasing = 4, $method = 'GS', $in = null) { + $error = false; if (is_null($in)) { $in = $this->cropped; }