return false;
}
-
+ function load_contact_links($uid) {
+
+ $a = get_app();
+
+ $ret = array();
+
+ if(! $uid || x($a->contacts,'empty'))
+ return;
+
+ $r = q("SELECT `id`,`network`,`url`,`thumb`, `rel` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `thumb` != ''",
+ intval($uid)
+ );
+
+ if(dba::is_result($r)) {
+ foreach($r as $rr){
+ $url = normalise_link($rr['url']);
+ $ret[$url] = $rr;
+ }
+ } else
+ $ret['empty'] = true;
+
+ $a->contacts = $ret;
+ return;
+ }
+
/**
* @brief Returns querystring as string from a mapped array.
*
$r = q("SELECT count(*) AS `total` FROM `mail`
WHERE `mail`.`uid` = %d GROUP BY `parent-uri` ORDER BY `created` DESC",
- intval(local_user()),
- dbesc($myprofile)
+ intval(local_user())
);
- if(count($r)) $a->set_pager_total($r[0]['total']);
+ if (dba::is_result($r)) {
+ $a->set_pager_total($r[0]['total']);
+ }
$r = get_messages(local_user(), $a->pager['start'], $a->pager['itemspage']);