[various] Replace *_page_info function calls with Content\PageInfo equivalent

This commit is contained in:
Hypolite Petovan 2020-07-14 10:17:17 -04:00
parent 314d9c1cc1
commit b5f14cb559
3 changed files with 9 additions and 6 deletions

View file

@ -8,6 +8,7 @@
*/
require_once 'mod/item.php';
use Friendica\App;
use Friendica\Content\PageInfo;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
@ -185,7 +186,7 @@ function ifttt_message($uid, $item)
}
if ($item['type'] == 'link') {
$data = query_page_info($item['link']);
$data = PageInfo::queryUrl($item['link']);
if (isset($item['title']) && (trim($item['title']) != '')) {
$data['title'] = $item['title'];
@ -195,7 +196,7 @@ function ifttt_message($uid, $item)
$data['text'] = $item['description'];
}
$_REQUEST['body'] .= add_page_info_data($data);
$_REQUEST['body'] .= "\n" . PageInfo::getFooterFromData($data);
} elseif (($item['type'] == 'photo') && ($item['image'] != '')) {
$_REQUEST['body'] .= "\n\n[img]" . $item['image'] . "[/img]\n";
}