]> git.mxchange.org Git - friendica.git/commitdiff
Changed back to suggestions by @MrPetovan
authorRoland Häder <roland@mxchange.org>
Sat, 18 Jun 2022 21:23:50 +0000 (23:23 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 18 Jun 2022 21:24:08 +0000 (23:24 +0200)
src/Model/Item.php
src/Model/Nodeinfo.php

index 10b14a4b466251c8c1e9a5154ea0e0ce8f32997b..1e3326e285d5aab0fb1d413acfc1b92bdc9b1ea9 100644 (file)
@@ -343,7 +343,7 @@ class Item
 
                Post\Category::storeTextByURIId($item['uri-id'], $item['uid'], '');
 
-               if (!Post::exists(['`uri-id` = ? AND `uid` != 0 AND NOT `deleted`', $item['uri-id']])) {
+               if (!Post::exists(["`uri-id` = ? AND `uid` != 0 AND NOT `deleted`", $item['uri-id']])) {
                        self::markForDeletion(['uri-id' => $item['uri-id'], 'uid' => 0, 'deleted' => false], $priority);
                }
 
@@ -511,7 +511,7 @@ class Item
                        }
                } elseif ($item['network'] == Protocol::OSTATUS) {
                        // Check for an existing post with the same content. There seems to be a problem with OStatus.
-                       $condition = ['`body` = ? AND `network` = ? AND `created` = ? AND `contact-id` = ? AND `uid` = ?',
+                       $condition = ["`body` = ? AND `network` = ? AND `created` = ? AND `contact-id` = ? AND `uid` = ?",
                                        $item['body'], $item['network'], $item['created'], $item['contact-id'], $item['uid']];
                        if (Post::exists($condition)) {
                                Logger::notice('duplicated item with the same body found.', $item);
index 398666185df1055afb57d194418cdc0e076163fe..2695d234d66e1ea424d4e9e58f7385756e1763c2 100644 (file)
@@ -156,7 +156,7 @@ class Nodeinfo
                return $services;
        }
 
-       public static function getOrganization()
+       public static function getOrganization(\Friendica\Core\Config\Capability\IManageConfigValues $config)
        {
                $organization = [
                        'name' => null,
@@ -164,8 +164,8 @@ class Nodeinfo
                        'account' => null
                ];
 
-               if (!empty(DI::config()->get('config', 'admin_email'))) {
-                       $adminList = explode(',', str_replace(' ', '', DI::config()->get('config', 'admin_email')));
+               if (!empty($config->get('config', 'admin_email'))) {
+                       $adminList = explode(',', str_replace(' ', '', $config->get('config', 'admin_email')));
                        $organization['contact'] = $adminList[0];
                        $administrator = User::getByEmail($adminList[0], ['username', 'nickname']);
                        if (!empty($administrator)) {