]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - scripts/makegroupadmin.php
Misses this file to merge. I like the comments.
[quix0rs-gnu-social.git] / scripts / makegroupadmin.php
index 07f980d58bf03198620dacff085e21f2db9c8c94..3d3b1d3e841accdfaddcbe98d3af8d091ed8a787 100644 (file)
@@ -32,7 +32,7 @@ makes a user the admin of a group
 
 END_OF_MAKEGROUPADMIN_HELP;
 
-require_once INSTALLDIR.'/scripts/commandline.inc';
+require_once INSTALLDIR.'/scripts/commandline.inc.php';
 
 $nickname = get_option_value('n', 'nickname');
 $groupname = get_option_value('g', 'group');
@@ -44,13 +44,13 @@ if (empty($nickname) || empty($groupname)) {
 
 try {
 
-    $user = User::staticGet('nickname', $nickname);
+    $user = User::getKV('nickname', $nickname);
 
     if (empty($user)) {
         throw new Exception("No user named '$nickname'.");
     }
 
-    $group = User_group::staticGet('nickname', $groupname);
+    $group = User_group::getKV('nickname', $groupname);
 
     if (empty($group)) {
         throw new Exception("No group named '$groupname'.");
@@ -67,7 +67,7 @@ try {
         $member->created    = common_sql_now();
 
         if (!$member->insert()) {
-            throw new Exception("Cannot add '$nickname' to '$groupname'.");
+            throw new Exception("Can't add '$nickname' to '$groupname'.");
         }
     }
 
@@ -80,7 +80,7 @@ try {
     $member->is_admin = 1;
 
     if (!$member->update($orig)) {
-        throw new Exception("Cannot make '$nickname' admin of '$groupname'.");
+        throw new Exception("Can't make '$nickname' admin of '$groupname'.");
     }
 
 } catch (Exception $e) {