mirror of
https://github.com/friendica/friendica
synced 2025-04-24 07:50:11 +00:00
Ping is now using a standard routine to generate the xml.
This commit is contained in:
parent
dbab4db754
commit
0ea9af3d7d
2 changed files with 114 additions and 115 deletions
|
@ -61,6 +61,18 @@ class xml {
|
|||
continue;
|
||||
}
|
||||
|
||||
$element_parts = explode(":", $key);
|
||||
if ((count($element_parts) > 1) AND isset($namespaces[$element_parts[0]]))
|
||||
$namespace = $namespaces[$element_parts[0]];
|
||||
elseif (isset($namespaces[""])) {
|
||||
$namespace = $namespaces[""];
|
||||
} else
|
||||
$namespace = NULL;
|
||||
|
||||
// Remove undefined namespaces from the key
|
||||
if ((count($element_parts) > 1) AND is_null($namespace))
|
||||
$key = $element_parts[1];
|
||||
|
||||
if (substr($key, 0, 11) == "@attributes") {
|
||||
if (!isset($element) OR !is_array($value))
|
||||
continue;
|
||||
|
@ -78,14 +90,6 @@ class xml {
|
|||
continue;
|
||||
}
|
||||
|
||||
$element_parts = explode(":", $key);
|
||||
if ((count($element_parts) > 1) AND isset($namespaces[$element_parts[0]]))
|
||||
$namespace = $namespaces[$element_parts[0]];
|
||||
elseif (isset($namespaces[""]))
|
||||
$namespace = $namespaces[""];
|
||||
else
|
||||
$namespace = NULL;
|
||||
|
||||
if (!is_array($value))
|
||||
$element = $xml->addChild($key, xmlify($value), $namespace);
|
||||
elseif (is_array($value)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue