$php->setArg('HTTP_HOST', $_SERVER['HTTP_HOST']);\r
$php->setNohup(true);\r
$php->execute('exec');\r
- \r
+\r
fb($php->commande);\r
fb($php->output);\r
\r
$daoTheme = new wsDAOTheme($this->con);\r
$theme = $daoTheme->getThemeOfBook($this->args['book_id'], true);\r
\r
- $specials = array('backgroundImage' => 'background', 'topBar' => 'topbar', 'afterSearch' => 'aftersearch');\r
+ $specials = array('backgroundImage' => 'background', 'topBar' => 'topbar', 'afterSearch' => 'aftersearch', 'externalArchives' => 'archives');\r
\r
foreach ($specials as $tparam => $sname) {\r
- $this->_addSpecialInfos($theme, $tparam, $sname);\r
+ $this->_addSpecialInfos($book, $theme, $tparam, $sname);\r
}\r
}\r
\r
- protected function _addSpecialInfos($theme, $param, $specialName) {\r
- if ($theme->parametres->$param != '') {\r
- $themeRoot = WS_THEMES . '/' . $theme->theme_id . '/';\r
- $dim = getimagesize($themeRoot . $theme->parametres->$param);\r
- $url = 'http://' . $_SERVER['HTTP_HOST'] . WEBROOT . '/fluidbook/themes/' . $theme->theme_id . '/' . $theme->parametres->$param;\r
+ protected function _addSpecialInfos($book, $theme, $param, $specialName) {\r
+ if ($specialName == 'archives') {\r
+ $p = $book->parametres;\r
+ \r
+ } else {\r
+ $p = $theme->parametres;\r
+ }\r
+\r
+\r
+ if ($p->$param != '') {\r
+ if ($specialName != 'archives') {\r
+ $themeRoot = WS_THEMES . '/' . $theme->theme_id . '/';\r
+ $dim = getimagesize($themeRoot . $p->$param);\r
+ $url = 'http://' . $_SERVER['HTTP_HOST'] . WEBROOT . '/fluidbook/themes/' . $theme->theme_id . '/' . $p->$param;\r
+ } else {\r
+ $bookRoot = WS_BOOKS . '/working/' . $book->book_id . '/';\r
+ $dim = getimagesize($bookRoot . $p->$param);\r
+ $url = 'http://' . $_SERVER['HTTP_HOST'] . WEBROOT . '/fluidbook/books/working/' . $book->book_id . '/' . $p->$param;\r
+ }\r
\r
if ($this->json) {\r
$p = array('width' => $dim[0], 'height' => $dim[1], 'url' => $url);\r
$size = $firstDoc->generalInfos['size'];\r
$this->xml->addChild('width', $size[0]);\r
$this->xml->addChild('height', $size[1]);\r
- $res = '<b>'.__('Nombre de pages') . '</b> : ' ;\r
+ $res = '<b>' . __('Nombre de pages') . '</b> : ';\r
$res .= $nb_pages . ' ' . __('pages') . "\n";\r
$res .= "\n";\r
- $res .= '<b>'.__('Dimensions') . '</b> : ' . "\n";\r
+ $res .= '<b>' . __('Dimensions') . '</b> : ' . "\n";\r
$res .= round($size[0], 3) . ' x ' . round($size[1], 3) . ' pts' . "\n";\r
$res .= "\n";\r
- $res .= '<b>'.__('Taille totale des pages') . '</b> : ' . "\n";\r
+ $res .= '<b>' . __('Taille totale des pages') . '</b> : ' . "\n";\r
$res .= $total . "\n";\r
$res .= "\n";\r
- $res .= '<b>'.__('Taille moyenne des pages') . '</b> : ' . "\n";\r
+ $res .= '<b>' . __('Taille moyenne des pages') . '</b> : ' . "\n";\r
$res .= $average . "\n";\r
$res .= "\n";\r
$this->xml->addChild('infos', $res);\r