]> git.mxchange.org Git - friendica.git/blobdiff - mod/group.php
Remove unused upubkey and uprvkey from queries
[friendica.git] / mod / group.php
index 9083368565fcfc6d679d1fd704f10fceea6d0633..4b64964cc63a9bb9345d8e45f3bb711b60482c2a 100644 (file)
@@ -6,7 +6,10 @@
  */
 
 use Friendica\App;
+use Friendica\Core\Config;
+use Friendica\Core\PConfig;
 use Friendica\Core\System;
+use Friendica\Database\DBM;
 
 function group_init(App $a) {
        if (local_user()) {
@@ -31,12 +34,12 @@ function group_post(App $a) {
                        info(t('Group created.') . EOL);
                        $r = group_byname(local_user(), $name);
                        if ($r) {
-                               goaway(App::get_baseurl() . '/group/' . $r);
+                               goaway(System::baseUrl() . '/group/' . $r);
                        }
                } else {
                        notice(t('Could not create group.') . EOL);
                }
-               goaway(App::get_baseurl() . '/group');
+               goaway(System::baseUrl() . '/group');
                return; // NOTREACHED
        }
 
@@ -47,9 +50,9 @@ function group_post(App $a) {
                        intval($a->argv[1]),
                        intval(local_user())
                );
-               if (! dbm::is_result($r)) {
+               if (! DBM::is_result($r)) {
                        notice(t('Group not found.') . EOL);
-                       goaway(App::get_baseurl() . '/contacts');
+                       goaway(System::baseUrl() . '/contacts');
                        return; // NOTREACHED
                }
                $group = $r[0];
@@ -81,12 +84,9 @@ function group_content(App $a) {
 
        // Switch to text mode interface if we have more than 'n' contacts or group members
 
-       $switchtotext = get_pconfig(local_user(), 'system', 'groupedit_image_limit');
-       if ($switchtotext === false) {
-               $switchtotext = get_config('system', 'groupedit_image_limit');
-       }
-       if ($switchtotext === false) {
-               $switchtotext = 400;
+       $switchtotext = PConfig::get(local_user(), 'system', 'groupedit_image_limit');
+       if (is_null($switchtotext)) {
+               $switchtotext = Config::get('system', 'groupedit_image_limit', 400);
        }
 
        $tpl = get_markup_template('group_edit.tpl');
@@ -117,7 +117,7 @@ function group_content(App $a) {
 
                        $result = null;
 
-                       if (dbm::is_result($r)) {
+                       if (DBM::is_result($r)) {
                                $result = group_rmv(local_user(), $r[0]['name']);
                        }
 
@@ -127,7 +127,7 @@ function group_content(App $a) {
                                notice(t('Unable to remove group.') . EOL);
                        }
                }
-               goaway(App::get_baseurl() . '/group');
+               goaway(System::baseUrl() . '/group');
                // NOTREACHED
        }
 
@@ -138,7 +138,7 @@ function group_content(App $a) {
                        intval($a->argv[2]),
                        intval(local_user())
                );
-               if (dbm::is_result($r)) {
+               if (DBM::is_result($r)) {
                        $change = intval($a->argv[2]);
                }
        }
@@ -152,9 +152,9 @@ function group_content(App $a) {
                        intval(local_user())
                );
 
-               if (! dbm::is_result($r)) {
+               if (! DBM::is_result($r)) {
                        notice(t('Group not found.') . EOL);
-                       goaway(App::get_baseurl() . '/contacts');
+                       goaway(System::baseUrl() . '/contacts');
                }
 
                $group = $r[0];
@@ -241,7 +241,7 @@ function group_content(App $a) {
                intval(local_user())
        );
 
-       if (dbm::is_result($r)) {
+       if (DBM::is_result($r)) {
                // Format the data of the contacts who aren't in the contact group
                foreach ($r as $member) {
                        if (! in_array($member['id'], $preselected)) {