mirror of
https://github.com/friendica/friendica
synced 2025-04-29 11:44:24 +02:00
Fix undefined variable/wrong parameter count/unknown functions
This commit is contained in:
parent
4b5894817e
commit
2978b1eef0
16 changed files with 36 additions and 33 deletions
|
@ -2500,6 +2500,7 @@ class DFRN
|
|||
|
||||
/// @todo Do we really need this check for HTML elements? (It was copied from the old function)
|
||||
if ((strpos($item['body'], '<') !== false) && (strpos($item['body'], '>') !== false)) {
|
||||
$base_url = get_app()->get_baseurl();
|
||||
$item['body'] = reltoabs($item['body'], $base_url);
|
||||
|
||||
$item['body'] = html2bb_video($item['body']);
|
||||
|
@ -3014,7 +3015,7 @@ class DFRN
|
|||
|
||||
// The account type is new since 3.5.1
|
||||
if ($xpath->query("/atom:feed/dfrn:account_type")->length > 0) {
|
||||
$accounttype = intval($xpath->evaluate("/atom:feed/dfrn:account_type/text()", $context)->item(0)->nodeValue);
|
||||
$accounttype = intval($xpath->evaluate("/atom:feed/dfrn:account_type/text()")->item(0)->nodeValue);
|
||||
|
||||
if ($accounttype != $importer["contact-type"]) {
|
||||
dba::update('contact', array('contact-type' => $accounttype), array('id' => $importer["id"]));
|
||||
|
@ -3023,7 +3024,7 @@ class DFRN
|
|||
|
||||
// is it a public forum? Private forums aren't supported with this method
|
||||
// This is deprecated since 3.5.1
|
||||
$forum = intval($xpath->evaluate("/atom:feed/dfrn:community/text()", $context)->item(0)->nodeValue);
|
||||
$forum = intval($xpath->evaluate("/atom:feed/dfrn:community/text()")->item(0)->nodeValue);
|
||||
|
||||
if ($forum != $importer["forum"]) {
|
||||
$condition = array('`forum` != ? AND `id` = ?', $forum, $importer["id"]);
|
||||
|
|
|
@ -665,7 +665,6 @@ class Diaspora
|
|||
} elseif (!in_array($fieldname, array("author_signature", "parent_author_signature", "target_author_signature"))) {
|
||||
if ($signed_data != "") {
|
||||
$signed_data .= ";";
|
||||
$signed_data_parent .= ";";
|
||||
}
|
||||
|
||||
$signed_data .= $entry;
|
||||
|
@ -2311,16 +2310,16 @@ class Diaspora
|
|||
$A = "[url=".$self[0]["url"]."]".$self[0]["name"]."[/url]";
|
||||
$B = "[url=".$contact["url"]."]".$contact["name"]."[/url]";
|
||||
$BPhoto = "[url=".$contact["url"]."][img]".$contact["thumb"]."[/img][/url]";
|
||||
$arr["body"] = sprintf(t("%1$s is now friends with %2$s"), $A, $B)."\n\n\n".$Bphoto;
|
||||
$arr["body"] = sprintf(t('%1$s is now friends with %2$s'), $A, $B)."\n\n\n".$BPhoto;
|
||||
|
||||
$arr["object"] = self::constructNewFriendObject($contact);
|
||||
|
||||
$arr["last-child"] = 1;
|
||||
|
||||
$arr["allow_cid"] = $user[0]["allow_cid"];
|
||||
$arr["allow_gid"] = $user[0]["allow_gid"];
|
||||
$arr["deny_cid"] = $user[0]["deny_cid"];
|
||||
$arr["deny_gid"] = $user[0]["deny_gid"];
|
||||
$arr["allow_cid"] = $self[0]["allow_cid"];
|
||||
$arr["allow_gid"] = $self[0]["allow_gid"];
|
||||
$arr["deny_cid"] = $self[0]["deny_cid"];
|
||||
$arr["deny_gid"] = $self[0]["deny_gid"];
|
||||
|
||||
$i = item_store($arr);
|
||||
if ($i) {
|
||||
|
@ -3209,7 +3208,7 @@ class Diaspora
|
|||
$return_code = self::transmit($owner, $contact, $envelope, $public_batch, false, $guid);
|
||||
}
|
||||
|
||||
logger("guid: ".$item["guid"]." result ".$return_code, LOGGER_DEBUG);
|
||||
logger("guid: ".$guid." result ".$return_code, LOGGER_DEBUG);
|
||||
|
||||
return $return_code;
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ class Feed {
|
|||
if ($value != "") {
|
||||
$author["author-nick"] = $value;
|
||||
}
|
||||
$value = $xpath->evaluate('atom:author/poco:address/poco:formatted/text()', $context)->item(0)->nodeValue;
|
||||
$value = $xpath->evaluate('atom:author/poco:address/poco:formatted/text()')->item(0)->nodeValue;
|
||||
if ($value != "") {
|
||||
$author["author-location"] = $value;
|
||||
}
|
||||
|
@ -299,9 +299,6 @@ class Feed {
|
|||
if ($creator != "") {
|
||||
$item["author-name"] = $creator;
|
||||
}
|
||||
if ($pubDate != "") {
|
||||
$item["edited"] = $item["created"] = $pubDate;
|
||||
}
|
||||
$creator = $xpath->query('dc:creator/text()', $entry)->item(0)->nodeValue;
|
||||
|
||||
if ($creator != "") {
|
||||
|
|
|
@ -816,7 +816,7 @@ class PortableContact
|
|||
return false;
|
||||
}
|
||||
|
||||
$server["site_name"] = $xpath->evaluate($element."//head/title/text()", $context)->item(0)->nodeValue;
|
||||
$server["site_name"] = $xpath->evaluate($element."//head/title/text()")->item(0)->nodeValue;
|
||||
return $server;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue