]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Delegation.php
Issue 9657: Check the age of an item
[friendica.git] / src / Module / Delegation.php
index 8f52ec38ce7e26be09de2ce0c278600aa051e24f..f68b9db8d5cbd7d73f6cb869ad428885af97ada1 100644 (file)
@@ -1,4 +1,23 @@
 <?php
+/**
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
 
 namespace Friendica\Module;
 
@@ -9,6 +28,7 @@ use Friendica\Core\Session;
 use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Model\Contact;
+use Friendica\Model\Notify\Type;
 use Friendica\Model\User;
 use Friendica\Network\HTTPException\ForbiddenException;
 
@@ -111,7 +131,7 @@ class Delegation extends BaseModule
 
                        $identities[$key]['selected'] = ($identity['nickname'] === DI::app()->user['nickname']);
 
-                       $condition = ["`uid` = ? AND `msg` != '' AND NOT (`type` IN (?, ?)) AND NOT `seen`", $identity['uid'], NOTIFY_INTRO, NOTIFY_MAIL];
+                       $condition = ["`uid` = ? AND `msg` != '' AND NOT (`type` IN (?, ?)) AND NOT `seen`", $identity['uid'], Type::INTRO, Type::MAIL];
                        $params = ['distinct' => true, 'expression' => 'parent'];
                        $notifications = DBA::count('notify', $condition, $params);
 
@@ -124,7 +144,8 @@ class Delegation extends BaseModule
                }
 
                $o = Renderer::replaceMacros(Renderer::getMarkupTemplate('delegation.tpl'), [
-                       '$title'      => DI::l10n()->t('Manage Identities and/or Pages'),
+                       '$title'      => DI::l10n()->t('Switch between your accounts'),
+                       '$settings_label' => DI::l10n()->t('Manage your accounts'),
                        '$desc'       => DI::l10n()->t('Toggle between different identities or community/group pages which share your account details or which you have been granted "manage" permissions'),
                        '$choose'     => DI::l10n()->t('Select an identity to manage: '),
                        '$identities' => $identities,