mirror of
https://github.com/friendica/friendica
synced 2025-04-28 01:50:13 +00:00
[Scrutinizer] Fix undeclared variables in src/Protocol/
- Use dba::selectFirst to remove intermediate variables `$r` - Remove unused variable `$sender` in Protocol\Email - Simplify Protocol\OStatus:fetchAuthor cascading queries
This commit is contained in:
parent
2234bb92ae
commit
d8e9ed5ff8
6 changed files with 78 additions and 98 deletions
|
@ -68,6 +68,7 @@ class Feed {
|
|||
$xpath->registerNamespace('poco', NAMESPACE_POCO);
|
||||
|
||||
$author = [];
|
||||
$entries = null;
|
||||
|
||||
// Is it RDF?
|
||||
if ($xpath->query('/rdf:RDF/rss:channel')->length > 0) {
|
||||
|
@ -369,9 +370,8 @@ class Feed {
|
|||
$item["title"] = '';
|
||||
}
|
||||
|
||||
$preview = '';
|
||||
if (!empty($contact["fetch_further_information"]) && ($contact["fetch_further_information"] < 3)) {
|
||||
$preview = "";
|
||||
|
||||
// Handle enclosures and treat them as preview picture
|
||||
foreach ($attachments AS $attachment) {
|
||||
if ($attachment["type"] == "image/jpeg") {
|
||||
|
@ -410,6 +410,7 @@ class Feed {
|
|||
if (!empty($tags)) {
|
||||
$item["tag"] = $tags;
|
||||
} else {
|
||||
// @todo $preview is never set in this case, is it intended? - @MrPetovan 2018-02-13
|
||||
$item["tag"] = add_page_keywords($item["plink"], $preview, true, $contact["ffi_keyword_blacklist"]);
|
||||
}
|
||||
$item["body"] .= "\n".$item['tag'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue