aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/group.php29
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
*
*/