]> git.mxchange.org Git - friendica.git/blobdiff - src/Factory/Notification/Notification.php
Fix notices
[friendica.git] / src / Factory / Notification / Notification.php
index 8be4eaaea7c23dffd2500f769aa8ea43b4e8872e..1167c5a75ce63981cd948162d029e08f13b9bcaa 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -56,7 +56,7 @@ class Notification extends BaseFactory
 {
        /** @var Database */
        private $dba;
-       /** @var Repository\Notify */
+       /** @var Repository\Notification */
        private $notification;
        /** @var BaseURL */
        private $baseUrl;
@@ -65,7 +65,7 @@ class Notification extends BaseFactory
        /** @var string */
        private $nurl;
 
-       public function __construct(LoggerInterface $logger, Database $dba, Repository\Notify $notification, BaseURL $baseUrl, L10n $l10n, App $app, IPConfig $pConfig, ISession $session)
+       public function __construct(LoggerInterface $logger, Database $dba, Repository\Notification $notification, BaseURL $baseUrl, L10n $l10n, App $app, IPConfig $pConfig, ISession $session)
        {
                parent::__construct($logger);
 
@@ -302,11 +302,7 @@ class Notification extends BaseFactory
         */
        public function getPersonalList(bool $seen = false, int $start = 0, int $limit = BaseNotifications::DEFAULT_PAGE_LIMIT)
        {
-               $myUrl    = str_replace('http://', '', $this->nurl);
-               $diaspUrl = str_replace('/profile/', '/u/', $myUrl);
-
-               $condition = ["NOT `wall` AND `uid` = ? AND (`item`.`author-id` = ? OR `item`.`tag` REGEXP ? OR `item`.`tag` REGEXP ?)",
-                       local_user(), public_contact(), $myUrl . '\\]', $diaspUrl . '\\]'];
+               $condition = ["NOT `wall` AND `uid` = ? AND `author-id` = ?", local_user(), public_contact()];
 
                if (!$seen) {
                        $condition[0] .= " AND `unseen`";