]> git.mxchange.org Git - friendica.git/commitdiff
spelling: resource
authorJosh Soref <2119212+jsoref@users.noreply.github.com>
Sun, 26 Mar 2023 22:42:40 +0000 (18:42 -0400)
committerJosh Soref <2119212+jsoref@users.noreply.github.com>
Mon, 27 Mar 2023 00:04:18 +0000 (20:04 -0400)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
src/Model/GServer.php
src/Model/Photo.php
src/Module/Api/Mastodon/Statuses.php
src/Module/Api/Twitter/Statuses/Update.php
src/Protocol/ActivityPub/Receiver.php
src/Util/FileSystem.php
tests/datasets/config/transformer/resource.node.config.php [new file with mode: 0644]
tests/datasets/config/transformer/ressource.node.config.php [deleted file]

index b034ded754d2862b4b77dded79abe767a9e06fa4..11d3227e8ad06ecbfb77521373d2c120e6ac45af 100644 (file)
@@ -675,7 +675,7 @@ class GServer
                        }
 
                        // All following checks are done for systems that always have got a "host-meta" endpoint.
-                       // With this check we don't have to waste time and ressources for dead systems.
+                       // With this check we don't have to waste time and resources for dead systems.
                        // Also this hopefully prevents us from receiving abuse messages.
                        if (($serverdata['network'] == Protocol::PHANTOM) || in_array($serverdata['detection-method'], self::DETECT_UNSPECIFIC)) {
                                $validHostMeta = self::validHostMeta($url);
index 2d80df15ba15568f99dbf07685c84ca8eb2e837f..29ae473abc49b57ee72a4b43d246d0ce4cc659b2 100644 (file)
@@ -881,14 +881,14 @@ class Photo
                         * Then set the permissions to public.
                         */
 
-                       self::setPermissionForRessource($image_rid, $uid, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny);
+                       self::setPermissionForResource($image_rid, $uid, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny);
                }
 
                return true;
        }
 
        /**
-        * Add permissions to photo ressource
+        * Add permissions to photo resource
         * @todo mix with previous photo permissions
         *
         * @param string $image_rid
@@ -899,7 +899,7 @@ class Photo
         * @param string $str_group_deny
         * @return void
         */
-       public static function setPermissionForRessource(string $image_rid, int $uid, string $str_contact_allow, string $str_group_allow, string $str_contact_deny, string $str_group_deny)
+       public static function setPermissionForResource(string $image_rid, int $uid, string $str_contact_allow, string $str_group_allow, string $str_contact_deny, string $str_group_deny)
        {
                $fields = ['allow_cid' => $str_contact_allow, 'allow_gid' => $str_group_allow,
                'deny_cid' => $str_contact_deny, 'deny_gid' => $str_group_deny,
index 185756cdf8634ce51c668df8c48a6e0f2a33ae42..f8f46a8956a90c9b0d3c8ad06089603a021d2378 100644 (file)
@@ -391,9 +391,8 @@ class Statuses extends BaseApi
                                continue;
                        }
 
-                       Photo::setPermissionForRessource($media[0]['resource-id'], $item['uid'], $item['allow_cid'], $item['allow_gid'], $item['deny_cid'], $item['deny_gid']);
+                       Photo::setPermissionForResource($media[0]['resource-id'], $item['uid'], $item['allow_cid'], $item['allow_gid'], $item['deny_cid'], $item['deny_gid']);
 
-                       $ressources[] = $media[0]['resource-id'];
                        $phototypes = Images::supportedTypes();
                        $ext = $phototypes[$media[0]['type']];
 
index 702cc169e2e73dcc7a23f5cdd9c49df8713b50f4..df51ff8a842096049ef2d62a20a518959ac30589 100644 (file)
@@ -153,11 +153,10 @@ class Update extends BaseApi
                                        continue;
                                }
 
-                               Photo::setPermissionForRessource($media[0]['resource-id'], $uid, $item['allow_cid'], $item['allow_gid'], $item['deny_cid'], $item['deny_gid']);
+                               Photo::setPermissionForResource($media[0]['resource-id'], $uid, $item['allow_cid'], $item['allow_gid'], $item['deny_cid'], $item['deny_gid']);
 
-                               $ressources[] = $media[0]['resource-id'];
-                               $phototypes   = Images::supportedTypes();
-                               $ext          = $phototypes[$media[0]['type']];
+                               $phototypes = Images::supportedTypes();
+                               $ext        = $phototypes[$media[0]['type']];
 
                                $attachment = [
                                        'type'        => Post\Media::IMAGE,
index 26d5d0d1c69d34fafb9efb7bf9c30a4d2668d896..468af6c72fe1ff4b5385265b622c8da473d0ac7e 100644 (file)
@@ -1370,7 +1370,7 @@ class Receiver
        }
 
        /**
-        * Fetches the object data from external ressources if needed
+        * Fetches the object data from external resources if needed
         *
         * @param string  $object_id    Object ID of the provided object
         * @param array   $object       The provided object array
index e86d6b595ab324b4262dbcdaad96675fa72b68b5..a21e7fb6066a00c27965f80eeca48651c8b4d752 100644 (file)
@@ -73,7 +73,7 @@ class FileSystem
         *
         * @param string $url The file/url
         *
-        * @return resource the open stream rssource
+        * @return resource the open stream resource
         *
         * @throws \UnexpectedValueException
         */
diff --git a/tests/datasets/config/transformer/resource.node.config.php b/tests/datasets/config/transformer/resource.node.config.php
new file mode 100644 (file)
index 0000000..f7f0f6b
--- /dev/null
@@ -0,0 +1,7 @@
+<?php
+
+return [
+       'resource' => [
+               'resources_not_allowed' => new \GuzzleHttp\Psr7\AppendStream(),
+       ],
+];
diff --git a/tests/datasets/config/transformer/ressource.node.config.php b/tests/datasets/config/transformer/ressource.node.config.php
deleted file mode 100644 (file)
index b83a139..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-
-return [
-       'ressource' => [
-               'ressources_not_allowed' => new \GuzzleHttp\Psr7\AppendStream(),
-       ],
-];