]> git.mxchange.org Git - friendica.git/commitdiff
add $no_photos parameter to add_page_info_data()
authorrabuzarus <rabuzarus@t-online.de>
Mon, 12 Feb 2018 02:56:20 +0000 (03:56 +0100)
committerrabuzarus <rabuzarus@t-online.de>
Mon, 12 Feb 2018 02:56:20 +0000 (03:56 +0100)
include/items.php
src/Protocol/Feed.php

index c3da8f0cc462a2e623f40b30b08e73d1231947fc..456853d80d516f614300830cc398bf9517a1ced5 100644 (file)
@@ -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;
 }
index 203a2e83565d27396dcb4dc7486e17e8a5bab5a8..8afdb25462adeca410b737bac9ca931f1e86e7bb 100644 (file)
@@ -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'];
                                }