Complete incomplete URL during feed import
This commit is contained in:
parent
a0530d1066
commit
2a28591415
3 changed files with 103 additions and 10 deletions
|
|
@ -27,6 +27,14 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!empty($contact['poll'])) {
|
||||
$basepath = $contact['poll'];
|
||||
} elseif (!empty($contact['url'])) {
|
||||
$basepath = $contact['url'];
|
||||
} else {
|
||||
$basepath = '';
|
||||
}
|
||||
|
||||
$doc = new DOMDocument();
|
||||
@$doc->loadXML(trim($xml));
|
||||
$xpath = new DomXPath($doc);
|
||||
|
|
@ -344,7 +352,7 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) {
|
|||
if (title_is_body($item["title"], $body)) {
|
||||
$item["title"] = "";
|
||||
}
|
||||
$item["body"] = html2bbcode($body);
|
||||
$item["body"] = html2bbcode($body, $basepath);
|
||||
|
||||
if (($item["body"] == '') && ($item["title"] != '')) {
|
||||
$item["body"] = $item["title"];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue