And now for something complete different ... notices
parent
53a3c85d4f
commit
7f02ca32c9
|
@ -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);
|
$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;
|
$dw_enable = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -229,7 +229,9 @@ function fromgplus_parse_query($var)
|
||||||
|
|
||||||
foreach($var as $val) {
|
foreach($var as $val) {
|
||||||
$x = explode('=', $val);
|
$x = explode('=', $val);
|
||||||
$arr[$x[0]] = $x[1];
|
if (count($x) > 1) {
|
||||||
|
$arr[$x[0]] = $x[1];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
unset($val, $x, $var);
|
unset($val, $x, $var);
|
||||||
return $arr;
|
return $arr;
|
||||||
|
@ -249,7 +251,7 @@ function fromgplus_cleanupgoogleproxy($fullImage, $image) {
|
||||||
$cleaned = [];
|
$cleaned = [];
|
||||||
|
|
||||||
$queryvar = fromgplus_parse_query($fullImage);
|
$queryvar = fromgplus_parse_query($fullImage);
|
||||||
if ($queryvar['url'] != "")
|
if (!empty($queryvar['url']))
|
||||||
$cleaned["full"] = urldecode($queryvar['url']);
|
$cleaned["full"] = urldecode($queryvar['url']);
|
||||||
else
|
else
|
||||||
$cleaned["full"] = $fullImage;
|
$cleaned["full"] = $fullImage;
|
||||||
|
@ -257,24 +259,24 @@ function fromgplus_cleanupgoogleproxy($fullImage, $image) {
|
||||||
$cleaned["full"] = "";
|
$cleaned["full"] = "";
|
||||||
|
|
||||||
$queryvar = fromgplus_parse_query($image);
|
$queryvar = fromgplus_parse_query($image);
|
||||||
if ($queryvar['url'] != "")
|
if (!empty($queryvar['url']))
|
||||||
$cleaned["preview"] = urldecode($queryvar['url']);
|
$cleaned["preview"] = urldecode($queryvar['url']);
|
||||||
else
|
else
|
||||||
$cleaned["preview"] = $image;
|
$cleaned["preview"] = $image;
|
||||||
if (@exif_imagetype($cleaned["preview"]) == 0)
|
if (@exif_imagetype($cleaned["preview"]) == 0)
|
||||||
$cleaned["preview"] = "";
|
$cleaned["preview"] = "";
|
||||||
|
|
||||||
if ($cleaned["full"] == "") {
|
if (empty($cleaned["full"])) {
|
||||||
$cleaned["full"] = $cleaned["preview"];
|
$cleaned["full"] = $cleaned["preview"];
|
||||||
$cleaned["preview"] = "";
|
$cleaned["preview"] = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cleaned["full"] != "")
|
if (!empty($cleaned["full"]))
|
||||||
$infoFull = Image::getInfoFromURL($cleaned["full"]);
|
$infoFull = Image::getInfoFromURL($cleaned["full"]);
|
||||||
else
|
else
|
||||||
$infoFull = ["0" => 0, "1" => 0];
|
$infoFull = ["0" => 0, "1" => 0];
|
||||||
|
|
||||||
if ($cleaned["preview"] != "")
|
if (!empty($cleaned["preview"]))
|
||||||
$infoPreview = Image::getInfoFromURL($cleaned["preview"]);
|
$infoPreview = Image::getInfoFromURL($cleaned["preview"]);
|
||||||
else
|
else
|
||||||
$infoFull = ["0" => 0, "1" => 0];
|
$infoFull = ["0" => 0, "1" => 0];
|
||||||
|
|
|
@ -131,7 +131,7 @@ function ljpost_post_local(&$a,&$b) {
|
||||||
|
|
||||||
$lj_enable = (($lj_post && x($_REQUEST,'ljpost_enable')) ? intval($_REQUEST['ljpost_enable']) : 0);
|
$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;
|
$lj_enable = 1;
|
||||||
|
|
||||||
if(! $lj_enable)
|
if(! $lj_enable)
|
||||||
|
|
|
@ -1229,6 +1229,7 @@ function pumpio_dopost(App $a, $client, $uid, $self, $post, $own_id, $threadcomp
|
||||||
$postarray['author-avatar'] = $post->actor->image->url;
|
$postarray['author-avatar'] = $post->actor->image->url;
|
||||||
$postarray['plink'] = $post->object->url;
|
$postarray['plink'] = $post->object->url;
|
||||||
$postarray['app'] = $post->generator->displayName;
|
$postarray['app'] = $post->generator->displayName;
|
||||||
|
$postarray['title'] = '';
|
||||||
$postarray['body'] = HTML::toBBCode($post->object->content);
|
$postarray['body'] = HTML::toBBCode($post->object->content);
|
||||||
$postarray['object'] = json_encode($post);
|
$postarray['object'] = json_encode($post);
|
||||||
|
|
||||||
|
|
|
@ -585,7 +585,7 @@ function statusnet_post_hook(App $a, &$b)
|
||||||
$result = $cb->statuses_update($postdata);
|
$result = $cb->statuses_update($postdata);
|
||||||
//$result = $dent->post('statuses/update', $postdata);
|
//$result = $dent->post('statuses/update', $postdata);
|
||||||
logger('statusnet_post send, result: ' . print_r($result, true) .
|
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)) {
|
if (!empty($result->source)) {
|
||||||
PConfig::set($b["uid"], "statusnet", "application_name", strip_tags($result->source));
|
PConfig::set($b["uid"], "statusnet", "application_name", strip_tags($result->source));
|
||||||
|
|
Loading…
Reference in New Issue