From f225bb716d270dcdbb313af5aec48083527d8a3e Mon Sep 17 00:00:00 2001 From: ewinslow Date: Sun, 14 Nov 2010 06:31:42 +0000 Subject: Refs #2486: Added support for the 'recursive' parameter to ElggEntity::delete() git-svn-id: http://code.elgg.org/elgg/trunk@7306 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/classes/ElggEntity.php | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'engine/classes') diff --git a/engine/classes/ElggEntity.php b/engine/classes/ElggEntity.php index 96d18142f..3df4b7a0c 100644 --- a/engine/classes/ElggEntity.php +++ b/engine/classes/ElggEntity.php @@ -996,10 +996,12 @@ abstract class ElggEntity extends ElggData implements /** * Delete this entity. * + * @param bool $recursive Whether to delete all the entities contained by this entity + * * @return bool */ - public function delete() { - return delete_entity($this->get('guid')); + public function delete($recursive = true) { + return delete_entity($this->get('guid'), $recursive); } /* @@ -1061,15 +1063,6 @@ abstract class ElggEntity extends ElggData implements return $this->get('geo:long'); } - /** - * Return the entity's location - * - * @return string - */ - public function getLocation() { - return $this->get('location'); - } - /* * NOTABLE INTERFACE */ -- cgit v1.2.3