spelling: resource

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
Josh Soref 2023-03-26 18:42:40 -04:00
parent b2dee7c0dc
commit 2b819b8f8c
8 changed files with 17 additions and 19 deletions

View file

@ -675,7 +675,7 @@ class GServer
} }
// All following checks are done for systems that always have got a "host-meta" endpoint. // 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. // Also this hopefully prevents us from receiving abuse messages.
if (($serverdata['network'] == Protocol::PHANTOM) || in_array($serverdata['detection-method'], self::DETECT_UNSPECIFIC)) { if (($serverdata['network'] == Protocol::PHANTOM) || in_array($serverdata['detection-method'], self::DETECT_UNSPECIFIC)) {
$validHostMeta = self::validHostMeta($url); $validHostMeta = self::validHostMeta($url);

View file

@ -881,14 +881,14 @@ class Photo
* Then set the permissions to public. * 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; return true;
} }
/** /**
* Add permissions to photo ressource * Add permissions to photo resource
* @todo mix with previous photo permissions * @todo mix with previous photo permissions
* *
* @param string $image_rid * @param string $image_rid
@ -899,7 +899,7 @@ class Photo
* @param string $str_group_deny * @param string $str_group_deny
* @return void * @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, $fields = ['allow_cid' => $str_contact_allow, 'allow_gid' => $str_group_allow,
'deny_cid' => $str_contact_deny, 'deny_gid' => $str_group_deny, 'deny_cid' => $str_contact_deny, 'deny_gid' => $str_group_deny,

View file

@ -391,9 +391,8 @@ class Statuses extends BaseApi
continue; 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(); $phototypes = Images::supportedTypes();
$ext = $phototypes[$media[0]['type']]; $ext = $phototypes[$media[0]['type']];

View file

@ -153,11 +153,10 @@ class Update extends BaseApi
continue; 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();
$phototypes = Images::supportedTypes(); $ext = $phototypes[$media[0]['type']];
$ext = $phototypes[$media[0]['type']];
$attachment = [ $attachment = [
'type' => Post\Media::IMAGE, 'type' => Post\Media::IMAGE,

View 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 string $object_id Object ID of the provided object
* @param array $object The provided object array * @param array $object The provided object array

View file

@ -73,7 +73,7 @@ class FileSystem
* *
* @param string $url The file/url * @param string $url The file/url
* *
* @return resource the open stream rssource * @return resource the open stream resource
* *
* @throws \UnexpectedValueException * @throws \UnexpectedValueException
*/ */

View file

@ -0,0 +1,7 @@
<?php
return [
'resource' => [
'resources_not_allowed' => new \GuzzleHttp\Psr7\AppendStream(),
],
];

View file

@ -1,7 +0,0 @@
<?php
return [
'ressource' => [
'ressources_not_allowed' => new \GuzzleHttp\Psr7\AppendStream(),
],
];