From: Michael Date: Sat, 30 Jan 2021 23:14:05 +0000 (+0000) Subject: ItemContent is replaced X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=61d95f53021ac9ccb73cba0c89107cc6bac7f14b;p=friendica-addons.git ItemContent is replaced --- diff --git a/buffer/buffer.php b/buffer/buffer.php index 9bbdf21e..be8e7495 100644 --- a/buffer/buffer.php +++ b/buffer/buffer.php @@ -9,13 +9,13 @@ require 'addon/buffer/bufferapp.php'; use Friendica\App; +use Friendica\Content\Text\Plaintext; use Friendica\Core\Hook; use Friendica\Core\Logger; use Friendica\Core\Protocol; use Friendica\Core\Renderer; use Friendica\Database\DBA; use Friendica\DI; -use Friendica\Model\ItemContent; use Friendica\Util\Proxy as ProxyUtils; use Friendica\Util\Strings; @@ -342,7 +342,7 @@ function buffer_send(App $a, array &$b) $item = $b; - $post = ItemContent::getPlaintextPost($item, $limit, $includedlinks, $htmlmode); + $post = Plaintext::getPost($item, $limit, $includedlinks, $htmlmode); Logger::log("buffer_send: converted message ".$b["id"]." result: ".print_r($post, true), Logger::DEBUG); // The image proxy is used as a sanitizer. Buffer seems to be really picky about pictures diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php index 5d1e164a..5601d864 100644 --- a/statusnet/statusnet.php +++ b/statusnet/statusnet.php @@ -52,7 +52,6 @@ use Friendica\DI; use Friendica\Model\Contact; use Friendica\Model\Group; use Friendica\Model\Item; -use Friendica\Model\ItemContent; use Friendica\Model\Photo; use Friendica\Model\Post; use Friendica\Model\User; @@ -578,7 +577,7 @@ function statusnet_post_hook(App $a, &$b) DI::pConfig()->set($b['uid'], 'statusnet', 'max_char', $max_char); $tempfile = ""; - $msgarr = ItemContent::getPlaintextPost($b, $max_char, true, 7); + $msgarr = Plaintext::getPost($b, $max_char, true, 7); $msg = $msgarr["text"]; if (($msg == "") && isset($msgarr["title"])) @@ -729,7 +728,7 @@ function statusnet_prepare_body(App $a, &$b) } } - $msgarr = ItemContent::getPlaintextPost($item, $max_char, true, 7); + $msgarr = Plaintext::getPost($item, $max_char, true, 7); $msg = $msgarr["text"]; if (isset($msgarr["url"]) && ($msgarr["type"] != "photo")) { diff --git a/twitter/twitter.php b/twitter/twitter.php index df23e341..e1265d5d 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -81,7 +81,6 @@ use Friendica\Model\Contact; use Friendica\Model\Conversation; use Friendica\Model\Group; use Friendica\Model\Item; -use Friendica\Model\ItemContent; use Friendica\Model\ItemURI; use Friendica\Model\Post; use Friendica\Model\Tag; @@ -666,7 +665,7 @@ function twitter_post_hook(App $a, array &$b) $b['body'] = twitter_update_mentions($b['body']); - $msgarr = ItemContent::getPlaintextPost($b, $max_char, true, BBCode::TWITTER); + $msgarr = Plaintext::getPost($b, $max_char, true, BBCode::TWITTER); Logger::info('Got plaintext', ['id' => $b['id'], 'message' => $msgarr]); $msg = $msgarr["text"]; @@ -896,7 +895,7 @@ function twitter_prepare_body(App $a, array &$b) } } - $msgarr = ItemContent::getPlaintextPost($item, $max_char, true, BBCode::TWITTER); + $msgarr = Plaintext::getPost($item, $max_char, true, BBCode::TWITTER); $msg = $msgarr["text"]; if (isset($msgarr["url"]) && ($msgarr["type"] != "photo")) {