mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 01:24:27 +02:00
Improved handling with wrong formatted urls and fetchinfo
This commit is contained in:
parent
724f9c80e7
commit
e5f55a5919
2 changed files with 25 additions and 3 deletions
|
@ -150,8 +150,9 @@ function add_page_info_data($data) {
|
|||
is_string($data["text"]) AND (sizeof($data["images"]) > 0))
|
||||
$data["type"] = "link";
|
||||
|
||||
if ((($data["type"] != "link") AND ($data["type"] != "video") AND ($data["type"] != "photo")) OR ($data["title"] == $url))
|
||||
if ((($data["type"] != "link") AND ($data["type"] != "video") AND ($data["type"] != "photo")) OR ($data["title"] == $data["url"])) {
|
||||
return("");
|
||||
}
|
||||
|
||||
if ($no_photos AND ($data["type"] == "photo"))
|
||||
return("");
|
||||
|
@ -167,6 +168,14 @@ function add_page_info_data($data) {
|
|||
|
||||
$text = "[attachment type='".$data["type"]."'";
|
||||
|
||||
if ($data["text"] == "") {
|
||||
$data["text"] = $data["title"];
|
||||
}
|
||||
|
||||
if ($data["text"] == "") {
|
||||
$data["text"] = $data["url"];
|
||||
}
|
||||
|
||||
if ($data["url"] != "")
|
||||
$text .= " url='".$data["url"]."'";
|
||||
if ($data["title"] != "")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue