]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Make tag-per-group optional, default false
authorEvan Prodromou <evan@status.net>
Wed, 20 Apr 2011 20:19:07 +0000 (16:19 -0400)
committerEvan Prodromou <evan@status.net>
Wed, 20 Apr 2011 20:19:07 +0000 (16:19 -0400)
README
classes/Notice.php
lib/default.php

diff --git a/README b/README
index 5f58179bfe4e7cc874ac7279de5eb356f44ccd18..3507fa420bc91afffc6f9566d6c37bb14f65952e 100644 (file)
--- a/README
+++ b/README
@@ -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
 --------
index ecb3b82557e93e02261b66291de1093c58db8882..ba66dd8054440ffd1297f0fd3b2d37e93d5dc5c9 100644 (file)
@@ -1071,13 +1071,15 @@ class Notice extends Memcached_DataObject
                     common_log_db_error($gi, 'INSERT', __FILE__);
                 }
 
-                // we automatically add a tag for every group name, too
+                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),
-                                                 'notice_id' => $this->id));
+                    $tag = Notice_tag::pkeyGet(array('tag' => common_canonical_tag($group->nickname),
+                                                     'notice_id' => $this->id));
 
-                if (is_null($tag)) {
-                    $this->saveTag($group->nickname);
+                    if (is_null($tag)) {
+                        $this->saveTag($group->nickname);
+                    }
                 }
 
                 $groups[] = clone($group);
index c58db28f51c24ee1c521d8377543df21f01a5d38..aeb72ec99a71509340bdeff5e121c9620e746ddd 100644 (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