summaryrefslogtreecommitdiffstats
path: root/apps/gallery/ajax
diff options
context:
space:
mode:
authorBartek Przybylski <bart.p.pl@gmail.com>2011-10-27 21:16:04 +0200
committerBartek Przybylski <bart.p.pl@gmail.com>2011-10-27 21:16:04 +0200
commit865be6064a1f2f896ca3657fa6eef590748a4e39 (patch)
treeacf66124ed73af4079ef105d7f114adb284a45d9 /apps/gallery/ajax
parent0d022de0f4d63dcbec252498282240f5b2e43e73 (diff)
downloadnextcloud-server-865be6064a1f2f896ca3657fa6eef590748a4e39.tar.gz
nextcloud-server-865be6064a1f2f896ca3657fa6eef590748a4e39.zip
adjusting to new db "api", merge with master
Diffstat (limited to 'apps/gallery/ajax')
-rw-r--r--apps/gallery/ajax/getAlbums.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/gallery/ajax/getAlbums.php b/apps/gallery/ajax/getAlbums.php
index 60d3d42866d..98d92c5f31a 100644
--- a/apps/gallery/ajax/getAlbums.php
+++ b/apps/gallery/ajax/getAlbums.php
@@ -4,12 +4,12 @@ OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('gallery');
$a = array();
-$stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_albums WHERE `uid_owner` = ?');
+$stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_albums WHERE uid_owner LIKE ?');
$result = $stmt->execute(array(OC_User::getUser()));
while ($r = $result->fetchRow()) {
$album_name = $r['album_name'];
- $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_photos WHERE `album_id` = ?');
+ $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_photos WHERE album_id = ?');
$tmp_res = $stmt->execute(array($r['album_id']));
$a[] = array('name' => $album_name, 'numOfItems' => min($tmp_res->numRows(), 10), 'bgPath' => OC::$WEBROOT.'/data/'.OC_User::getUser().'/gallery/'.$album_name.'.png');
}