Make tag-per-group optional, default false

This commit is contained in:
Evan Prodromou 2011-04-20 16:19:07 -04:00
parent e686199616
commit 4fa7f147b0
3 changed files with 11 additions and 6 deletions

2
README
View File

@ -1392,6 +1392,8 @@ maxaliases: maximum number of aliases a group can have. Default 3. Set
desclimit: maximum number of characters to allow in group descriptions.
null (default) means to use the site-wide text limits. 0
means no limit.
addtag: Whether to add a tag for the group nickname for every group post
(pre-1.0.x behaviour). Defaults to false.
oembed
--------

View File

@ -1071,6 +1071,7 @@ class Notice extends Memcached_DataObject
common_log_db_error($gi, 'INSERT', __FILE__);
}
if (common_config('group', 'addtag')) {
// we automatically add a tag for every group name, too
$tag = Notice_tag::pkeyGet(array('tag' => common_canonical_tag($group->nickname),
@ -1079,6 +1080,7 @@ class Notice extends Memcached_DataObject
if (is_null($tag)) {
$this->saveTag($group->nickname);
}
}
$groups[] = clone($group);
} else {

View File

@ -268,7 +268,8 @@ $default =
array('desclimit' => null),
'group' =>
array('maxaliases' => 3,
'desclimit' => null),
'desclimit' => null,
'addtag' => false),
'peopletag' =>
array('maxtags' => 100, // maximum number of tags a user can create.
'maxpeople' => 500, // maximum no. of people with the same tag by the same user