$extra_sql = unavailable_networks();
- $r = q("SELECT DISTINCT(`network`) FROM `contact` WHERE `uid` = %d AND NOT `self` $extra_sql ORDER BY `network`",
+ $r = q("SELECT DISTINCT(`network`) FROM `contact` WHERE `uid` = %d AND `network` != '' $extra_sql ORDER BY `network`",
intval(local_user())
);
intval(local_user())
);
}
- } else {
- if ($update_unseen) {
+ } elseif ($update_unseen) {
- $unseen = q("SELECT `id` FROM `item` ".$update_unseen. " LIMIT 1");
+ $unseen = q("SELECT `id` FROM `item` ".$update_unseen. " LIMIT 1");
- if (dbm::is_result($unseen)) {
- $r = q("UPDATE `item` SET `unseen` = 0 $update_unseen");
- }
+ if (dbm::is_result($unseen)) {
+ $r = q("UPDATE `item` SET `unseen` = 0 $update_unseen");
}
}
$o .= conversation($a,$items,$mode,$update);
- if(!$update) {
- if(get_pconfig(local_user(),'system','infinite_scroll')) {
+ if (!$update) {
+ if (get_pconfig(local_user(),'system','infinite_scroll')) {
$o .= scroll_loader();
- } elseif(!get_config('system', 'old_pager')) {
+ } elseif (!get_config('system', 'old_pager')) {
$o .= alt_pager($a,count($items));
} else {
$o .= paginate($a);