]> git.mxchange.org Git - friendica-addons.git/commitdiff
And now for something complete different ... notices
authorMichael <heluecht@pirati.ca>
Tue, 31 Jul 2018 16:22:05 +0000 (16:22 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 31 Jul 2018 16:22:05 +0000 (16:22 +0000)
dwpost/dwpost.php
fromgplus/fromgplus.php
ljpost/ljpost.php
pumpio/pumpio.php
statusnet/statusnet.php

index 9afbcc833a454687637b0784b908d16dc490ff4d..0174bf105a247ce06f317b40ae64dbc6aafdd9f5 100644 (file)
@@ -137,7 +137,7 @@ function dwpost_post_local(App $a, array &$b)
 
        $dw_enable = (($dw_post && x($_REQUEST,'dwpost_enable')) ? intval($_REQUEST['dwpost_enable']) : 0);
 
-       if ($_REQUEST['api_source'] && intval(PConfig::get(local_user(),'dwpost','post_by_default'))) {
+       if ($b['api_source'] && intval(PConfig::get(local_user(),'dwpost','post_by_default'))) {
                $dw_enable = 1;
        }
 
index 78cbc83d06820ea5fa10461e75d37769a7debc62..9c8c7ff2305ea59fa46270fe15b34f70422faf32 100644 (file)
@@ -229,7 +229,9 @@ function fromgplus_parse_query($var)
 
        foreach($var as $val) {
                $x          = explode('=', $val);
-               $arr[$x[0]] = $x[1];
+               if (count($x) > 1) {
+                       $arr[$x[0]] = $x[1];
+               }
        }
        unset($val, $x, $var);
        return $arr;
@@ -249,7 +251,7 @@ function fromgplus_cleanupgoogleproxy($fullImage, $image) {
                $cleaned = [];
 
        $queryvar = fromgplus_parse_query($fullImage);
-       if ($queryvar['url'] != "")
+       if (!empty($queryvar['url']))
                $cleaned["full"] = urldecode($queryvar['url']);
        else
                $cleaned["full"] = $fullImage;
@@ -257,24 +259,24 @@ function fromgplus_cleanupgoogleproxy($fullImage, $image) {
                $cleaned["full"] = "";
 
        $queryvar = fromgplus_parse_query($image);
-       if ($queryvar['url'] != "")
+       if (!empty($queryvar['url']))
                        $cleaned["preview"] = urldecode($queryvar['url']);
        else
                $cleaned["preview"] = $image;
        if (@exif_imagetype($cleaned["preview"]) == 0)
                $cleaned["preview"] = "";
 
-       if ($cleaned["full"] == "") {
+       if (empty($cleaned["full"])) {
                $cleaned["full"] = $cleaned["preview"];
                $cleaned["preview"] = "";
        }
 
-       if ($cleaned["full"] != "")
+       if (!empty($cleaned["full"]))
                $infoFull = Image::getInfoFromURL($cleaned["full"]);
        else
                $infoFull = ["0" => 0, "1" => 0];
 
-       if ($cleaned["preview"] != "")
+       if (!empty($cleaned["preview"]))
                $infoPreview = Image::getInfoFromURL($cleaned["preview"]);
        else
                $infoFull = ["0" => 0, "1" => 0];
index ec99f9ba9361585971ed4b12810d44230fd67828..669788fd6079343e44273caeecec7f09fa4fbe6b 100644 (file)
@@ -131,7 +131,7 @@ function ljpost_post_local(&$a,&$b) {
 
        $lj_enable = (($lj_post && x($_REQUEST,'ljpost_enable')) ? intval($_REQUEST['ljpost_enable']) : 0);
 
-       if($_REQUEST['api_source'] && intval(PConfig::get(local_user(),'ljpost','post_by_default')))
+       if($b['api_source'] && intval(PConfig::get(local_user(),'ljpost','post_by_default')))
                $lj_enable = 1;
 
     if(! $lj_enable)
index 40c653d856caf3450e914a2537c33efed6adf74c..ce82ca3158be398d1583d3730c96648068236b2c 100644 (file)
@@ -1229,6 +1229,7 @@ function pumpio_dopost(App $a, $client, $uid, $self, $post, $own_id, $threadcomp
        $postarray['author-avatar'] = $post->actor->image->url;
        $postarray['plink'] = $post->object->url;
        $postarray['app'] = $post->generator->displayName;
+       $postarray['title'] = '';
        $postarray['body'] = HTML::toBBCode($post->object->content);
        $postarray['object'] = json_encode($post);
 
index 6f987f36b3ef478e0d7c01b2357d230e9bae14fe..92dadc4c59658de53c5d544e306f4d14c4518c6b 100644 (file)
@@ -585,7 +585,7 @@ function statusnet_post_hook(App $a, &$b)
                        $result = $cb->statuses_update($postdata);
                        //$result = $dent->post('statuses/update', $postdata);
                        logger('statusnet_post send, result: ' . print_r($result, true) .
-                               "\nmessage: " . $msg, LOGGER_DEBUG . "\nOriginal post: " . print_r($b, true) . "\nPost Data: " . print_r($postdata, true));
+                               "\nmessage: " . $msg . "\nOriginal post: " . print_r($b, true) . "\nPost Data: " . print_r($postdata, true), LOGGER_DEBUG);
 
                        if (!empty($result->source)) {
                                PConfig::set($b["uid"], "statusnet", "application_name", strip_tags($result->source));