From 5fe7a214829dee8bbfd04cc38c09c73cd152b682 Mon Sep 17 00:00:00 2001 From: rabuzarus Date: Mon, 12 Feb 2018 03:56:20 +0100 Subject: [PATCH] add $no_photos parameter to add_page_info_data() --- include/items.php | 12 ++++++------ src/Protocol/Feed.php | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/items.php b/include/items.php index c3da8f0cc4..456853d80d 100644 --- a/include/items.php +++ b/include/items.php @@ -24,7 +24,7 @@ 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 +92,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 +120,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 +141,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; } diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index 203a2e8356..8afdb25462 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -402,7 +402,7 @@ class Feed { // We always strip the title since it will be added in the page information $item["title"] = ""; $item["body"] = $item["body"].add_page_info($item["plink"], false, $preview, ($contact["fetch_further_information"] == 2), $contact["ffi_keyword_blacklist"]); - $item["tag"] = add_page_keywords($item["plink"], false, $preview, ($contact["fetch_further_information"] == 2), $contact["ffi_keyword_blacklist"]); + $item["tag"] = add_page_keywords($item["plink"], $preview, ($contact["fetch_further_information"] == 2), $contact["ffi_keyword_blacklist"]); $item["object-type"] = ACTIVITY_OBJ_BOOKMARK; unset($item["attach"]); } else { @@ -410,7 +410,7 @@ class Feed { if (!empty($tags)) { $item["tag"] = $tags; } else { - $item["tag"] = add_page_keywords($item["plink"], false, $preview, true, $contact["ffi_keyword_blacklist"]); + $item["tag"] = add_page_keywords($item["plink"], $preview, true, $contact["ffi_keyword_blacklist"]); } $item["body"] .= "\n".$item['tag']; } -- 2.39.5