From 6d57778dc74e78268384fa30e887bb7f0a6ffdef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Sat, 11 Jan 2014 18:56:54 +0100 Subject: [PATCH] it's working in multidatabase --HG-- extra : rebase_source : 3fc7d4958dfa971bf9f18354c4c98254ec2b82cf --- JSON_renderer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/JSON_renderer.php b/JSON_renderer.php index 8e63a67..4f3531e 100644 --- a/JSON_renderer.php +++ b/JSON_renderer.php @@ -65,6 +65,7 @@ class JSONRenderer public static function getFullBookContentArray ($book) { global $config; $out = self::getBookContentArray ($book); + $database = GetUrlParam (DB); $out ["coverurl"] = Data::getLink ($book, "jpg", "image/jpeg", Link::OPDS_IMAGE_TYPE, "cover.jpg", NULL)->hrefXhtml (); $out ["thumbnailurl"] = Data::getLink ($book, "jpg", "image/jpeg", Link::OPDS_THUMBNAIL_TYPE, "cover.jpg", NULL, NULL, $config['cops_html_thumbnail_height'] * 2)->hrefXhtml (); @@ -77,7 +78,7 @@ class JSONRenderer $tab ["mail"] = 1; } if ($data->format == "EPUB") { - $tab ["readerUrl"] = "epubreader.php?data={$data->id}&db=0"; //TODO fix the database + $tab ["readerUrl"] = "epubreader.php?data={$data->id}&db={$database}"; } array_push ($out ["datas"], $tab); }