]> git.mxchange.org Git - friendica.git/commitdiff
spelling: attachment
authorJosh Soref <2119212+jsoref@users.noreply.github.com>
Wed, 22 Mar 2023 03:16:50 +0000 (23:16 -0400)
committerJosh Soref <2119212+jsoref@users.noreply.github.com>
Sun, 26 Mar 2023 20:03:22 +0000 (16:03 -0400)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
mods/bookmarklet-share2friendica/README.md
src/Core/Storage/Capability/ICanWriteToStorage.php
src/Factory/Api/Mastodon/Status.php
view/js/linkPreview.js

index ad30baa9dd2ef639fc3e7627ddb397040a9c10e5..45f94af748a50ff678569e0f507dfdfe97438e46 100644 (file)
@@ -20,7 +20,7 @@ javascript:(function(){f='https://myfriend.myfami.ly/bookmarklet/?url='+encodeUR
 
 *Please copy the whole script, not only the part mentioned here!*
 
-Then create a new bookmark, give it a name like "share2Friendica" and paste the script in the address field. Save it. Now you can click on that bookmarklet every time you want to share a website, you are currently reading. A new small window will open where title is prefilled and the website you want to share is put as attachement in the body of the new post.
+Then create a new bookmark, give it a name like "share2Friendica" and paste the script in the address field. Save it. Now you can click on that bookmarklet every time you want to share a website, you are currently reading. A new small window will open where title is prefilled and the website you want to share is put as attachment in the body of the new post.
 
 ## Additional notes if it doesn't work
 
index 2c6a4538497a8976b95ef086a104457c7aa2ce74..30842180a65f2a1828db6e3286045280a8aae199 100644 (file)
@@ -27,7 +27,7 @@ use Friendica\Core\Storage\Exception\StorageException;
 /**
  * Interface for writable storage backends
  *
- * Used for storages with CRUD functionality, mainly used for user data (e.g. photos, attachements).
+ * Used for storages with CRUD functionality, mainly used for user data (e.g. photos, attachments).
  * There's only one active writable storage possible. This type of storage is selectable by the current administrator.
  */
 interface ICanWriteToStorage extends ICanReadFromStorage
index 62941978ec14d7ce43b8ccbcacd150a85be4a1f8..5e5df916a6fe495f0693f445a749d9ca89a924e8 100644 (file)
@@ -55,7 +55,7 @@ class Status extends BaseFactory
        /** @var Card */
        private $mstdnCardFactory;
        /** @var Attachment */
-       private $mstdnAttachementFactory;
+       private $mstdnAttachmentFactory;
        /** @var Error */
        private $mstdnErrorFactory;
        /** @var Poll */
@@ -70,21 +70,21 @@ class Status extends BaseFactory
                Mention $mstdnMentionFactory,
                Tag $mstdnTagFactory,
                Card $mstdnCardFactory,
-               Attachment $mstdnAttachementFactory,
+               Attachment $mstdnAttachmentFactory,
                Error $mstdnErrorFactory,
                Poll $mstdnPollFactory,
                ContentItem $contentItem
        ) {
                parent::__construct($logger);
-               $this->dba                     = $dba;
-               $this->mstdnAccountFactory     = $mstdnAccountFactory;
-               $this->mstdnMentionFactory     = $mstdnMentionFactory;
-               $this->mstdnTagFactory         = $mstdnTagFactory;
-               $this->mstdnCardFactory        = $mstdnCardFactory;
-               $this->mstdnAttachementFactory = $mstdnAttachementFactory;
-               $this->mstdnErrorFactory       = $mstdnErrorFactory;
-               $this->mstdnPollFactory        = $mstdnPollFactory;
-               $this->contentItem             = $contentItem;
+               $this->dba                    = $dba;
+               $this->mstdnAccountFactory    = $mstdnAccountFactory;
+               $this->mstdnMentionFactory    = $mstdnMentionFactory;
+               $this->mstdnTagFactory        = $mstdnTagFactory;
+               $this->mstdnCardFactory       = $mstdnCardFactory;
+               $this->mstdnAttachmentFactory = $mstdnAttachmentFactory;
+               $this->mstdnErrorFactory      = $mstdnErrorFactory;
+               $this->mstdnPollFactory       = $mstdnPollFactory;
+               $this->contentItem            = $contentItem;
        }
 
        /**
@@ -206,7 +206,7 @@ class Status extends BaseFactory
                $tags        = $this->mstdnTagFactory->createFromUriId($uriId);
                if ($item['has-media']) {
                        $card        = $this->mstdnCardFactory->createFromUriId($uriId);
-                       $attachments = $this->mstdnAttachementFactory->createFromUriId($uriId);
+                       $attachments = $this->mstdnAttachmentFactory->createFromUriId($uriId);
                } else {
                        $card        = new \Friendica\Object\Api\Mastodon\Card([]);
                        $attachments = [];
@@ -250,7 +250,7 @@ class Status extends BaseFactory
                                        }
                                }
 
-                               foreach ($this->mstdnAttachementFactory->createFromUriId($shared_uri_id) as $attachment) {
+                               foreach ($this->mstdnAttachmentFactory->createFromUriId($shared_uri_id) as $attachment) {
                                        if (!in_array($attachment, $attachments)) {
                                                $attachments[] = $attachment;
                                        }
index 9300784d337d37275f44be6fe0c00825c2e62ef0..8269281480a13d28a6e0f143e06f77bd22740941 100644 (file)
                };
 
                /**
-                * Convert attachmant bbcode into an array.
+                * Convert attachment bbcode into an array.
                 * 
                 * @param {string} content Text content with the attachment bbcode.
                 * @returns {object || null}