diff options
Diffstat (limited to 'engine/lib/objects.php')
-rw-r--r-- | engine/lib/objects.php | 37 |
1 files changed, 8 insertions, 29 deletions
diff --git a/engine/lib/objects.php b/engine/lib/objects.php index 7ae8b6cff..7d888f9a6 100644 --- a/engine/lib/objects.php +++ b/engine/lib/objects.php @@ -120,21 +120,9 @@ // Now save specific stuff
return create_object_entity($this->get('guid'), $this->get('title'), $this->get('description'), $this->get('container_guid')); - }
+ } /**
- * Delete this object.
- * @return true|false
- */
- public function delete()
- { - if (parent::delete()) - return delete_object_entity($this->get('guid')); - - return false;
- }
-
- /**
* Get sites that this object is a member of
*
* @param string $subtype Optionally, the subtype of result we want to limit to
@@ -302,27 +290,18 @@ return false;
}
- /**
+ /** + * THIS FUNCTION IS DEPRECATED. + *
* Delete a object's extra data.
*
* @param int $guid
*/
function delete_object_entity($guid)
- {
- global $CONFIG;
-
- $guid = (int)$guid;
-
- $row = get_object_entity_as_row($guid);
-
- // Check to see if we have access and it exists
- if ($row)
- {
- // Delete any existing stuff
- return delete_data("DELETE from {$CONFIG->dbprefix}objects_entity where guid=$guid");
- }
-
- return false;
+ { + system_message(sprintf(elgg_echo('deprecatedfunction'), 'delete_user_entity')); + + return 1; // Always return that we have deleted one row in order to not break existing code.
} /** |