diff options
author | Friendika <info@friendika.com> | 2011-01-03 13:53:26 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-01-03 13:53:26 -0800 |
commit | 0cba6b128ad98e7e32aab89462dc635c638c968a (patch) | |
tree | e727b5fd0854f822ce03cf73c773aac1d7f7a192 /mod/network.php | |
parent | a51a1007a38e763adcae5ea3865745b2ae80f921 (diff) | |
download | volse-hubzilla-0cba6b128ad98e7e32aab89462dc635c638c968a.tar.gz volse-hubzilla-0cba6b128ad98e7e32aab89462dc635c638c968a.tar.bz2 volse-hubzilla-0cba6b128ad98e7e32aab89462dc635c638c968a.zip |
fix typo, check for empty group in network page
Diffstat (limited to 'mod/network.php')
-rw-r--r-- | mod/network.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/mod/network.php b/mod/network.php index e1bec8dfa..08607fa18 100644 --- a/mod/network.php +++ b/mod/network.php @@ -104,10 +104,15 @@ function network_content(&$a, $update = 0) { } $contacts = expand_groups(array($group)); - $contact_str = implode(',',$contacts); - $sql_extra = " AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE `id` = `parent` AND `contact-id` IN ( $contact_str )) "; - $o = '<h4>' . t('Group: ') . $r[0]['name'] . '</h4>' . $o; - + if((is_array($contacts)) && count($contacts)) { + $contact_str = implode(',',$contacts); + } + else { + $contact_str = ' 0 '; + notice( t('Group is empty')); + } + $sql_extra = " AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE `id` = `parent` AND `contact-id` IN ( $contact_str )) "; + $o = '<h4>' . t('Group: ') . $r[0]['name'] . '</h4>' . $o; } $r = q("SELECT COUNT(*) AS `total` @@ -286,7 +291,7 @@ function network_content(&$a, $update = 0) { $tmp_item = replace_macros($template,array( '$id' => $item['item_id'], - '$title' => t('View $name's profile'), + '$title' => t('View $name\'s profile'), '$profile_url' => $profile_link, '$name' => $profile_name, '$thumb' => $profile_avatar, |