X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fgroup.php;h=4b64964cc63a9bb9345d8e45f3bb711b60482c2a;hb=2196a0577b29dcec1ba4d2c32be10fa5f0e91034;hp=81477c32986b7a14ba570d6cbeb5e1b724d5e027;hpb=b27316587346a1c77967be6ee40cb1660252797e;p=friendica.git diff --git a/mod/group.php b/mod/group.php index 81477c3298..4b64964cc6 100644 --- a/mod/group.php +++ b/mod/group.php @@ -5,6 +5,11 @@ * remove contacts to the contact groups */ +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()) { @@ -29,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 } @@ -45,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]; @@ -79,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'); @@ -115,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']); } @@ -125,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 } @@ -136,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]); } } @@ -150,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]; @@ -239,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)) {