]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apigroupcreate.php
Assigning my copyrights to the Free Software Foundation
[quix0rs-gnu-social.git] / actions / apigroupcreate.php
index 028d76a7822a99c5bf2f3b6a46d9743280a4054a..d216c15cd4f4be0e6a17c0f9a5083f925756e840 100644 (file)
@@ -26,6 +26,7 @@
  * @author    Jeffery To <jeffery.to@gmail.com>
  * @author    Zach Copley <zach@status.net>
  * @copyright 2009 StatusNet, Inc.
+ * @copyright 2009 Free Software Foundation, Inc http://www.fsf.org
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link      http://status.net/
  */
@@ -123,7 +124,9 @@ class ApiGroupCreateAction extends ApiAuthAction
                                             'description' => $this->description,
                                             'location' => $this->location,
                                             'aliases'  => $this->aliases,
-                                            'userid'   => $this->user->id));
+                                            'userid'   => $this->user->id,
+                                            'local'    => true));
+
         switch($this->format) {
         case 'xml':
             $this->showSingleXmlGroup($group);
@@ -261,7 +264,7 @@ class ApiGroupCreateAction extends ApiAuthAction
 
             if (!$valid) {
                 $this->clientError(
-                    sprintf(_('Invalid alias: "%s"'), $alias),
+                    sprintf(_('Invalid alias: "%s".'), $alias),
                     403,
                     $this->format
                 );
@@ -306,9 +309,9 @@ class ApiGroupCreateAction extends ApiAuthAction
 
     function groupNicknameExists($nickname)
     {
-        $group = User_group::staticGet('nickname', $nickname);
+        $local = Local_group::staticGet('nickname', $nickname);
 
-        if (!empty($group)) {
+        if (!empty($local)) {
             return true;
         }