fix typo, check for empty group in network page

This commit is contained in:
Friendika 2011-01-03 13:53:26 -08:00
parent a51a1007a3
commit 0cba6b128a
4 changed files with 13 additions and 8 deletions

View File

@ -166,7 +166,7 @@ function contacts_content(&$a) {
'$content' => t('stopped following'), '$content' => t('stopped following'),
'$nick' => $a->user['nickname'], '$nick' => $a->user['nickname'],
'$verb' => ACTIVITY_UNFOLLOW, '$verb' => ACTIVITY_UNFOLLOW,
'$ostat_follow' => '<as:verb>http://ostatus.org/schema/1.0/unfollow</as:verb>' . "\r\n"; '$ostat_follow' => '<as:verb>http://ostatus.org/schema/1.0/unfollow</as:verb>' . "\r\n"
)); ));
if((x($orig_record[0],'notify')) && (strlen($orig_record[0]['notify']))) { if((x($orig_record[0],'notify')) && (strlen($orig_record[0]['notify']))) {

View File

@ -243,7 +243,7 @@ function display_content(&$a) {
$tmp_item = replace_macros($template,array( $tmp_item = replace_macros($template,array(
'$id' => $item['item_id'], '$id' => $item['item_id'],
'$title' => t('View $name's profile'), '$title' => t('View $name\'s profile'),
'$profile_url' => $profile_link, '$profile_url' => $profile_link,
'$name' => $profile_name, '$name' => $profile_name,
'$sparkle' => $sparkle, '$sparkle' => $sparkle,

View File

@ -104,10 +104,15 @@ function network_content(&$a, $update = 0) {
} }
$contacts = expand_groups(array($group)); $contacts = expand_groups(array($group));
$contact_str = implode(',',$contacts); if((is_array($contacts)) && count($contacts)) {
$sql_extra = " AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE `id` = `parent` AND `contact-id` IN ( $contact_str )) "; $contact_str = implode(',',$contacts);
$o = '<h4>' . t('Group: ') . $r[0]['name'] . '</h4>' . $o; }
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` $r = q("SELECT COUNT(*) AS `total`
@ -286,7 +291,7 @@ function network_content(&$a, $update = 0) {
$tmp_item = replace_macros($template,array( $tmp_item = replace_macros($template,array(
'$id' => $item['item_id'], '$id' => $item['item_id'],
'$title' => t('View $name's profile'), '$title' => t('View $name\'s profile'),
'$profile_url' => $profile_link, '$profile_url' => $profile_link,
'$name' => $profile_name, '$name' => $profile_name,
'$thumb' => $profile_avatar, '$thumb' => $profile_avatar,

View File

@ -344,7 +344,7 @@ function profile_content(&$a, $update = 0) {
$tmp_item = replace_macros($template,array( $tmp_item = replace_macros($template,array(
'$id' => $item['item_id'], '$id' => $item['item_id'],
'$title' => t('View $name's profile'), '$title' => t('View $name\'s profile'),
'$profile_url' => $profile_link, '$profile_url' => $profile_link,
'$name' => $profile_name, '$name' => $profile_name,
'$thumb' => $profile_avatar, '$thumb' => $profile_avatar,