summaryrefslogtreecommitdiffstats
path: root/apps/gallery/ajax/getAlbums.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gallery/ajax/getAlbums.php')
-rw-r--r--apps/gallery/ajax/getAlbums.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/gallery/ajax/getAlbums.php b/apps/gallery/ajax/getAlbums.php
index 856f29344d7..e4736076fed 100644
--- a/apps/gallery/ajax/getAlbums.php
+++ b/apps/gallery/ajax/getAlbums.php
@@ -4,12 +4,14 @@ OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('gallery');
$a = array();
+
$result = OC_Gallery_Album::find(OC_User::getUser());
while ($r = $result->fetchRow()) {
$album_name = $r['album_name'];
$tmp_res = OC_Gallery_Photo::find($r['album_id']);
- $a[] = array('name' => $album_name, 'numOfItems' => min($tmp_res->numRows(), 10));
+
+ $a[] = array('name' => $album_name, 'numOfItems' => min($tmp_res->numRows(), 10), 'bgPath' => OC::$WEBROOT.'/data/'.OC_User::getUser().'/gallery/'.$album_name.'.png');
}
OC_JSON::success(array('albums'=>$a));