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,
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);
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"])) {
}
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;
}
// 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 {
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'];
}