$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;
}
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;
$cleaned = [];
$queryvar = fromgplus_parse_query($fullImage);
- if ($queryvar['url'] != "")
+ if (!empty($queryvar['url']))
$cleaned["full"] = urldecode($queryvar['url']);
else
$cleaned["full"] = $fullImage;
$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];
$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)
$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);
$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));