mirror of
https://github.com/friendica/friendica
synced 2025-04-28 00:30:10 +00:00
Merge remote-tracking branch 'upstream/develop' into write-tags
This commit is contained in:
commit
5367620467
8 changed files with 33 additions and 25 deletions
|
@ -1405,8 +1405,8 @@ class Transmitter
|
|||
*/
|
||||
private static function createAddTag($item, $data)
|
||||
{
|
||||
$object = XML::parseString($item['object'], false);
|
||||
$target = XML::parseString($item["target"], false);
|
||||
$object = XML::parseString($item['object']);
|
||||
$target = XML::parseString($item["target"]);
|
||||
|
||||
$data['diaspora:guid'] = $item['guid'];
|
||||
$data['actor'] = $item['author-link'];
|
||||
|
|
|
@ -805,7 +805,7 @@ class DFRN
|
|||
if ($activity) {
|
||||
$entry = $doc->createElement($element);
|
||||
|
||||
$r = XML::parseString($activity, false);
|
||||
$r = XML::parseString($activity);
|
||||
if (!$r) {
|
||||
return false;
|
||||
}
|
||||
|
@ -831,7 +831,7 @@ class DFRN
|
|||
$r->link = preg_replace('/\<link(.*?)\"\>/', '<link$1"/>', $r->link);
|
||||
|
||||
// XML does need a single element as root element so we add a dummy element here
|
||||
$data = XML::parseString("<dummy>" . $r->link . "</dummy>", false);
|
||||
$data = XML::parseString("<dummy>" . $r->link . "</dummy>");
|
||||
if (is_object($data)) {
|
||||
foreach ($data->link as $link) {
|
||||
$attributes = [];
|
||||
|
@ -2101,7 +2101,7 @@ class DFRN
|
|||
if (!$verb) {
|
||||
return;
|
||||
}
|
||||
$xo = XML::parseString($item["object"], false);
|
||||
$xo = XML::parseString($item["object"]);
|
||||
|
||||
if (($xo->type == Activity\ObjectType::PERSON) && ($xo->id)) {
|
||||
// somebody was poked/prodded. Was it me?
|
||||
|
@ -2224,8 +2224,8 @@ class DFRN
|
|||
}
|
||||
|
||||
if (($item["verb"] == Activity::TAG) && ($item["object-type"] == Activity\ObjectType::TAGTERM)) {
|
||||
$xo = XML::parseString($item["object"], false);
|
||||
$xt = XML::parseString($item["target"], false);
|
||||
$xo = XML::parseString($item["object"]);
|
||||
$xt = XML::parseString($item["target"]);
|
||||
|
||||
if ($xt->type == Activity\ObjectType::NOTE) {
|
||||
$item_tag = Item::selectFirst(['id', 'uri-id', 'tag'], ['uri' => $xt->id, 'uid' => $importer["importer_uid"]]);
|
||||
|
@ -2413,7 +2413,7 @@ class DFRN
|
|||
$item["object"] = self::transformActivity($xpath, $object, "object");
|
||||
|
||||
if (trim($item["object"]) != "") {
|
||||
$r = XML::parseString($item["object"], false);
|
||||
$r = XML::parseString($item["object"]);
|
||||
if (isset($r->type)) {
|
||||
$item["object-type"] = $r->type;
|
||||
}
|
||||
|
|
|
@ -323,7 +323,7 @@ class Diaspora
|
|||
*/
|
||||
private static function verifyMagicEnvelope($envelope)
|
||||
{
|
||||
$basedom = XML::parseString($envelope);
|
||||
$basedom = XML::parseString($envelope, true);
|
||||
|
||||
if (!is_object($basedom)) {
|
||||
Logger::log("Envelope is no XML file");
|
||||
|
@ -449,7 +449,7 @@ class Diaspora
|
|||
$xml = $raw;
|
||||
}
|
||||
|
||||
$basedom = XML::parseString($xml);
|
||||
$basedom = XML::parseString($xml, true);
|
||||
|
||||
if (!is_object($basedom)) {
|
||||
Logger::log('Received data does not seem to be an XML. Discarding. '.$xml);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue