Move remaining functions
update remaining function calls
This commit is contained in:
@@ -793,7 +793,7 @@ class DFRN
|
||||
if ($activity) {
|
||||
$entry = $doc->createElement($element);
|
||||
|
||||
$r = parse_xml_string($activity, false);
|
||||
$r = Network::parseXmlString($activity, false);
|
||||
if (!$r) {
|
||||
return false;
|
||||
}
|
||||
@@ -816,7 +816,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 = parse_xml_string("<dummy>" . $r->link . "</dummy>", false);
|
||||
$data = Network::parseXmlString("<dummy>" . $r->link . "</dummy>", false);
|
||||
if (is_object($data)) {
|
||||
foreach ($data->link as $link) {
|
||||
$attributes = [];
|
||||
@@ -1212,7 +1212,7 @@ class DFRN
|
||||
return 3;
|
||||
}
|
||||
|
||||
$res = parse_xml_string($xml);
|
||||
$res = Network::parseXmlString($xml);
|
||||
|
||||
if ((intval($res->status) != 0) || (! strlen($res->challenge)) || (! strlen($res->dfrn_id))) {
|
||||
return (($res->status) ? $res->status : 3);
|
||||
@@ -1357,7 +1357,7 @@ class DFRN
|
||||
Contact::unmarkForArchival($contact);
|
||||
}
|
||||
|
||||
$res = parse_xml_string($xml);
|
||||
$res = Network::parseXmlString($xml);
|
||||
|
||||
if (!isset($res->status)) {
|
||||
return -11;
|
||||
@@ -2188,7 +2188,7 @@ class DFRN
|
||||
if (!$verb) {
|
||||
return;
|
||||
}
|
||||
$xo = parse_xml_string($item["object"], false);
|
||||
$xo = Network::parseXmlString($item["object"], false);
|
||||
|
||||
if (($xo->type == ACTIVITY_OBJ_PERSON) && ($xo->id)) {
|
||||
// somebody was poked/prodded. Was it me?
|
||||
@@ -2310,8 +2310,8 @@ class DFRN
|
||||
}
|
||||
|
||||
if (($item["verb"] == ACTIVITY_TAG) && ($item["object-type"] == ACTIVITY_OBJ_TAGTERM)) {
|
||||
$xo = parse_xml_string($item["object"], false);
|
||||
$xt = parse_xml_string($item["target"], false);
|
||||
$xo = Network::parseXmlString($item["object"], false);
|
||||
$xt = Network::parseXmlString($item["target"], false);
|
||||
|
||||
if ($xt->type == ACTIVITY_OBJ_NOTE) {
|
||||
$r = q(
|
||||
@@ -2518,7 +2518,7 @@ class DFRN
|
||||
$item["object"] = self::transformActivity($xpath, $object, "object");
|
||||
|
||||
if (trim($item["object"]) != "") {
|
||||
$r = parse_xml_string($item["object"], false);
|
||||
$r = Network::parseXmlString($item["object"], false);
|
||||
if (isset($r->type)) {
|
||||
$item["object-type"] = $r->type;
|
||||
}
|
||||
@@ -2787,8 +2787,8 @@ class DFRN
|
||||
}
|
||||
|
||||
if (($item["verb"] == ACTIVITY_TAG) && ($item["object-type"] == ACTIVITY_OBJ_TAGTERM)) {
|
||||
$xo = parse_xml_string($item["object"], false);
|
||||
$xt = parse_xml_string($item["target"], false);
|
||||
$xo = Network::parseXmlString($item["object"], false);
|
||||
$xt = Network::parseXmlString($item["target"], false);
|
||||
|
||||
if ($xt->type == ACTIVITY_OBJ_NOTE) {
|
||||
$i = q(
|
||||
|
||||
@@ -186,7 +186,7 @@ class Diaspora
|
||||
*/
|
||||
private static function verifyMagicEnvelope($envelope)
|
||||
{
|
||||
$basedom = parse_xml_string($envelope);
|
||||
$basedom = Network::parseXmlString($envelope);
|
||||
|
||||
if (!is_object($basedom)) {
|
||||
logger("Envelope is no XML file");
|
||||
@@ -296,7 +296,7 @@ class Diaspora
|
||||
$xml = $raw;
|
||||
}
|
||||
|
||||
$basedom = parse_xml_string($xml);
|
||||
$basedom = Network::parseXmlString($xml);
|
||||
|
||||
if (!is_object($basedom)) {
|
||||
logger('Received data does not seem to be an XML. Discarding. '.$xml);
|
||||
@@ -347,7 +347,7 @@ class Diaspora
|
||||
public static function decode($importer, $xml)
|
||||
{
|
||||
$public = false;
|
||||
$basedom = parse_xml_string($xml);
|
||||
$basedom = Network::parseXmlString($xml);
|
||||
|
||||
if (!is_object($basedom)) {
|
||||
logger("XML is not parseable.");
|
||||
@@ -381,7 +381,7 @@ class Diaspora
|
||||
$decrypted = self::aesDecrypt($outer_key, $outer_iv, $ciphertext);
|
||||
|
||||
logger('decrypted: '.$decrypted, LOGGER_DEBUG);
|
||||
$idom = parse_xml_string($decrypted);
|
||||
$idom = Network::parseXmlString($decrypted);
|
||||
|
||||
$inner_iv = base64_decode($idom->iv);
|
||||
$inner_aes_key = base64_decode($idom->aes_key);
|
||||
@@ -631,7 +631,7 @@ class Diaspora
|
||||
*/
|
||||
private static function validPosting($msg)
|
||||
{
|
||||
$data = parse_xml_string($msg["message"]);
|
||||
$data = Network::parseXmlString($msg["message"]);
|
||||
|
||||
if (!is_object($data)) {
|
||||
logger("No valid XML ".$msg["message"], LOGGER_DEBUG);
|
||||
@@ -1281,7 +1281,7 @@ class Diaspora
|
||||
}
|
||||
}
|
||||
|
||||
$source_xml = parse_xml_string($x);
|
||||
$source_xml = Network::parseXmlString($x);
|
||||
|
||||
if (!is_object($source_xml)) {
|
||||
return false;
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace Friendica\Protocol;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Util\Network;
|
||||
use dba;
|
||||
use DOMDocument;
|
||||
use DOMXPath;
|
||||
@@ -243,7 +244,7 @@ class Feed {
|
||||
|
||||
$orig_plink = $item["plink"];
|
||||
|
||||
$item["plink"] = original_url($item["plink"]);
|
||||
$item["plink"] = Network::originalURL($item["plink"]);
|
||||
|
||||
$item["parent-uri"] = $item["uri"];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user