From cee2276dc0bd37f7981e885f9dd32cd0e113c1cc Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 23 Oct 2010 12:53:41 +0000 Subject: updating album image list when a photo is deleted --- lib/image.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/image.php') diff --git a/lib/image.php b/lib/image.php index 4100f3f7b..c60eabfc0 100644 --- a/lib/image.php +++ b/lib/image.php @@ -17,6 +17,19 @@ class TidypicsImage extends ElggFile { parent::__construct($guid); } + /** + * delete image + * + * @return bool + */ + public function delete() { + + $album = get_entity($this->container_guid); + $album->removeImage($this->guid); + + return parent::delete(); + } + /** * Has the photo been tagged with "in this photo" tags * -- cgit v1.2.3