diff options
Diffstat (limited to 'apps/gallery/lib/album.php')
-rw-r--r-- | apps/gallery/lib/album.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/gallery/lib/album.php b/apps/gallery/lib/album.php index a708ba83ea4..6adff196071 100644 --- a/apps/gallery/lib/album.php +++ b/apps/gallery/lib/album.php @@ -42,6 +42,13 @@ class OC_Gallery_Album { $stmt = OC_DB::prepare($sql); return $stmt->execute($args); } + + public static function removeByPath($path, $owner) { + $album = self::find($owner, null, $path); + $album = $album->fetchRow(); + self::remove($owner, $album['album_name']); + OC_Gallery_Photo::removeByAlbumId($album['album_id']); + } public static function find($owner, $name=null, $path=null){ $sql = 'SELECT * FROM *PREFIX*gallery_albums WHERE uid_owner = ?'; |