]> git.mxchange.org Git - friendica.git/commitdiff
Renamed function
authorMichael <heluecht@pirati.ca>
Tue, 1 Jun 2021 14:23:12 +0000 (14:23 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 1 Jun 2021 14:23:12 +0000 (14:23 +0000)
src/Factory/Api/Mastodon/Notification.php
src/Model/Post/UserNotification.php
src/Module/Api/Mastodon/Notifications.php

index 58c1fee9dea75a5f784f2273d919a14f8843ff2b..11c0aee3aab01ff15407e65bdc529db9d7e075e2 100644 (file)
@@ -30,7 +30,7 @@ use Friendica\Protocol\Activity;
 
 class Notification extends BaseFactory
 {
-       public function createFromNotifyId(int $id)
+       public function createFromNotificationId(int $id)
        {
                $notification = DBA::selectFirst('notification', [], ['id' => $id]);
                if (!DBA::isResult($notification)) {
index 306584bbd6a03a378f0942105792671dd6471823..38c2bdd8e81d93e417536dc4f63b24acd5b186d2 100644 (file)
@@ -289,7 +289,7 @@ class UserNotification
                        $fields['target-uri-id'] = $item['uri-id'];
                }
 
-               dba::insert('notification', $fields);
+               DBA::insert('notification', $fields);
        }
 
        /**
index 4a25224d88fcf31b6139e86b1cf4afaf30834b76..6a2a09959385aea2a4fe8a7d4a3d1b7eb07952d1 100644 (file)
@@ -46,10 +46,10 @@ class Notifications extends BaseApi
 
                if (!empty($parameters['id'])) {
                        $id = $parameters['id'];
-                       if (!DBA::exists('notify', ['id' => $id, 'uid' => $uid])) {
+                       if (!DBA::exists('notification', ['id' => $id, 'uid' => $uid])) {
                                DI::mstdnError()->RecordNotFound();
                        }
-                       System::jsonExit(DI::mstdnNotification()->createFromNotifyId($id));
+                       System::jsonExit(DI::mstdnNotification()->createFromNotificationId($id));
                }
 
                $request = self::getRequest([
@@ -120,7 +120,7 @@ class Notifications extends BaseApi
 
                $notify = DBA::select('notification', ['id'], $condition, $params);
                while ($notification = DBA::fetch($notify)) {
-                       $entry = DI::mstdnNotification()->createFromNotifyId($notification['id']);
+                       $entry = DI::mstdnNotification()->createFromNotificationId($notification['id']);
                        if (!empty($entry)) {
                                $notifications[] = $entry;
                        }