From ceaae73e19a319a0e14cbafaa8b8763e38533599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Sun, 23 Dec 2012 13:56:01 +0100 Subject: [PATCH] Double check if the cover is really there. I had some problems with path having case difference on Linux. --- book.php | 4 ++++ bookdetail.php | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/book.php b/book.php index ed5aab0..516c4d3 100644 --- a/book.php +++ b/book.php @@ -73,6 +73,10 @@ class Book extends Base { $this->comment = $line->comment; $this->uuid = $line->uuid; $this->hasCover = $line->has_cover; + if (!file_exists ($this->getFilePath ("jpg"))) { + // double check + $this->hasCover = 0; + } $this->rating = $line->rating; } diff --git a/bookdetail.php b/bookdetail.php index d893ae6..ff55374 100644 --- a/bookdetail.php +++ b/bookdetail.php @@ -20,7 +20,13 @@ $book->getLinkArray ();
+ hasCover) { + ?> cover +