And now for something complete different ... notices

This commit is contained in:
Michael 2018-07-31 16:22:05 +00:00
parent 53a3c85d4f
commit 7f02ca32c9
5 changed files with 12 additions and 9 deletions

View 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;
}

View 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];

View 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)

View 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);

View 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));