// Dont't post if the post doesn't belong to us.
// This is a check for forum postings
- $self = dba::selectOne('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
+ $self = dba::selectFirst('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
if ($b['contact-id'] != $self['id']) {
return;
}
if($ltree_url && $ltree_api_token && $ltree_blog && $ltree_source) {
require_once('include/bb2diaspora.php');
- $tag_arr = array();
+ $tag_arr = [];
$tags = '';
$x = preg_match_all('/\#\[(.*?)\](.*?)\[/',$b['tag'],$matches,PREG_SET_ORDER);
$body = "## ".html_entity_decode($title)."\n\n".$body;
- $params = array(
+ $params = [
'text' => $body,
'source' => $ltree_source
// 'token' => $ltree_api_token
- );
+ ];
$result = post_url($ltree_blog,$params);
logger('libertree: ' . $result);