intval($uid),
dbesc($name)
);
- if(dbm::is_result($r))
+ if (dbm::is_result($r))
$group_id = $r[0]['id'];
if(! $group_id)
return false;
intval($uid),
dbesc($name)
);
- if(dbm::is_result($r))
+ if (dbm::is_result($r))
return $r[0]['id'];
return false;
}
intval($gid),
intval($member)
);
- if(dbm::is_result($r))
+ if (dbm::is_result($r))
return true; // You might question this, but
// we indicate success because the group member was in fact created
// -- It was just created at another time
- if(! dbm::is_result($r))
+ 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)
- );
+ );
+ }
return $r;
}
intval($gid),
intval(local_user())
);
- if(dbm::is_result($r))
+ if (dbm::is_result($r))
$ret = $r;
}
return $ret;
intval(local_user()),
dbesc(NETWORK_OSTATUS)
);
- if(dbm::is_result($r))
+ if (dbm::is_result($r))
$ret = count($r);
}
return $ret;
intval($uid)
);
$grps[] = array('name' => '', 'id' => '0', 'selected' => '');
- if(dbm::is_result($r)) {
+ if (dbm::is_result($r)) {
foreach($r as $rr) {
$grps[] = array('name' => $rr['name'], 'id' => $rr['id'], 'selected' => (($gid == $rr['id']) ? 'true' : ''));
}
$o = '';
- if(! local_user())
+ if (! local_user())
return '';
$groups = array();
$member_of = groups_containing(local_user(),$cid);
}
- if(dbm::is_result($r)) {
+ if (dbm::is_result($r)) {
foreach($r as $rr) {
$selected = (($group_id == $rr['id']) ? ' group-selected' : '');
$ret = array();
- if(dbm::is_result($r))
+ if (dbm::is_result($r))
foreach($r as $rr)
$ret[] = $rr['contact-id'];
if($check_dead AND !$use_gcontact) {
);
$ret = array();
- if(dbm::is_result($r)) {
+ if (dbm::is_result($r)) {
foreach($r as $rr)
$ret[] = $rr['gid'];
}