mirror of
https://github.com/friendica/friendica
synced 2025-04-28 03:10:11 +00:00
Review update
Rename function, move others
This commit is contained in:
parent
0f1be37279
commit
f04d40a37e
55 changed files with 331 additions and 326 deletions
|
@ -793,7 +793,7 @@ class DFRN
|
|||
if ($activity) {
|
||||
$entry = $doc->createElement($element);
|
||||
|
||||
$r = Network::parseXmlString($activity, false);
|
||||
$r = XML::parseString($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 = Network::parseXmlString("<dummy>" . $r->link . "</dummy>", false);
|
||||
$data = XML::parseString("<dummy>" . $r->link . "</dummy>", false);
|
||||
if (is_object($data)) {
|
||||
foreach ($data->link as $link) {
|
||||
$attributes = [];
|
||||
|
@ -1187,7 +1187,7 @@ class DFRN
|
|||
|
||||
logger('dfrn_deliver: ' . $url);
|
||||
|
||||
$ret = Network::zFetchURL($url);
|
||||
$ret = Network::curl($url);
|
||||
|
||||
if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
|
||||
return -2; // timed out
|
||||
|
@ -1212,7 +1212,7 @@ class DFRN
|
|||
return 3;
|
||||
}
|
||||
|
||||
$res = Network::parseXmlString($xml);
|
||||
$res = XML::parseString($xml);
|
||||
|
||||
if ((intval($res->status) != 0) || (! strlen($res->challenge)) || (! strlen($res->dfrn_id))) {
|
||||
return (($res->status) ? $res->status : 3);
|
||||
|
@ -1333,7 +1333,7 @@ class DFRN
|
|||
|
||||
logger('dfrn_deliver: ' . "SENDING: " . print_r($postvars, true), LOGGER_DATA);
|
||||
|
||||
$xml = Network::postURL($contact['notify'], $postvars);
|
||||
$xml = Network::post($contact['notify'], $postvars);
|
||||
|
||||
logger('dfrn_deliver: ' . "RECEIVED: " . $xml, LOGGER_DATA);
|
||||
|
||||
|
@ -1357,7 +1357,7 @@ class DFRN
|
|||
Contact::unmarkForArchival($contact);
|
||||
}
|
||||
|
||||
$res = Network::parseXmlString($xml);
|
||||
$res = XML::parseString($xml);
|
||||
|
||||
if (!isset($res->status)) {
|
||||
return -11;
|
||||
|
@ -2188,7 +2188,7 @@ class DFRN
|
|||
if (!$verb) {
|
||||
return;
|
||||
}
|
||||
$xo = Network::parseXmlString($item["object"], false);
|
||||
$xo = XML::parseString($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 = Network::parseXmlString($item["object"], false);
|
||||
$xt = Network::parseXmlString($item["target"], false);
|
||||
$xo = XML::parseString($item["object"], false);
|
||||
$xt = XML::parseString($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 = Network::parseXmlString($item["object"], false);
|
||||
$r = XML::parseString($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 = Network::parseXmlString($item["object"], false);
|
||||
$xt = Network::parseXmlString($item["target"], false);
|
||||
$xo = XML::parseString($item["object"], false);
|
||||
$xt = XML::parseString($item["target"], false);
|
||||
|
||||
if ($xt->type == ACTIVITY_OBJ_NOTE) {
|
||||
$i = q(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue