db cleanup after gallery remove

This commit is contained in:
Bartek Przybylski 2012-01-25 21:15:27 +01:00
parent 5172e0a7a3
commit 63ae4b3dfc

View file

@ -34,7 +34,11 @@ function handleRename($oldname, $newname) {
function handleRemove($name) {
OC_JSON::checkLoggedIn();
$album_id = OC_Gallery_Album::find(OC_User::getUser(), $name);
$album_id = $album_id->fetchRow();
$album_id = $album_id['album_id'];
OC_Gallery_Album::remove(OC_User::getUser(), $name);
OC_Gallery_Photo::removeByAlbumId($album_id);
}
function handleGetThumbnails($albumname) {