summaryrefslogtreecommitdiffstats
path: root/apps/gallery/index.php
diff options
context:
space:
mode:
authorBartek Przybylski <bart.p.pl@gmail.com>2011-12-21 18:35:29 +0100
committerBartek Przybylski <bart.p.pl@gmail.com>2011-12-21 18:35:29 +0100
commit3c428671090e2bd3d46d76567a45c2a9e1639127 (patch)
tree785f2821086745b4bbef1bc01e4fb111c961dc83 /apps/gallery/index.php
parent865be6064a1f2f896ca3657fa6eef590748a4e39 (diff)
parente1b9b65e4159bdd6e0ed81c8cd6b588f03b3a018 (diff)
downloadnextcloud-server-3c428671090e2bd3d46d76567a45c2a9e1639127.tar.gz
nextcloud-server-3c428671090e2bd3d46d76567a45c2a9e1639127.zip
merged
Diffstat (limited to 'apps/gallery/index.php')
-rw-r--r--apps/gallery/index.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/apps/gallery/index.php b/apps/gallery/index.php
index cb567e3c8f6..0cd795bac01 100644
--- a/apps/gallery/index.php
+++ b/apps/gallery/index.php
@@ -13,8 +13,7 @@ if (!file_exists(OC_Config::getValue("datadirectory").'/'. OC_User::getUser() .'
}
if (!isset($_GET['view'])) {
- $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_albums WHERE uid_owner = ?');
- $result = $stmt->execute(array(OC_User::getUser()));
+ $result = OC_Gallery_Album::find(OC_User::getUser());
$r = array();
while ($row = $result->fetchRow())
@@ -24,9 +23,7 @@ if (!isset($_GET['view'])) {
$tmpl->assign('r', $r);
$tmpl->printPage();
} else {
- $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_photos, *PREFIX*gallery_albums WHERE uid_owner = ? AND album_name = ? AND *PREFIX*gallery_albums.album_id = *PREFIX*gallery_photos.album_id');
-
- $result = $stmt->execute(array(OC_User::getUser(), $_GET['view']));
+ $result = OC_Gallery_Photo::findForAlbum(OC_User::getUser(), $_GET['view']);
$photos = array();
while ($p = $result->fetchRow())