X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=statusnet%2Fstatusnet.php;h=1a8766a33f1ab900ee3f7629646f319de32b5b92;hb=ba96796363ad6777269a966774542b1ea5dcb352;hp=94f00f288029b2c9fe6e410d63183291e314c2ba;hpb=2dc299ff1748c3ec4195d318598cb2c935973e72;p=friendica-addons.git diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php index 94f00f28..1a8766a3 100644 --- a/statusnet/statusnet.php +++ b/statusnet/statusnet.php @@ -46,6 +46,7 @@ require_once 'library/twitteroauth.php'; require_once 'include/enotify.php'; use Friendica\App; +use Friendica\Content\OEmbed; use Friendica\Core\Config; use Friendica\Core\PConfig; use Friendica\Model\GContact; @@ -636,7 +637,7 @@ function statusnet_post_hook(App $a, &$b) $tempfile = ""; require_once "include/plaintext.php"; require_once "include/network.php"; - $msgarr = plaintext($a, $b, $max_char, true, 7); + $msgarr = plaintext($b, $max_char, true, 7); $msg = $msgarr["text"]; if (($msg == "") && isset($msgarr["title"])) @@ -805,7 +806,7 @@ function statusnet_prepare_body(App $a, &$b) } } - $msgarr = plaintext($a, $item, $max_char, true, 7); + $msgarr = plaintext($item, $max_char, true, 7); $msg = $msgarr["text"]; if (isset($msgarr["url"]) && ($msgarr["type"] != "photo")) { @@ -1056,7 +1057,6 @@ function statusnet_fetch_contact($uid, $contact, $create_user) $contact_id = $r[0]['id']; - require_once 'include/group.php'; Group::addMember(User::getDefaultGroup($uid), $contact_id); $photos = Photo::importProfilePhoto($contact->profile_image_url, $uid, $contact_id); @@ -1630,7 +1630,6 @@ function statusnet_complete_conversation(App $a, $uid, $self, $create_user, $nic function statusnet_convertmsg(App $a, $body, $no_tags = false) { - require_once "include/oembed.php"; require_once "include/items.php"; require_once "include/network.php"; @@ -1654,7 +1653,7 @@ function statusnet_convertmsg(App $a, $body, $no_tags = false) logger("statusnet_convertmsg: fetching data for " . $expanded_url, LOGGER_DEBUG); - $oembed_data = oembed_fetch_url($expanded_url, true); + $oembed_data = OEmbed::fetchURL($expanded_url, true); logger("statusnet_convertmsg: fetching data: done", LOGGER_DEBUG);