From: vincent@cubedesigners.com Date: Thu, 30 May 2013 08:38:10 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=9eaf6f8c925b948ebc56ed204d85c251e087c1cb;p=cubeextranet.git --- diff --git a/inc/ws/Controlleur/class.ws.flash.php b/inc/ws/Controlleur/class.ws.flash.php index 0622ce6ec..c656e7901 100644 --- a/inc/ws/Controlleur/class.ws.flash.php +++ b/inc/ws/Controlleur/class.ws.flash.php @@ -115,7 +115,7 @@ class wsFlash extends cubeFlashGateway { $php->setArg('HTTP_HOST', $_SERVER['HTTP_HOST']); $php->setNohup(true); $php->execute('exec'); - + fb($php->commande); fb($php->output); @@ -510,18 +510,32 @@ class wsFlash extends cubeFlashGateway { $daoTheme = new wsDAOTheme($this->con); $theme = $daoTheme->getThemeOfBook($this->args['book_id'], true); - $specials = array('backgroundImage' => 'background', 'topBar' => 'topbar', 'afterSearch' => 'aftersearch'); + $specials = array('backgroundImage' => 'background', 'topBar' => 'topbar', 'afterSearch' => 'aftersearch', 'externalArchives' => 'archives'); foreach ($specials as $tparam => $sname) { - $this->_addSpecialInfos($theme, $tparam, $sname); + $this->_addSpecialInfos($book, $theme, $tparam, $sname); } } - protected function _addSpecialInfos($theme, $param, $specialName) { - if ($theme->parametres->$param != '') { - $themeRoot = WS_THEMES . '/' . $theme->theme_id . '/'; - $dim = getimagesize($themeRoot . $theme->parametres->$param); - $url = 'http://' . $_SERVER['HTTP_HOST'] . WEBROOT . '/fluidbook/themes/' . $theme->theme_id . '/' . $theme->parametres->$param; + protected function _addSpecialInfos($book, $theme, $param, $specialName) { + if ($specialName == 'archives') { + $p = $book->parametres; + + } else { + $p = $theme->parametres; + } + + + if ($p->$param != '') { + if ($specialName != 'archives') { + $themeRoot = WS_THEMES . '/' . $theme->theme_id . '/'; + $dim = getimagesize($themeRoot . $p->$param); + $url = 'http://' . $_SERVER['HTTP_HOST'] . WEBROOT . '/fluidbook/themes/' . $theme->theme_id . '/' . $p->$param; + } else { + $bookRoot = WS_BOOKS . '/working/' . $book->book_id . '/'; + $dim = getimagesize($bookRoot . $p->$param); + $url = 'http://' . $_SERVER['HTTP_HOST'] . WEBROOT . '/fluidbook/books/working/' . $book->book_id . '/' . $p->$param; + } if ($this->json) { $p = array('width' => $dim[0], 'height' => $dim[1], 'url' => $url); @@ -611,16 +625,16 @@ class wsFlash extends cubeFlashGateway { $size = $firstDoc->generalInfos['size']; $this->xml->addChild('width', $size[0]); $this->xml->addChild('height', $size[1]); - $res = ''.__('Nombre de pages') . ' : ' ; + $res = '' . __('Nombre de pages') . ' : '; $res .= $nb_pages . ' ' . __('pages') . "\n"; $res .= "\n"; - $res .= ''.__('Dimensions') . ' : ' . "\n"; + $res .= '' . __('Dimensions') . ' : ' . "\n"; $res .= round($size[0], 3) . ' x ' . round($size[1], 3) . ' pts' . "\n"; $res .= "\n"; - $res .= ''.__('Taille totale des pages') . ' : ' . "\n"; + $res .= '' . __('Taille totale des pages') . ' : ' . "\n"; $res .= $total . "\n"; $res .= "\n"; - $res .= ''.__('Taille moyenne des pages') . ' : ' . "\n"; + $res .= '' . __('Taille moyenne des pages') . ' : ' . "\n"; $res .= $average . "\n"; $res .= "\n"; $this->xml->addChild('infos', $res); diff --git a/swf/_src/composerLibrary.swc b/swf/_src/composerLibrary.swc index c1e6f0489..950610477 100644 Binary files a/swf/_src/composerLibrary.swc and b/swf/_src/composerLibrary.swc differ diff --git a/swf/_src/wsComposerLibrary.fla b/swf/_src/wsComposerLibrary.fla index 44df4b220..dfd3fbd50 100644 Binary files a/swf/_src/wsComposerLibrary.fla and b/swf/_src/wsComposerLibrary.fla differ