X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fgroup.php;h=edb547de6d8f00ea31561efebf63c7a3b84dbf4c;hb=384d28a6bd04648a2d15e257568a5c9f65273db4;hp=e3c7d33d4a97bd32dcba1027e6bda1002e58c16f;hpb=3426ce5f94b660d417b29fc2767b3c6487df8a4c;p=friendica.git diff --git a/include/group.php b/include/group.php index e3c7d33d4a..edb547de6d 100644 --- a/include/group.php +++ b/include/group.php @@ -109,7 +109,7 @@ function group_add_member($uid,$name,$member) { ); if(count($r)) return true; // You might question this, but - // we indicate success because the group was in fact created + // we indicate success because the group member was in fact created // -- It was just created at another time if(! count($r)) $r = q("INSERT INTO `group_member` (`uid`, `gid`, `contact-id`) @@ -162,23 +162,21 @@ function group_side($every="contacts",$each="group",$edit = false, $group_id = 0 if(! local_user()) return ''; - $createtext = t('Create a new group'); - $linktext= t('Everybody'); - $selected = (($group_id == 0) ? ' group-selected' : ''); -$o .= <<< EOT - -
-

Groups

+ $groups = array(); + + $groups[] = array( + 'text' => t('Everybody'), + 'id' => 0, + 'selected' => (($group_id == 0) ? 'group-selected' : ''), + 'href' => $every, + ); -"; - - $o .= <<< EOT - - -
-EOT; - + + $tpl = get_markup_template("group_side.tpl"); + $o = replace_macros($tpl, array( + '$title' => t('Groups'), + '$edittext' => t('Edit group'), + '$createtext' => t('Create a new group'), + '$ungrouped' => (($every === 'contacts') ? t('Contacts not in any group') : ''), + '$groups' => $groups, + '$add' => t('add'), + )); + + return $o; } @@ -246,4 +259,4 @@ function groups_containing($uid,$c) { } return $ret; -} \ No newline at end of file +}