mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-17 13:03:47 +00:00
get libertree plugin working
This commit is contained in:
parent
dafbc42bf4
commit
781a4ac591
1 changed files with 2 additions and 14 deletions
|
@ -139,7 +139,6 @@ function libertree_post_local(&$a,&$b) {
|
||||||
function libertree_send(&$a,&$b) {
|
function libertree_send(&$a,&$b) {
|
||||||
|
|
||||||
logger('libertree_send: invoked');
|
logger('libertree_send: invoked');
|
||||||
return;
|
|
||||||
|
|
||||||
if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited']))
|
if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited']))
|
||||||
return;
|
return;
|
||||||
|
@ -176,20 +175,9 @@ function libertree_send(&$a,&$b) {
|
||||||
// 'token' => $ltree_api_token
|
// 'token' => $ltree_api_token
|
||||||
);
|
);
|
||||||
|
|
||||||
$ch = curl_init();
|
$result = post_url($ltree_blog,$params);
|
||||||
curl_setopt($ch, CURLOPT_URL, $ltree_blog);
|
logger('libertree: ' . $result);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
|
||||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
|
|
||||||
curl_setopt($ch, CURLOPT_HEADER, false);
|
|
||||||
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
|
|
||||||
curl_setopt($ch, CURLOPT_POST, true);
|
|
||||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
|
|
||||||
|
|
||||||
$data = curl_exec($ch);
|
|
||||||
$result = curl_multi_getcontent($ch);
|
|
||||||
curl_close($ch);
|
|
||||||
|
|
||||||
logger('libertree_send: ' . $result);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue