From 1a135e72b445f0ddc2a8cbc2ec7b555cd85f299f Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Thu, 10 Mar 2016 14:45:55 +0000 Subject: [PATCH] #fluidbook-workshop : fix bug of pdf not being fixed typo in url of automatic email @1 --- inc/commons/class.common.url.php | 2 +- inc/ws/DAO/class.ws.dao.document.php | 2 +- inc/ws/Metier/class.ws.document.php | 22 +++++++++------------- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/inc/commons/class.common.url.php b/inc/commons/class.common.url.php index bd1a2d6d0..8b756fe24 100644 --- a/inc/commons/class.common.url.php +++ b/inc/commons/class.common.url.php @@ -622,7 +622,7 @@ class commonUrl { $body = 'Tous les fichiers de ' . $client->prenom . ' ' . $client->nom . ' : https://' . $_SERVER['HTTP_HOST'] . '/fichiers/' . $client->utilisateur_id . "\n\n"; $body .= 'Fichiers chargés : ' . "\n"; foreach ($_SESSION['files_uploaded'] as $f) { - $body .= ' - httpx://' . $_SERVER['HTTP_HOST'] . '/telecharger/' . commonUrl::hashFile($f) . '/' . $f . "\n"; + $body .= ' - https://' . $_SERVER['HTTP_HOST'] . '/telecharger/' . commonUrl::hashFile($f) . '/' . $f . "\n"; } $body .= "\n" . RAPPEL . " : \n"; $body .= ' - Adresse : https://' . $_SERVER['HTTP_HOST'] . '/' . "\n"; diff --git a/inc/ws/DAO/class.ws.dao.document.php b/inc/ws/DAO/class.ws.dao.document.php index a0e235af0..175ef62ef 100644 --- a/inc/ws/DAO/class.ws.dao.document.php +++ b/inc/ws/DAO/class.ws.dao.document.php @@ -223,7 +223,7 @@ class wsDAODocument extends commonDAO { public function setLinksFromOldFluidbook($book_id) { $daoBook = new wsDAOBook($this->con); $pages = $daoBook->getPagesOfBook($book_id); - fb($pages); + $book = $daoBook->selectById($book_id); $width = $book->parametres->width; diff --git a/inc/ws/Metier/class.ws.document.php b/inc/ws/Metier/class.ws.document.php index e35bff118..997b8bd6c 100644 --- a/inc/ws/Metier/class.ws.document.php +++ b/inc/ws/Metier/class.ws.document.php @@ -928,32 +928,28 @@ class wsDocument extends cubeMetier { public static function getDir($id) { - if(!is_array(self::$_docsDir)){ - self::$_docsDir=array(); + if (!is_array(self::$_docsDir)) { + self::$_docsDir = array(); } - if(isset(self::$_docsDir[$id])){ + if (isset(self::$_docsDir[$id])) { return self::$_docsDir[$id]; } $new = WS_DOCS . '/' . $id . '/'; $old = '/mnt/sshfs/batman/home/extranet/www/fluidbook/docs/' . $id . '/'; - if (file_exists($new . '/p1.swf')) { - self::$_docsDir[$id]=$new; + if (file_exists($new . 'p1.swf')) { + self::$_docsDir[$id] = $new; return $new; } elseif (file_exists($old . 'p1.swf')) { - self::$_docsDir[$id]=$old; + self::$_docsDir[$id] = $old; return $old; } if (!file_exists($new)) { mkdir($new, 0777, true); - self::$_docsDir[$id]=$new; - return $new; } + self::$_docsDir[$id] = $new; + return $new; } - - -} - -?> \ No newline at end of file +} \ No newline at end of file -- 2.39.5