diff --git a/class_album.php b/class_album.php index e9c78ed..45e2d78 100644 --- a/class_album.php +++ b/class_album.php @@ -221,6 +221,8 @@ class Album implements JsonSerializable { return [ 'id' => $this->getID(), 'foldername' => $this->getFolderName(), + 'thumbnail' => $this->getThumbnail(), + 'thumburl' => ($this->getThumbnail() == "") ? "graphics/no-image-available_thm.gif" : THUMBNAILFOLDER . $this->getFolderName() . $this->getThumbnail(), 'title' => $this->getTitle(), 'description' => $this->getDescription(), 'createtime' => $this->getCreateTime(), diff --git a/class_image.php b/class_image.php index 54707ed..05699d1 100644 --- a/class_image.php +++ b/class_image.php @@ -252,7 +252,11 @@ class Image implements JsonSerializable { return [ 'id' => $this->getID(), 'album_id' => $this->getAlbumID(), - 'img' => basename(ALBUMFOLDER) . "/" . $this->albumfolder . "/" . $this->getFileName(), + 'albumfolder' => $this->getAlbumFolder(), + 'imageurl' => basename(ALBUMFOLDER) . "/" . $this->getAlbumFolder() . "/" . $this->getFileName(), + 'thumburl' => basename(THUMBNAILFOLDER) . "/" . $this->getAlbumFolder() . "/" . $this->getFileName(), + 'title' => $this->getTitle(), + 'description' => $this->getDescription(), 'createtime' => $this->getCreateTime() ]; }