]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #2486: Added support for the 'recursive' parameter to ElggEntity::delete()
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 14 Nov 2010 06:31:42 +0000 (06:31 +0000)
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 14 Nov 2010 06:31:42 +0000 (06:31 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7306 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/classes/ElggEntity.php

index 96d18142fc8917afa78ee832d52ee1668a98b6b4..3df4b7a0c6513ea713f51f0273aea7e9d9aea850 100644 (file)
@@ -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
         */