]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 25 Jan 2011 18:35:41 +0000 (18:35 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 25 Jan 2011 18:35:41 +0000 (18:35 +0000)
inc/config.inc.php
inc/ws/Controlleur/class.ws.url.php
inc/ws/Metier/class.ws.document.php

index cc3e87f1599b9d28b85066a491ea3eefe86f94b6..002432942ae11fd9c8efa20cece75779337a6bb2 100644 (file)
@@ -13,9 +13,9 @@ define('FONT_PATH', ROOT . '/fluidbook/fonts/');
 define('FTPROOT', '/home/extranet/ftp/');\r
 define('DEV', false);\r
 define('WINDOWS', false);\r
-define('CONVERTER_PATH', '/bin:/usr/bin:/usr/local/bin:/home/extranet/dev/fluidbook/tools');\r
-define('MXMLC_PATH', '/usr/local/bin/mxmlc');\r
-define('AS3_SOURCES', '/home/ws/sources');\r
+define('CONVERTER_PATH', '/bin:/usr/bin:/usr/local/bin:/home/extranet/dev/fluidbook/tools:/usr/local/flex');\r
+define('MXMLC_PATH', '/usr/local/flex/bin/mxmlc');\r
+define('AS3_SOURCES', '/home/ws/sources/as3');\r
 \r
 if ($dev) {\r
        // Définition de la configuration sur l'environnement de développement\r
index 1fcecfe97481565f4053f412066123a1c37ab7ab..d3766617fe427e53bd4f79da3179273a751d0552 100644 (file)
@@ -375,7 +375,7 @@ html{height:100%}' . "\n";
                $dao = new wsDAOBook($core->con);\r
                header('Content-type: text/plain');\r
                ob_clean();\r
-               echo $dao->compile($args[1], 3, false);\r
+               echo $dao->compile($args[1], 3, isset($args[2]));\r
                exit;\r
        }\r
 \r
index a5061372a809731b27d81cc1ac9cdd7263245088..33361c30f32e382ae5056a12ae896b5996aaf928 100644 (file)
@@ -70,8 +70,8 @@ class wsDocument extends cubeMetier {
                $this->common_log_pointer = fopen($this->log . '/commons.log', 'a');\r
                $this->pages_log_pointers = array();\r
 \r
-               if(is_null($this->conversionInfos)){\r
-                       $this->conversionInfos=new wsDocumentConversionInfos();\r
+               if (is_null($this->conversionInfos)) {\r
+                       $this->conversionInfos = new wsDocumentConversionInfos();\r
                }\r
        }\r
 \r
@@ -120,6 +120,9 @@ class wsDocument extends cubeMetier {
                // Vérifie si la cropbox et la trimbox sont identiques pour toutes les pages\r
                $difference = false;\r
                foreach($this->generalInfos['page'] as $page => $infos) {\r
+                       if (!isset($infos['crop']) || !isset($infos['crop'])) {\r
+                               continue;\r
+                       }\r
                        if ($infos['crop'] != $infos['trim']) {\r
                                $difference = true;\r
                        }\r
@@ -189,8 +192,10 @@ class wsDocument extends cubeMetier {
                // bookmarks\r
                // Init arrays\r
                $this->generalInfos = array();\r
+               $this->generalInfos['size'] = array(0, 0);\r
                $this->bookmarks = array();\r
                $this->numberSections = '';\r
+               $bookmark_id = 0;\r
 \r
                $res['size'] = array(0, 0);\r
                $lines = explode("\n", $data);\r
@@ -198,9 +203,16 @@ class wsDocument extends cubeMetier {
                        $line = trim(cubeText::condenseWhite($line));\r
                        $e = explode(':', $line, 2);\r
                        $k = trim($e[0]);\r
+                       if (count($e) < 2) {\r
+                               continue;\r
+                       }\r
                        $v = trim($e[1]);\r
                        if ($k == 'Pages' || $k == 'NumberOfPages') {\r
                                $this->pages = $this->generalInfos['pages'] = $v;\r
+                               $this->generalInfos['page'] = array();\r
+                               for($i = 1;$i <= $this->pages;$i++) {\r
+                                       $this->generalInfos['page'][$i] = array();\r
+                               }\r
                        } elseif (preg_match('|Page ([0-9]+) (.*)Box: ([0-9.]*) ([0-9.]*) ([0-9.]*) ([0-9.]*)|iu', $line, $m)) {\r
                                $this->generalInfos['page'][$m[1]][strtolower($m[2])] = new wsBox($m[3], $m[4], $m[5], $m[6]);\r
                        } elseif (preg_match('|Page ([0-9]+) size: ([0-9.]*) pts x ([0-9.]*) pts|iu', $line, $m)) {\r
@@ -377,6 +389,7 @@ class wsDocument extends cubeMetier {
 \r
        public function makeShot($page , $prefix = '', $resolution = 72, $quality = 90, $antialiasing = 4, $method = 'GS', $in = null)\r
        {\r
+               $error = false;\r
                if (is_null($in)) {\r
                        $in = $this->cropped;\r
                }\r