X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FGroup.php;h=f48dd5043190bc56b891a49caeda1527c81f6391;hb=c5c60d3d050ce2630197027a4b4375c00e270d95;hp=1746a3962ec94547ed487136eae9ce2897cce28f;hpb=ae66bcaff3c01d10fb8bee04201b692c1fae9032;p=friendica.git diff --git a/src/Model/Group.php b/src/Model/Group.php index 1746a3962e..f48dd50431 100644 --- a/src/Model/Group.php +++ b/src/Model/Group.php @@ -1,12 +1,11 @@ $gid]); if (DBM::is_result($group) && $group['deleted']) { dba::update('group', ['deleted' => 0], ['gid' => $gid]); - notice(t('A deleted group with this name was revived. Existing item permissions may apply to this group and any future members. If this is not what you intended, please create another group with a different name.') . EOL); + notice(L10n::t('A deleted group with this name was revived. Existing item permissions may apply to this group and any future members. If this is not what you intended, please create another group with a different name.') . EOL); } return true; } @@ -290,8 +289,7 @@ class Group extends BaseObject } if ($check_dead && !$use_gcontact) { - require_once 'include/acl_selectors.php'; - $return = prune_deadguys($return); + Contact::pruneUnavailable($return); } return $return; } @@ -327,13 +325,13 @@ class Group extends BaseObject logger('groups: ' . print_r($display_groups, true)); if ($label == '') { - $label = t('Default privacy group for new contacts'); + $label = L10n::t('Default privacy group for new contacts'); } - $o = replace_macros(get_markup_template('group_selection.tpl'), array( + $o = replace_macros(get_markup_template('group_selection.tpl'), [ '$label' => $label, '$groups' => $display_groups - )); + ]); return $o; } @@ -360,7 +358,7 @@ class Group extends BaseObject $display_groups = [ [ - 'text' => t('Everybody'), + 'text' => L10n::t('Everybody'), 'id' => 0, 'selected' => (($group_id == 0) ? 'group-selected' : ''), 'href' => $every, @@ -369,7 +367,7 @@ class Group extends BaseObject $stmt = dba::select('group', [], ['deleted' => 0, 'uid' => local_user()], ['order' => ['name']]); - $member_of = array(); + $member_of = []; if ($cid) { $member_of = self::getIdsByContactId($cid); } @@ -380,7 +378,7 @@ class Group extends BaseObject if ($editmode == 'full') { $groupedit = [ 'href' => 'group/' . $group['id'], - 'title' => t('edit'), + 'title' => L10n::t('edit'), ]; } else { $groupedit = null; @@ -399,16 +397,16 @@ class Group extends BaseObject $tpl = get_markup_template('group_side.tpl'); $o = replace_macros($tpl, [ - '$add' => t('add'), - '$title' => t('Groups'), + '$add' => L10n::t('add'), + '$title' => L10n::t('Groups'), '$groups' => $display_groups, 'newgroup' => $editmode == 'extended' || $editmode == 'full' ? 1 : '', 'grouppage' => 'group/', - '$edittext' => t('Edit group'), - '$ungrouped' => $every === 'contacts' ? t('Contacts not in any group') : '', - '$createtext' => t('Create a new group'), - '$creategroup' => t('Group Name: '), - '$editgroupstext' => t('Edit groups'), + '$edittext' => L10n::t('Edit group'), + '$ungrouped' => $every === 'contacts' ? L10n::t('Contacts not in any group') : '', + '$createtext' => L10n::t('Create a new group'), + '$creategroup' => L10n::t('Group Name: '), + '$editgroupstext' => L10n::t('Edit groups'), '$form_security_token' => get_form_security_token('group_edit'), ]);