X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FGroup.php;h=eb4008184f943d1242ba30663352e1896f75acf3;hb=459f28776d015f44e9a449363b190f8a0dada5d5;hp=4dec84c3a3cb0ed7c826bbf5911f5f6ce6e586a0;hpb=08e9b2cc12acb3ac293a1dba4a03efb71c20b39d;p=friendica.git diff --git a/src/Model/Group.php b/src/Model/Group.php index 4dec84c3a3..eb4008184f 100644 --- a/src/Model/Group.php +++ b/src/Model/Group.php @@ -1,6 +1,6 @@ $gid]); if (DBA::isResult($group) && $group['deleted']) { DBA::update('group', ['deleted' => 0], ['id' => $gid]); - notice(DI::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.')); + DI::sysmsg()->addNotice(DI::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.')); } return true; } @@ -187,8 +187,8 @@ class Group ) AS `count` FROM `group` WHERE `group`.`uid` = ?;", - local_user(), - local_user() + DI::userSession()->getLocalUserId(), + DI::userSession()->getLocalUserId() ); return DBA::toArray($stmt); @@ -526,7 +526,7 @@ class Group */ public static function sidebarWidget(string $every = 'contact', string $each = 'group', string $editmode = 'standard', $group_id = '', int $cid = 0) { - if (!local_user()) { + if (!DI::userSession()->getLocalUserId()) { return ''; } @@ -544,7 +544,7 @@ class Group $member_of = self::getIdsByContactId($cid); } - $stmt = DBA::select('group', [], ['deleted' => false, 'uid' => local_user(), 'cid' => null], ['order' => ['name']]); + $stmt = DBA::select('group', [], ['deleted' => false, 'uid' => DI::userSession()->getLocalUserId(), 'cid' => null], ['order' => ['name']]); while ($group = DBA::fetch($stmt)) { $selected = (($group_id == $group['id']) ? ' group-selected' : '');