X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fitems.php;h=af13898b2496d3f48d440314626a9f7b4fb37b2f;hb=12a71f0155784890d8d0d2da4899fdb43953f036;hp=c3da8f0cc462a2e623f40b30b08e73d1231947fc;hpb=e609de295742fa1de70279206d6bea91900350ba;p=friendica.git diff --git a/include/items.php b/include/items.php index c3da8f0cc4..af13898b24 100644 --- a/include/items.php +++ b/include/items.php @@ -19,12 +19,11 @@ use Friendica\Util\Network; use Friendica\Util\ParseUrl; use Friendica\Util\Temporal; -require_once 'include/bbcode.php'; require_once 'include/text.php'; require_once 'mod/share.php'; require_once 'include/enotify.php'; -function add_page_info_data($data) { +function add_page_info_data($data, $no_photos = false) { Addon::callHooks('page_info_data', $data); // It maybe is a rich content, but if it does have everything that a link has, @@ -92,7 +91,7 @@ function add_page_info_data($data) { return "\n".$text.$hashtags; } -function query_page_info($url, $no_photos = false, $photo = "", $keywords = false, $keyword_blacklist = "") { +function query_page_info($url, $photo = "", $keywords = false, $keyword_blacklist = "") { $data = ParseUrl::getSiteinfoCached($url, true); @@ -120,8 +119,8 @@ function query_page_info($url, $no_photos = false, $photo = "", $keywords = fals return $data; } -function add_page_keywords($url, $no_photos = false, $photo = "", $keywords = false, $keyword_blacklist = "") { - $data = query_page_info($url, $no_photos, $photo, $keywords, $keyword_blacklist); +function add_page_keywords($url, $photo = "", $keywords = false, $keyword_blacklist = "") { + $data = query_page_info($url, $photo, $keywords, $keyword_blacklist); $tags = ""; if (isset($data["keywords"]) && count($data["keywords"])) { @@ -141,9 +140,9 @@ function add_page_keywords($url, $no_photos = false, $photo = "", $keywords = fa } function add_page_info($url, $no_photos = false, $photo = "", $keywords = false, $keyword_blacklist = "") { - $data = query_page_info($url, $no_photos, $photo, $keywords, $keyword_blacklist); + $data = query_page_info($url, $photo, $keywords, $keyword_blacklist); - $text = add_page_info_data($data); + $text = add_page_info_data($data, $no_photos); return $text; } @@ -229,7 +228,7 @@ function add_page_info_to_body($body, $texturl = false, $no_photos = false) { * * @TODO find proper type-hints */ -function consume_feed($xml, $importer, &$contact, &$hub, $datedir = 0, $pass = 0) { +function consume_feed($xml, $importer, $contact, &$hub, $datedir = 0, $pass = 0) { if ($contact['network'] === NETWORK_OSTATUS) { if ($pass < 2) { // Test - remove before flight @@ -291,7 +290,7 @@ function subscribe_to_hub($url, $importer, $contact, $hubmode = 'subscribe') { return; } - $push_url = Config::get('system','url') . '/pubsub/' . $r[0]['nickname'] . '/' . $contact['id']; + $push_url = System::baseUrl() . '/pubsub/' . $r[0]['nickname'] . '/' . $contact['id']; // Use a single verify token, even if multiple hubs $verify_token = ((strlen($contact['hub-verify'])) ? $contact['hub-verify'] : random_string());