aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/group.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/group.php')
-rw-r--r--engine/lib/group.php37
1 files changed, 8 insertions, 29 deletions
diff --git a/engine/lib/group.php b/engine/lib/group.php
index 9863a7b7b..9e0843776 100644
--- a/engine/lib/group.php
+++ b/engine/lib/group.php
@@ -254,19 +254,7 @@
public function leave(ElggUser $user)
{
return leave_group($this->getGUID(), $user->getGUID());
- }
-
- /**
- * Delete this group.
- */
- public function delete()
- {
- if (parent::delete())
- return delete_group_entity($this->get('guid'));
-
- return false;
- }
-
+ }
/**
* Override the load function.
@@ -409,28 +397,19 @@
}
- /**
+ /**
+ * THIS FUNCTION IS DEPRECATED.
+ *
* Delete a group's extra data.
*
* @param int $guid The guid of the group
* @return bool
*/
function delete_group_entity($guid)
- {
- global $CONFIG;
-
- $guid = (int)$guid;
-
- $row = get_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}groups_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.
}
/**