]> git.mxchange.org Git - friendica-addons.git/commitdiff
Mirroring: There was a problem that the title variable wasn't cleared so it could...
authorMichael Vogel <icarus@dabo.de>
Fri, 19 Jul 2013 21:34:54 +0000 (23:34 +0200)
committerMichael Vogel <icarus@dabo.de>
Fri, 19 Jul 2013 21:34:54 +0000 (23:34 +0200)
Statusnet: The activity messages are now suppressed

fbpost/fbpost.php
fromgplus/fromgplus.php
public_server/public_server.php
pumpio/pumpio.php
statusnet/statusnet.php
twitter/twitter.php

index ba60f4e64bdca3b6eb7c62ddbec399f340f7e2af..1167376a8fa564b9cee0ccbe9bd4c27cfa456784 100644 (file)
@@ -1052,11 +1052,14 @@ function fbpost_fetchwall($a, $uid) {
                $_SESSION["authenticated"] = true;
                $_SESSION["uid"] = $uid;
 
+               unset($_REQUEST);
                $_REQUEST["type"] = "wall";
                $_REQUEST["api_source"] = true;
                $_REQUEST["profile_uid"] = $uid;
                $_REQUEST["source"] = "Facebook";
 
+               $_REQUEST["title"] = "";
+
                $_REQUEST["body"] = (isset($item->message) ? escape_tags($item->message) : '');
 
                if(isset($item->name) and isset($item->link))
index 5d0e86c3d92f00a3d5db725ad12ad3a9f270b99b..fdd0b579a4f9a0a17fb440a0483dbb860d8326c9 100644 (file)
@@ -109,6 +109,7 @@ function fromgplus_post($a, $uid, $source, $body, $location) {
        $_SESSION['authenticated'] = true;
        $_SESSION['uid'] = $uid;
 
+       unset($_REQUEST);
        $_REQUEST['type'] = 'wall';
        $_REQUEST['api_source'] = true;
 
index 3711854f8a2e9f33c841bf0c76ac4f1239807f9b..becf96c34fc493aaafc1e7021a21f62e864af228 100644 (file)
@@ -43,9 +43,11 @@ function public_server_register_account($a,$b) {
        );
 
 };
-       
+
 
 function public_server_cron($a,$b) {
+       logger("public_server: cron start");
+
        require_once('include/enotify.php');
        $r = q("select * from user where account_expires_on < UTC_TIMESTAMP() + INTERVAL 5 DAY and account_expires_on > '0000-00-00 00:00:00' and
                expire_notification_sent = '0000-00-00 00:00:00' ");
@@ -116,6 +118,7 @@ function public_server_cron($a,$b) {
                }
         }
 
+       logger("public_server: cron end");
 
 }
 
index da723eca9ddead886f7a4fbb3fca4caa61c1d640..f85e8bd958b23965797099a5be4cad2cb6ab1ca0 100755 (executable)
@@ -385,14 +385,16 @@ function pumpio_send(&$a,&$b) {
                $client->client_id = $consumer_key;
                $client->client_secret = $consumer_secret;
 
+               $username = $user.'@'.$host;
+
                $success = $client->CallAPI(
                                        'https://'.$host.'/api/user/'.$user.'/feed',
                                        'POST', $params, array('FailOnAccessError'=>true, 'RequestContentType'=>'application/json'), $user);
 
                if($success)
-                       logger('pumpio_send: success');
+                       logger('pumpio_send '.$username.': success');
                else
-                       logger('pumpio_send: general error: ' . print_r($user,true));
+                       logger('pumpio_send '.$username.': general error: ' . print_r($user,true));
 
        }
 }
@@ -456,10 +458,12 @@ function pumpio_fetchtimeline($a, $uid) {
 
        logger('pumpio: fetching for user '.$uid.' '.$url.' C:'.$client->client_id.' CS:'.$client->client_secret.' T:'.$client->access_token.' TS:'.$client->access_token_secret);
 
+       $username = $user.'@'.$host;
+
        $success = $client->CallAPI($url, 'GET', array(), array('FailOnAccessError'=>true), $user);
 
        if (!$success) {
-               logger('pumpio: error fetching posts for user '.$uid." ".print_r($user, true));
+               logger('pumpio: error fetching posts for user '.$uid." ".$username." ".print_r($user, true));
                return;
        }
 
@@ -498,6 +502,7 @@ function pumpio_fetchtimeline($a, $uid) {
                                $_SESSION["authenticated"] = true;
                                $_SESSION["uid"] = $uid;
 
+                               unset($_REQUEST);
                                $_REQUEST["type"] = "wall";
                                $_REQUEST["api_source"] = true;
                                $_REQUEST["profile_uid"] = $uid;
@@ -505,6 +510,8 @@ function pumpio_fetchtimeline($a, $uid) {
 
                                if ($post->object->displayName != "")
                                        $_REQUEST["title"] = html2bbcode($post->object->displayName);
+                               else
+                                       $_REQUEST["title"] = "";
 
                                $_REQUEST["body"] = html2bbcode($post->object->content);
 
index 6b4c8010f2411304bba68b0ba8a8e5f70afa48d7..bd2312f7ae97c9337de495ea1d222fa7497d2a6d 100755 (executable)
@@ -855,6 +855,9 @@ function statusnet_fetchtimeline($a, $uid) {
                if ($first_time)
                        continue;
 
+               if ($post->source == "activity")
+                       continue;
+
                if (is_object($post->retweeted_status))
                        continue;
 
@@ -865,6 +868,7 @@ function statusnet_fetchtimeline($a, $uid) {
                        $_SESSION["authenticated"] = true;
                        $_SESSION["uid"] = $uid;
 
+                       unset($_REQUEST);
                        $_REQUEST["type"] = "wall";
                        $_REQUEST["api_source"] = true;
                        $_REQUEST["profile_uid"] = $uid;
@@ -872,6 +876,8 @@ function statusnet_fetchtimeline($a, $uid) {
 
                        //$_REQUEST["date"] = $post->created_at;
 
+                       $_REQUEST["title"] = "";
+
                        $_REQUEST["body"] = $post->text;
                        if (is_string($post->place->name))
                                $_REQUEST["location"] = $post->place->name;
index 775072e0bfd846e0fc067b52f234286f9797b40f..5e01db959f1973b2d66802dabdd501f898baeb19 100755 (executable)
@@ -678,6 +678,7 @@ function twitter_fetchtimeline($a, $uid) {
                        $_SESSION["authenticated"] = true;
                        $_SESSION["uid"] = $uid;
 
+                       unset($_REQUEST);
                        $_REQUEST["type"] = "wall";
                        $_REQUEST["api_source"] = true;
                        $_REQUEST["profile_uid"] = $uid;
@@ -685,6 +686,8 @@ function twitter_fetchtimeline($a, $uid) {
 
                        //$_REQUEST["date"] = $post->created_at;
 
+                       $_REQUEST["title"] = "";
+
                        $_REQUEST["body"] = $post->text;
                        if (is_string($post->place->name))
                                $_REQUEST["location"] = $post->place->name;