if ($p->$param != '') {
if ($specialName != 'archives') {
$themeRoot = WS_THEMES . '/' . $theme->theme_id . '/';
- $dim = getimagesize($themeRoot . $p->$param);
+ $dim = CubeIT_Image::getimagesize($themeRoot . $p->$param);
$url = 'https://' . $_SERVER['HTTP_HOST'] . WEBROOT . '/fluidbook/themes/' . $theme->theme_id . '/' . $p->$param;
} else {
$bookRoot = WS_BOOKS . '/working/' . $book->book_id . '/';
- $dim = getimagesize($bookRoot . $p->$param);
+ $dim = CubeIT_Image::getimagesize($bookRoot . $p->$param);
$url = 'https://' . $_SERVER['HTTP_HOST'] . WEBROOT . '/fluidbook/books/working/' . $book->book_id . '/' . $p->$param;
}
{
global $core;
+ $this->outputXML = false;
+
$comments = isset($this->args['comments']) ? $this->args['comments'] : 'Saved from editor';
$dao = new wsDAODocument($core->con);
- $dao->setLinksAndRulers($this->args['book_id'], $this->args['links'], $this->args['rulers'], $comments, $core->user->utilisateur_id);
+ $dao->setLinksAndRulers($this->args['book_id'], $this->args['links'], $this->args['rulers'], $comments, $core->user->utilisateur_id, false);
$daoBook = new wsDAOBook($core->con);
$daoBook->setSpecialLinksAndRulers($this->args['book_id'], $this->args['specialLinks'], $this->args['specialRulers']);
$rulers = json_encode(json_decode($rulers, false));
}
- $links = wsLinks::encryptLinks($links);
+
+ echo '1 : ' . print_r($links) . "<br>";
+
+ $links = wsLinks::encryptLinks(json_decode($links));
+
+ echo '2 : ' . print_r($links) . "<br>";
+
if (is_array($links)) {
$links = json_encode($links);
$rulers = json_encode($rulers);
}
+ echo '3 : ' . $links . "<br>";
$c1->links = $c->specialLinks = $links;
$c1->rulers = $c->specialRulers = $rulers;
return implode("\n", $log);
}
- public function setLinksAndRulers($book_id, $links, $rulers, $comments = '', $user = 0)
+ public function setLinksAndRulers($book_id, $links, $rulers, $comments = '', $user = 0, $handleSpecials = true)
{
$daoBook = new wsDAOBook($this->con);
$pages = $daoBook->getPagesOfBook($book_id, false);
$specialRulers = array();
foreach ($t as $page => $tt) {
- if (!is_int($page)) {
+ if (!is_int($page) && $handleSpecials) {
if (isset($tt['links'])) {
$specialLinks = array_merge($specialLinks, $tt['links']);
}
foreach ($links as $document_id => $dummy) {
wsLinks::setDocumentLinks($document_id, json_encode($links[$document_id]), json_encode($rulers[$document_id]), $user, $comments, TIME);
}
- $daoBook->setSpecialLinksAndRulers($book_id, $specialLinks, $specialRulers);
+ if ($handleSpecials) {
+ $daoBook->setSpecialLinksAndRulers($book_id, $specialLinks, $specialRulers);
+ }
$c = $this->con->openCursor('books');
$c->changedate = TIME;