X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fapi.php;h=2d41cb986a4e5706c42fa6205bc8926816ae4221;hb=bfc2bda9b606b424e4dfc1053af1ecea116fb1e2;hp=2f0566b6e07a034e801db97ecc96776208169289;hpb=b5666bd27ffcc9b270ea7f1fffe1001a96d8d72b;p=friendica.git diff --git a/include/api.php b/include/api.php index 2f0566b6e0..2d41cb986a 100644 --- a/include/api.php +++ b/include/api.php @@ -42,11 +42,9 @@ use Friendica\Util\Network; use Friendica\Util\XML; require_once 'include/conversation.php'; -require_once 'include/html2plain.php'; require_once 'mod/share.php'; require_once 'mod/item.php'; require_once 'include/security.php'; -require_once 'include/html2bbcode.php'; require_once 'mod/wall_upload.php'; require_once 'mod/proxy.php'; @@ -2625,10 +2623,10 @@ function api_format_messages($item, $recipient, $sender) if ($_GET['getText'] == 'html') { $ret['text'] = BBCode::convert($item['body'], false); } elseif ($_GET['getText'] == 'plain') { - $ret['text'] = trim(html2plain(BBCode::convert(api_clean_plain_items($item['body']), false, 2, true), 0)); + $ret['text'] = trim(HTML::toPlaintext(BBCode::convert(api_clean_plain_items($item['body']), false, 2, true), 0)); } } else { - $ret['text'] = $item['title'] . "\n" . html2plain(BBCode::convert(api_clean_plain_items($item['body']), false, 2, true), 0); + $ret['text'] = $item['title'] . "\n" . HTML::toPlaintext(BBCode::convert(api_clean_plain_items($item['body']), false, 2, true), 0); } if (x($_GET, 'getUserObjects') && $_GET['getUserObjects'] == 'false') { unset($ret['sender']); @@ -2651,7 +2649,7 @@ function api_convert_item($item) // Workaround for ostatus messages where the title is identically to the body $html = BBCode::convert(api_clean_plain_items($body), false, 2, true); - $statusbody = trim(html2plain($html, 0)); + $statusbody = trim(HTML::toPlaintext($html, 0)); // handle data: images $statusbody = api_format_items_embeded_images($item, $statusbody); @@ -5933,10 +5931,12 @@ function api_saved_searches_list($type) $result = []; while ($term = $terms->fetch()) { $result[] = [ - 'name' => $term['term'], - 'query' => $term['term'], + 'created_at' => api_date(time()), + 'id' => intval($term['id']), 'id_str' => $term['id'], - 'id' => intval($term['id']) + 'name' => $term['term'], + 'position' => null, + 'query' => $term['term'] ]; }