X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fgroup.php;h=ce8bc217cd7a9e9419544fe1fee40de08f112386;hb=1ff217cc1373099b0e52ba8de5ab4a1335b0f184;hp=fa0e8f59a69af6854e2d1822d08c6038a52bb458;hpb=05dcedb54c8c8f2b48e47fa11cb6dd4586bdd9bb;p=friendica.git diff --git a/include/group.php b/include/group.php index fa0e8f59a6..ce8bc217cd 100644 --- a/include/group.php +++ b/include/group.php @@ -1,5 +1,6 @@ may apply to this group and any future members. If this is not what you intended, please create another group with a different name.') . EOL); + notice( t('A deleted group with this name was revived. Existing item permissions may apply to this group and any future members. If this is not what you intended, please create another group with a different name.') . EOL); } return true; } - $r = q("INSERT INTO `group` ( `uid`, `name` ) - VALUES( %d, '%s' ) ", - intval($uid), - dbesc($name) - ); + $r = dba::insert('group', array('uid' => $uid, 'name' => $name)); $ret = $r; } return $ret; @@ -144,12 +141,7 @@ function group_add_member($uid,$name,$member,$gid = 0) { // we indicate success because the group member was in fact created // -- It was just created at another time if (! dbm::is_result($r)) { - $r = q("INSERT INTO `group_member` (`uid`, `gid`, `contact-id`) - VALUES( %d, %d, %d ) ", - intval($uid), - intval($gid), - intval($member) - ); + $r = dba::insert('group_member', array('uid' => $uid, 'gid' => $gid, 'contact-id' => $member)); } return $r; } @@ -320,7 +312,7 @@ function expand_groups($a,$check_dead = false, $use_gcontact = false) { if (dbm::is_result($r)) foreach ($r as $rr) $ret[] = $rr['contact-id']; - if ($check_dead AND !$use_gcontact) { + if ($check_dead && !$use_gcontact) { require_once('include/acl_selectors.php'); $ret = prune_deadguys($ret); } @@ -394,7 +386,7 @@ function get_default_group($uid, $network = "") { $default_group = 0; if ($network == NETWORK_OSTATUS) - $default_group = get_pconfig($uid, "ostatus", "default_group"); + $default_group = PConfig::get($uid, "ostatus", "default_group"); if ($default_group != 0) return $default_group;