Continued:

- added spaces and curly braces
- added more TODOs as there really more to be done

Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2017-07-20 20:04:32 +02:00
parent 35ada99954
commit 25fd270959
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78

View file

@ -81,7 +81,7 @@ class DFRN
$root->appendChild($entry); $root->appendChild($entry);
} }
return(trim($doc->saveXML())); return trim($doc->saveXML());
} }
/** /**
@ -221,10 +221,8 @@ class DFRN
//$sql_extra .= file_tag_file_query('item',$category,'category'); //$sql_extra .= file_tag_file_query('item',$category,'category');
} }
if ($public_feed) { if ($public_feed && ! $converse) {
if (! $converse) { $sql_extra .= " AND `contact`.`self` = 1 ";
$sql_extra .= " AND `contact`.`self` = 1 ";
}
} }
$check_date = DateTimeFormat::utc($last_update); $check_date = DateTimeFormat::utc($last_update);
@ -425,7 +423,7 @@ class DFRN
$root->appendChild($mail); $root->appendChild($mail);
return(trim($doc->saveXML())); return trim($doc->saveXML());
} }
/** /**
@ -454,7 +452,7 @@ class DFRN
$root->appendChild($suggest); $root->appendChild($suggest);
return(trim($doc->saveXML())); return trim($doc->saveXML());
} }
/** /**
@ -513,7 +511,7 @@ class DFRN
$root->appendChild($relocate); $root->appendChild($relocate);
return(trim($doc->saveXML())); return trim($doc->saveXML());
} }
/** /**
@ -939,7 +937,7 @@ class DFRN
$htmlbody = $body; $htmlbody = $body;
if ($item['title'] != "") { if ($item['title'] != "") {
$htmlbody = "[b]".$item['title']."[/b]\n\n".$htmlbody; $htmlbody = "[b]" . $item['title'] . "[/b]\n\n" . $htmlbody;
} }
$htmlbody = BBCode::convert($htmlbody, false, 7); $htmlbody = BBCode::convert($htmlbody, false, 7);
@ -1066,6 +1064,7 @@ class DFRN
$tags = Item::getFeedTags($item); $tags = Item::getFeedTags($item);
/// @TODO Combine this with similar below if() block?
if (count($tags)) { if (count($tags)) {
foreach ($tags as $t) { foreach ($tags as $t) {
if (($type != 'html') || ($t[0] != "@")) { if (($type != 'html') || ($t[0] != "@")) {
@ -1575,7 +1574,7 @@ class DFRN
// Until now we aren't serving different sizes - but maybe later // Until now we aren't serving different sizes - but maybe later
$avatarlist = []; $avatarlist = [];
/// @todo check if "avatar" or "photo" would be the best field in the specification /// @todo check if "avatar" or "photo" would be the best field in the specification
$avatars = $xpath->query($element."/atom:link[@rel='avatar']", $context); $avatars = $xpath->query($element . "/atom:link[@rel='avatar']", $context);
foreach ($avatars as $avatar) { foreach ($avatars as $avatar) {
$href = ""; $href = "";
$width = 0; $width = 0;
@ -1595,6 +1594,7 @@ class DFRN
$avatarlist[$width] = $href; $avatarlist[$width] = $href;
} }
} }
if (count($avatarlist) > 0) { if (count($avatarlist) > 0) {
krsort($avatarlist); krsort($avatarlist);
$author["avatar"] = current($avatarlist); $author["avatar"] = current($avatarlist);
@ -2707,7 +2707,7 @@ class DFRN
if (self::updateContent($current, $item, $importer, $entrytype)) { if (self::updateContent($current, $item, $importer, $entrytype)) {
logger("Item ".$item["uri"]." was updated.", LOGGER_DEBUG); logger("Item ".$item["uri"]." was updated.", LOGGER_DEBUG);
} else { } else {
logger("Item ".$item["uri"]." already existed.", LOGGER_DEBUG); logger("Item " . $item["uri"] . " already existed.", LOGGER_DEBUG);
} }
return; return;
} }