diff options
author | Bartek Przybylski <bart.p.pl@gmail.com> | 2012-01-17 20:00:12 +0100 |
---|---|---|
committer | Bartek Przybylski <bart.p.pl@gmail.com> | 2012-01-17 20:00:12 +0100 |
commit | 10aa2968957a3937b34c86f565c64324d676dba8 (patch) | |
tree | 45e6aaf80f4834c635265d8912b80ce0f7d9f489 /apps/gallery/lib | |
parent | 69ca0ae177ad20b45e630838343527558573064d (diff) | |
download | nextcloud-server-10aa2968957a3937b34c86f565c64324d676dba8.tar.gz nextcloud-server-10aa2968957a3937b34c86f565c64324d676dba8.zip |
fix: oc-33
Diffstat (limited to 'apps/gallery/lib')
-rw-r--r-- | apps/gallery/lib/scanner.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/gallery/lib/scanner.php b/apps/gallery/lib/scanner.php index 4ce38a99531..df33369b93b 100644 --- a/apps/gallery/lib/scanner.php +++ b/apps/gallery/lib/scanner.php @@ -59,9 +59,10 @@ class OC_Gallery_Scanner { $albums['imagesCount'] = $current_album['imagesCount']; $albums['albumName'] = $current_album['name']; - $result = OC_Gallery_Album::find(OC_User::getUser(), $current_album['name']); + $result = OC_Gallery_Album::find(OC_User::getUser(), /*$current_album['name']*/ null, $path); + // don't duplicate galleries with same path (bug oc-33) if ($result->numRows() == 0 && count($current_album['images'])) { - OC_Gallery_Album::create(OC_User::getUser(), $current_album['name'], $path); + OC_Gallery_Album::create(OC_User::getUser(), $current_album['name'], $path); $result = OC_Gallery_Album::find(OC_User::getUser(), $current_album['name']); } $albumId = $result->fetchRow(); |