From: vincent@cubedesigners.com Date: Thu, 24 Feb 2011 19:07:03 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=b265857c3a15c6d802e3079fa59c6e6623dd5733;p=cubeextranet.git --- diff --git a/inc/config.inc.php b/inc/config.inc.php index 99ca60267..78e62e52f 100644 --- a/inc/config.inc.php +++ b/inc/config.inc.php @@ -66,7 +66,7 @@ define('WORKER_PREFIX', 'worker.'); define('CACHE', ROOT . '/cache'); -define('SESSION_LIFETIME', 3600 * 10); +define('SESSION_LIFETIME', 3600 * 24 * 10); define('L10N', dirname(__FILE__) . '/../l10n'); define('JS_PATH', WEBROOT . '/js'); diff --git a/inc/ws/Metier/class.ws.document.php b/inc/ws/Metier/class.ws.document.php index 7227e37a7..6f121e4f9 100644 --- a/inc/ws/Metier/class.ws.document.php +++ b/inc/ws/Metier/class.ws.document.php @@ -44,6 +44,7 @@ class wsDocument extends cubeMetier { const BITMAP = 3; const BARBARE_PNM = 4; const BARBARE_GS = 5; + const MAX = 5; const PNM_FILL = 2; @@ -305,6 +306,10 @@ class wsDocument extends cubeMetier { { // $this->makeRealShot($page); if ($force) { + if ($page % 100 == 0) { + sleep(10); + } + $this->addToLog('Processing page #' . $page); $this->makeMiniShot($page); $this->makeSWFFiles($page); @@ -482,6 +487,7 @@ class wsDocument extends cubeMetier { $this->addToLog($pdftoppm, true, $page); $jpegfile = $this->out . $prefix . $page . '.jpg'; + $ppmjpgfile = $this->out . 'ppm-' . cubeMath::fill($page, strlen((string)$this->pages)) . '.jpg'; if (file_exists($ppmjpgfile)) { rename($ppmjpgfile, $jpegfile); @@ -552,6 +558,9 @@ class wsDocument extends cubeMetier { } if (!$written || $overflow || $overflowObjects) { + if ($method == self::MAX) { + return; + } return $this->makeSWFFiles($page, $resolution, $quality, $storeAllChars, $maxObjects, $method + 1); } }