]> git.mxchange.org Git - friendica-addons.git/blobdiff - twitter/twitter.php
Merge pull request #483 from MrPetovan/task/fix-scrutinizer-issues
[friendica-addons.git] / twitter / twitter.php
index ca5da52ff0bcb69f57f596ad08e41e6e657dec01..dbd0bab87892857501517f65f14658f941bcf448 100644 (file)
@@ -225,7 +225,7 @@ function twitter_settings_post(App $a, $post)
                        PConfig::set(local_user(), 'twitter', 'oauthsecret', $token['oauth_token_secret']);
                        PConfig::set(local_user(), 'twitter', 'post', 1);
                        //  reload the Addon Settings page, if we don't do it see Bug #42
-                       goaway($a->get_baseurl() . '/settings/connectors');
+                       goaway('settings/connectors');
                } else {
                        //  if no PIN is supplied in the POST variables, the user has changed the setting
                        //  to post a tweet for every new __public__ posting to the wall
@@ -523,7 +523,7 @@ function twitter_post_hook(App $a, &$b)
 
                $max_char = 280;
                require_once "include/plaintext.php";
-               $msgarr = plaintext($a, $b, $max_char, true, 8);
+               $msgarr = plaintext($b, $max_char, true, 8);
                $msg = $msgarr["text"];
 
                if (($msg == "") && isset($msgarr["title"])) {
@@ -592,7 +592,7 @@ function twitter_post_hook(App $a, &$b)
 // -----------------
                        $max_char = 280;
                        require_once "include/plaintext.php";
-                       $msgarr = plaintext($a, $b, $max_char, true, 8);
+                       $msgarr = plaintext($b, $max_char, true, 8);
                        $msg = $msgarr["text"];
 
                        if (($msg == "") && isset($msgarr["title"])) {
@@ -789,7 +789,7 @@ function twitter_prepare_body(App $a, &$b)
                        }
                }
 
-               $msgarr = plaintext($a, $item, $max_char, true, 8);
+               $msgarr = plaintext($item, $max_char, true, 8);
                $msg = $msgarr["text"];
 
                if (isset($msgarr["url"]) && ($msgarr["type"] != "photo")) {