*/
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()) {
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
}
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];
// 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');
$result = null;
- if (dbm::is_result($r)) {
+ if (DBM::is_result($r)) {
$result = group_rmv(local_user(), $r[0]['name']);
}
notice(t('Unable to remove group.') . EOL);
}
}
- goaway(App::get_baseurl() . '/group');
+ goaway(System::baseUrl() . '/group');
// NOTREACHED
}
intval($a->argv[2]),
intval(local_user())
);
- if (dbm::is_result($r)) {
+ if (DBM::is_result($r)) {
$change = intval($a->argv[2]);
}
}
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];
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)) {