$tabs = '';
if ($a->argc >1 && is_numeric($a->argv[1])) {
- $tabs = render_messages(get_messages(local_user(),0,5), 'mail_list.tpl');
+ $tabs = render_messages(get_messages(local_user(),0,5), 'mail_list.tpl');
}
$new = array(
dbesc($myprofile)
);
- 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']);
- if(! count($r)) {
+ if(! dba::is_result($r)) {
info( t('No messages.') . EOL);
return $o;
}
);
}
-function render_messages($msg, $t) {
+function render_messages(array $msg, $t) {
$a = get_app();