Move ATOM_TIME to Temporal::ATOM
This commit is contained in:
parent
c0e2ee95c5
commit
b854905150
9 changed files with 30 additions and 30 deletions
|
@ -421,7 +421,7 @@ class DFRN
|
|||
|
||||
XML::addElement($doc, $mail, "dfrn:id", $item['uri']);
|
||||
XML::addElement($doc, $mail, "dfrn:in-reply-to", $item['parent-uri']);
|
||||
XML::addElement($doc, $mail, "dfrn:sentdate", Temporal::convert($item['created'] . '+00:00', 'UTC', 'UTC', ATOM_TIME));
|
||||
XML::addElement($doc, $mail, "dfrn:sentdate", Temporal::convert($item['created'] . '+00:00', 'UTC', 'UTC', Temporal::ATOM));
|
||||
XML::addElement($doc, $mail, "dfrn:subject", $item['title']);
|
||||
XML::addElement($doc, $mail, "dfrn:content", $item['body']);
|
||||
|
||||
|
@ -587,7 +587,7 @@ class DFRN
|
|||
|
||||
/// @todo We need a way to transmit the different page flags like "PAGE_PRVGROUP"
|
||||
|
||||
XML::addElement($doc, $root, "updated", Temporal::convert("now", "UTC", "UTC", ATOM_TIME));
|
||||
XML::addElement($doc, $root, "updated", Temporal::convert("now", "UTC", "UTC", Temporal::ATOM));
|
||||
|
||||
$author = self::addAuthor($doc, $owner, $authorelement, $public);
|
||||
$root->appendChild($author);
|
||||
|
@ -622,9 +622,9 @@ class DFRN
|
|||
|
||||
$author = $doc->createElement($authorelement);
|
||||
|
||||
$namdate = Temporal::convert($owner['name-date'].'+00:00', 'UTC', 'UTC', ATOM_TIME);
|
||||
$uridate = Temporal::convert($owner['uri-date'].'+00:00', 'UTC', 'UTC', ATOM_TIME);
|
||||
$picdate = Temporal::convert($owner['avatar-date'].'+00:00', 'UTC', 'UTC', ATOM_TIME);
|
||||
$namdate = Temporal::convert($owner['name-date'].'+00:00', 'UTC', 'UTC', Temporal::ATOM);
|
||||
$uridate = Temporal::convert($owner['uri-date'].'+00:00', 'UTC', 'UTC', Temporal::ATOM);
|
||||
$picdate = Temporal::convert($owner['avatar-date'].'+00:00', 'UTC', 'UTC', Temporal::ATOM);
|
||||
|
||||
$attributes = [];
|
||||
|
||||
|
@ -903,7 +903,7 @@ class DFRN
|
|||
}
|
||||
|
||||
if ($item['deleted']) {
|
||||
$attributes = ["ref" => $item['uri'], "when" => Temporal::convert($item['edited'] . '+00:00', 'UTC', 'UTC', ATOM_TIME)];
|
||||
$attributes = ["ref" => $item['uri'], "when" => Temporal::convert($item['edited'] . '+00:00', 'UTC', 'UTC', Temporal::ATOM)];
|
||||
return XML::createElement($doc, "at:deleted-entry", "", $attributes);
|
||||
}
|
||||
|
||||
|
@ -983,8 +983,8 @@ class DFRN
|
|||
XML::addElement($doc, $entry, "id", $item["uri"]);
|
||||
XML::addElement($doc, $entry, "title", $item["title"]);
|
||||
|
||||
XML::addElement($doc, $entry, "published", Temporal::convert($item["created"] . "+00:00", "UTC", "UTC", ATOM_TIME));
|
||||
XML::addElement($doc, $entry, "updated", Temporal::convert($item["edited"] . "+00:00", "UTC", "UTC", ATOM_TIME));
|
||||
XML::addElement($doc, $entry, "published", Temporal::convert($item["created"] . "+00:00", "UTC", "UTC", Temporal::ATOM));
|
||||
XML::addElement($doc, $entry, "updated", Temporal::convert($item["edited"] . "+00:00", "UTC", "UTC", Temporal::ATOM));
|
||||
|
||||
// "dfrn:env" is used to read the content
|
||||
XML::addElement($doc, $entry, "dfrn:env", base64url_encode($body, true));
|
||||
|
|
|
@ -3593,7 +3593,7 @@ class Diaspora
|
|||
$eventdata['guid'] = $event['guid'];
|
||||
}
|
||||
|
||||
$mask = 'Y-m-d\TH:i:s\Z';
|
||||
$mask = Temporal::ATOM;
|
||||
|
||||
/// @todo - establish "all day" events in Friendica
|
||||
$eventdata["all_day"] = "false";
|
||||
|
@ -3652,7 +3652,7 @@ class Diaspora
|
|||
|
||||
$public = (($item["private"]) ? "false" : "true");
|
||||
|
||||
$created = Temporal::convert($item["created"], "UTC", "UTC", 'Y-m-d\TH:i:s\Z');
|
||||
$created = Temporal::convert($item["created"], "UTC", "UTC", Temporal::ATOM);
|
||||
|
||||
// Detect a share element and do a reshare
|
||||
if (!$item['private'] && ($ret = self::isReshare($item["body"]))) {
|
||||
|
@ -3855,7 +3855,7 @@ class Diaspora
|
|||
$parent = $p[0];
|
||||
|
||||
$text = html_entity_decode(bb2diaspora($item["body"]));
|
||||
$created = Temporal::convert($item["created"], "UTC", "UTC", 'Y-m-d\TH:i:s\Z');
|
||||
$created = Temporal::convert($item["created"], "UTC", "UTC", Temporal::ATOM);
|
||||
|
||||
$comment = ["author" => self::myHandle($owner),
|
||||
"guid" => $item["guid"],
|
||||
|
@ -4086,12 +4086,12 @@ class Diaspora
|
|||
"author" => $cnv["creator"],
|
||||
"guid" => $cnv["guid"],
|
||||
"subject" => $cnv["subject"],
|
||||
"created_at" => Temporal::convert($cnv['created'], "UTC", "UTC", 'Y-m-d\TH:i:s\Z'),
|
||||
"created_at" => Temporal::convert($cnv['created'], "UTC", "UTC", Temporal::ATOM),
|
||||
"participants" => $cnv["recips"]
|
||||
];
|
||||
|
||||
$body = bb2diaspora($item["body"]);
|
||||
$created = Temporal::convert($item["created"], "UTC", "UTC", 'Y-m-d\TH:i:s\Z');
|
||||
$created = Temporal::convert($item["created"], "UTC", "UTC", Temporal::ATOM);
|
||||
|
||||
$msg = [
|
||||
"author" => $myaddr,
|
||||
|
@ -4109,7 +4109,7 @@ class Diaspora
|
|||
"author" => $cnv["creator"],
|
||||
"guid" => $cnv["guid"],
|
||||
"subject" => $cnv["subject"],
|
||||
"created_at" => Temporal::convert($cnv['created'], "UTC", "UTC", 'Y-m-d\TH:i:s\Z'),
|
||||
"created_at" => Temporal::convert($cnv['created'], "UTC", "UTC", Temporal::ATOM),
|
||||
"participants" => $cnv["recips"],
|
||||
"message" => $msg];
|
||||
|
||||
|
|
|
@ -1273,7 +1273,7 @@ class OStatus
|
|||
XML::addElement($doc, $root, "title", $title);
|
||||
XML::addElement($doc, $root, "subtitle", sprintf("Updates from %s on %s", $owner["name"], $a->config["sitename"]));
|
||||
XML::addElement($doc, $root, "logo", $owner["photo"]);
|
||||
XML::addElement($doc, $root, "updated", Temporal::convert("now", "UTC", "UTC", ATOM_TIME));
|
||||
XML::addElement($doc, $root, "updated", Temporal::convert("now", "UTC", "UTC", Temporal::ATOM));
|
||||
|
||||
$author = self::addAuthor($doc, $owner);
|
||||
$root->appendChild($author);
|
||||
|
@ -1539,7 +1539,7 @@ class OStatus
|
|||
XML::addElement($doc, $source, "link", "", ["rel" => "alternate", "type" => "text/html", "href" => $contact["alias"]]);
|
||||
XML::addElement($doc, $source, "link", "", ["rel" => "self", "type" => "application/atom+xml", "href" => $contact["poll"]]);
|
||||
XML::addElement($doc, $source, "icon", $contact["photo"]);
|
||||
XML::addElement($doc, $source, "updated", Temporal::convert($contact["success_update"]."+00:00", "UTC", "UTC", ATOM_TIME));
|
||||
XML::addElement($doc, $source, "updated", Temporal::convert($contact["success_update"]."+00:00", "UTC", "UTC", Temporal::ATOM));
|
||||
|
||||
return $source;
|
||||
}
|
||||
|
@ -1923,8 +1923,8 @@ class OStatus
|
|||
|
||||
XML::addElement($doc, $entry, "activity:verb", $verb);
|
||||
|
||||
XML::addElement($doc, $entry, "published", Temporal::convert($item["created"]."+00:00", "UTC", "UTC", ATOM_TIME));
|
||||
XML::addElement($doc, $entry, "updated", Temporal::convert($item["edited"]."+00:00", "UTC", "UTC", ATOM_TIME));
|
||||
XML::addElement($doc, $entry, "published", Temporal::convert($item["created"]."+00:00", "UTC", "UTC", Temporal::ATOM));
|
||||
XML::addElement($doc, $entry, "updated", Temporal::convert($item["edited"]."+00:00", "UTC", "UTC", Temporal::ATOM));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue