call_hooks($a->module . '_pre_' . $selname, $arr);
- if(count($r)) {
+ if(dbm::is_result($r)) {
foreach($r as $rr) {
if((is_array($preselected)) && in_array($rr['id'], $preselected))
$selected = " selected=\"selected\" ";
call_hooks($a->module . '_pre_' . $selname, $arr);
- if(count($r)) {
+ if(dbm::is_result($r)) {
foreach($r as $rr) {
if((is_array($preselected)) && in_array($rr['id'], $preselected))
$selected = " selected=\"selected\" ";
$receiverlist = array();
- if(count($r)) {
+ if(dbm::is_result($r)) {
foreach($r as $rr) {
if((is_array($preselected)) && in_array($rr['id'], $preselected))
$selected = " selected=\"selected\" ";
$r = q("SELECT `pubmail` FROM `mailacct` WHERE `uid` = %d AND `server` != '' LIMIT 1",
intval(local_user())
);
- if(count($r)) {
+ if(dbm::is_result($r)) {
$mail_enabled = true;
if(intval($r[0]['pubmail']))
$pubmail_enabled = true;
$r = array();
- if(count($r)) {
+ if(dbm::is_result($r)) {
foreach($r as $g){
$contacts[] = array(
"type" => "c",
dbesc($search),
implode("','", $known_contacts)
);
- if (is_array($r) && count($r)){
+ if (dbm::is_result($r)){
foreach($r as $row) {
// nickname..
$up = parse_url($row['author-link']);