diff options
author | Bartek Przybylski <bart.p.pl@gmail.com> | 2012-01-14 14:59:18 +0100 |
---|---|---|
committer | Bartek Przybylski <bart.p.pl@gmail.com> | 2012-01-14 15:01:57 +0100 |
commit | e0dc8b8ab2c1803357e6bd4fbb477effe5d4c599 (patch) | |
tree | f43d08ae3aa3ce43030f368aaf2468d2304c105d /apps/gallery/lib/photo.php | |
parent | 4d1c414ffbcd0b9a17227067c2fbbfc96753d364 (diff) | |
download | nextcloud-server-e0dc8b8ab2c1803357e6bd4fbb477effe5d4c599.tar.gz nextcloud-server-e0dc8b8ab2c1803357e6bd4fbb477effe5d4c599.zip |
handle gallery remove when removing dir via webinterface
Diffstat (limited to 'apps/gallery/lib/photo.php')
-rw-r--r-- | apps/gallery/lib/photo.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/gallery/lib/photo.php b/apps/gallery/lib/photo.php index 23887098e0f..14b0c4b2a07 100644 --- a/apps/gallery/lib/photo.php +++ b/apps/gallery/lib/photo.php @@ -56,6 +56,11 @@ class OC_Gallery_Photo{ $stmt->execute(array($id)); } + public static function removeByAlbumId($albumid) { + $stmt = OC_DB::prepare('DELETE FROM *PREFIX*gallery_photos WHERE album_id = ?'); + $stmt->execute(array($albumid)); + } + public static function changePath($oldAlbumId, $newAlbumId, $oldpath, $newpath) { $stmt = OC_DB::prepare("UPDATE *PREFIX*gallery_photos SET file_path = ?, album_id = ? WHERE album_id = ? and file_path = ?"); $stmt->execute(array($newpath, $newAlbumId, $oldAlbumId, $oldpath)); |