summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-06-14 23:37:24 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-06-14 23:37:24 -0700
commitecbd7718d57fc427d2aeac885d8be0321b3cf1fe (patch)
treef7cdd06b431c78c9a8bdbe3b3355c0ef67ba49b3 /lib
parent09c765f5bbc5a96415b82fe6a7d550d590d90747 (diff)
Code for adding and saving group aliases
Added code to add and save group aliases. Like tags, aliases are free-texted in to the group admin page. configurable max number of aliases, default is three.
Diffstat (limited to 'lib')
-rw-r--r--lib/common.php2
-rw-r--r--lib/groupeditform.php11
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/common.php b/lib/common.php
index 6bf4ad21f..b4e87445e 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -198,6 +198,8 @@ $config =
'user_quota' => 50000000,
'monthly_quota' => 15000000,
),
+ 'group' =>
+ array('maxaliases' => 3),
);
$config['db'] = &PEAR::getStaticProperty('DB_DataObject','options');
diff --git a/lib/groupeditform.php b/lib/groupeditform.php
index ca674f3c8..7e8d6eea3 100644
--- a/lib/groupeditform.php
+++ b/lib/groupeditform.php
@@ -111,7 +111,6 @@ class GroupEditForm extends Form
}
}
-
/**
* Name of the form
*
@@ -157,6 +156,16 @@ class GroupEditForm extends Form
($this->out->arg('location')) ? $this->out->arg('location') : $this->group->location,
_('Location for the group, if any, like "City, State (or Region), Country"'));
$this->out->elementEnd('li');
+ if (common_config('group', 'maxaliases') > 0) {
+ $aliases = (empty($this->group)) ? array() : $this->group->getAliases();
+ $this->out->elementStart('li');
+ $this->out->input('aliases', _('Aliases'),
+ ($this->out->arg('aliases')) ? $this->out->arg('aliases') :
+ (!empty($aliases)) ? implode(' ', $aliases) : '',
+ sprintf(_('Extra nicknames for the group, comma- or space- separated, max %d'),
+ common_config('group', 'maxaliases')));;
+ $this->out->elementEnd('li');
+ }
$this->out->elementEnd('ul');
}