From 7485740d9741021b2016df80b225ae4d82b892d0 Mon Sep 17 00:00:00 2001 From: Jozef Selesi Date: Sun, 23 Nov 2008 12:41:41 +0000 Subject: Changed and extended the Atom library a little so that the code for creating entries and feeds has been considerably simplified and reduced. --- modules/atom/libraries/Atom_Entry.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'modules/atom/libraries/Atom_Entry.php') diff --git a/modules/atom/libraries/Atom_Entry.php b/modules/atom/libraries/Atom_Entry.php index 345755c2..70bc6e3a 100644 --- a/modules/atom/libraries/Atom_Entry.php +++ b/modules/atom/libraries/Atom_Entry.php @@ -24,8 +24,9 @@ class Atom_Entry_Core extends Atom_Base { return $this; } - public function updated($updated) { - $this->element->appendChild($this->dom->createElement("updated", $updated)); + public function updated($timestamp) { + $this->element->appendChild( + $this->dom->createElement("updated", atom::unix_to_internet_timestamp($timestamp))); return $this; } @@ -35,7 +36,7 @@ class Atom_Entry_Core extends Atom_Base { } public function content($text, $type="html") { - $content = $this->dom->createElement("content", $text); + $content = $this->dom->createElement("content", html::specialchars($text)); $content->setAttribute("type", $type); $this->element->appendChild($content); return $this; -- cgit v1.2.3