]> git.mxchange.org Git - friendica-addons.git/blobdiff - ljpost/ljpost.php
Fix white spaces
[friendica-addons.git] / ljpost / ljpost.php
index 42b0c020600505211c6983f90da7336a1802ca57..f6f2b79aaa87d93a290dc5220882bb84f7705660 100644 (file)
@@ -29,7 +29,7 @@ function ljpost_install()
        Hook::register('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
 }
 
-function ljpost_jot_nets(App &$a, array &$jotnets_fields)
+function ljpost_jot_nets(array &$jotnets_fields)
 {
        if (!DI::userSession()->getLocalUserId()) {
                return;
@@ -47,7 +47,7 @@ function ljpost_jot_nets(App &$a, array &$jotnets_fields)
        }
 }
 
-function ljpost_settings(App &$a, array &$data)
+function ljpost_settings(array &$data)
 {
        if (!DI::userSession()->getLocalUserId()) {
                return;
@@ -74,7 +74,7 @@ function ljpost_settings(App &$a, array &$data)
        ];
 }
 
-function ljpost_settings_post(App $a, array &$b)
+function ljpost_settings_post(array &$b)
 {
        if (!empty($_POST['ljpost-submit'])) {
                DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'ljpost', 'post', intval($_POST['ljpost']));
@@ -84,7 +84,7 @@ function ljpost_settings_post(App $a, array &$b)
        }
 }
 
-function ljpost_post_local(App $a, array &$b)
+function ljpost_post_local(array &$b)
 {
        // This can probably be changed to allow editing by pointing to a different API endpoint
        if ($b['edit']) {
@@ -116,7 +116,7 @@ function ljpost_post_local(App $a, array &$b)
        $b['postopts'] .= 'ljpost';
 }
 
-function ljpost_send(App $a, array &$b)
+function ljpost_send(array &$b)
 {
        if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) {
                return;
@@ -130,7 +130,7 @@ function ljpost_send(App $a, array &$b)
                return;
        }
 
-       $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], $b['body']);
+       $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], DI::contentItem()->addSharedPost($b));
 
        // LiveJournal post in the LJ user's timezone.
        // Hopefully the person's Friendica account