Update JSON serialization to match class model
This commit is contained in:
parent
32da820217
commit
dc582438de
|
@ -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(),
|
||||
|
|
|
@ -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()
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user