diff --git a/apps/gallery/lib_scanner.php b/apps/gallery/lib_scanner.php index e9a022c606..fe14b68add 100644 --- a/apps/gallery/lib_scanner.php +++ b/apps/gallery/lib_scanner.php @@ -30,7 +30,7 @@ class OC_GALLERY_SCANNER { $albums[] = $current_album; $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_albums WHERE "uid_owner" = ? AND "album_name" = ?'); $result = $stmt->execute(array(OC_User::getUser(), $current_album['name'])); - if ($result->numRows() == 0) { + if ($result->numRows() == 0 && count($current_album['images'])) { $stmt = OC_DB::prepare('INSERT OR REPLACE INTO *PREFIX*gallery_albums ("uid_owner", "album_name") VALUES (?, ?)'); $stmt->execute(array(OC_User::getUser(), $current_album['name'])); } diff --git a/apps/gallery/templates/index.php b/apps/gallery/templates/index.php index 9786990755..0e89e44876 100644 --- a/apps/gallery/templates/index.php +++ b/apps/gallery/templates/index.php @@ -1,4 +1,4 @@ -