diff options
author | kevinjardine <kevinjardine@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-03-09 11:07:05 +0000 |
---|---|---|
committer | kevinjardine <kevinjardine@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-03-09 11:07:05 +0000 |
commit | 640444e38d4e3a6c88b182464071944627b4e11e (patch) | |
tree | 6faafea394e4a1922e2acc39836c673ff6c668b8 | |
parent | 3af7c46aa4cd7150a20f04953b9341f464b55f38 (diff) | |
download | elgg-640444e38d4e3a6c88b182464071944627b4e11e.tar.gz elgg-640444e38d4e3a6c88b182464071944627b4e11e.tar.bz2 |
Introducing the add_group_tool_option function.
git-svn-id: https://code.elgg.org/elgg/trunk@3130 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/group.php | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/engine/lib/group.php b/engine/lib/group.php index 28f6eaa10..9863a7b7b 100644 --- a/engine/lib/group.php +++ b/engine/lib/group.php @@ -262,8 +262,8 @@ public function delete()
{
if (parent::delete())
- return delete_group_entity($this->get('guid')); - + return delete_group_entity($this->get('guid'));
+
return false;
}
@@ -822,6 +822,31 @@ }
/**
+ * Manages group tool options
+ *
+ * @param string $name Name of the group tool option
+ * @param string $label Used for the group edit form
+ * @param boolean $default_on True if this option should be active by default
+ *
+ **/
+
+ function add_group_tool_option($name,$label,$default_on=true) {
+ global $CONFIG;
+
+ if (!isset($CONFIG->group_tool_options)) {
+ $CONFIG->group_tool_options = array();
+ }
+
+ $group_tool_option = new stdClass;
+
+ $group_tool_option->name = $name;
+ $group_tool_option->label = $label;
+ $group_tool_option->default_on = $default_on;
+
+ $CONFIG->group_tool_options[] = $group_tool_option;
+ }
+
+ /**
* Performs initialisation functions for groups
*
*/
|