X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Ffrio%2Ftheme.php;h=3fb889cdc375ad2635ef4fc073cf8a7a474a130d;hb=6a8a36f12d00f35004fbb034972ca87dd1a3c4f5;hp=085d4d941f42e8db269d9cf73fae14a54d17a3c8;hpb=293436e5fd5110220c969513858dbb979f1f35d3;p=friendica.git diff --git a/view/theme/frio/theme.php b/view/theme/frio/theme.php index 085d4d941f..3fb889cdc3 100644 --- a/view/theme/frio/theme.php +++ b/view/theme/frio/theme.php @@ -221,7 +221,7 @@ function frio_remote_nav($a,&$nav) { // user info $r = q("SELECT `micro` FROM `contact` WHERE `uid` = %d AND `self` = 1", intval($a->user['uid'])); - $r[0]['photo'] = (count($r) ? $a->remove_baseurl($r[0]['micro']) : "images/person-48.jpg"); + $r[0]['photo'] = (dbm::is_result($r) ? $a->remove_baseurl($r[0]['micro']) : "images/person-48.jpg"); $r[0]['name'] = $a->user['username']; } elseif(!local_user() && remote_user()) { @@ -235,9 +235,9 @@ function frio_remote_nav($a,&$nav) { $nav['remote'] = t("Visitor"); } - if(count($r)){ + if(dbm::is_result($r)){ $nav['userinfo'] = array( - 'icon' => (count($r) ? $r[0]['photo'] : "images/person-48.jpg"), + 'icon' => (dbm::is_result($r) ? $r[0]['photo'] : "images/person-48.jpg"), 'name' => $r[0]['name'], ); } @@ -299,7 +299,7 @@ function frio_acl_lookup($a, &$results) { $r = q("SELECT COUNT(*) AS `total` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `pending` = 0 $sql_extra $sql_extra2 ", intval($_SESSION['uid'])); - if(count($r)) { + if(dbm::is_result($r)) { $total = $r[0]["total"]; } @@ -311,7 +311,7 @@ function frio_acl_lookup($a, &$results) { $contacts = array(); - if(count($r)) { + if(dbm::is_result($r)) { foreach($r as $rr) { $contacts[] = _contact_detail_for_template($rr); }