From 3ad2b9575fa8aec0b5fb17e6de6b76a95f7b17c5 Mon Sep 17 00:00:00 2001 From: icewing Date: Wed, 14 May 2008 11:15:05 +0000 Subject: Marcus Povey * Fixed ommission: setPublished git-svn-id: https://code.elgg.org/elgg/trunk@643 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/opendd.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/engine/lib/opendd.php b/engine/lib/opendd.php index 6d196f8e9..2c87f3265 100644 --- a/engine/lib/opendd.php +++ b/engine/lib/opendd.php @@ -6,7 +6,7 @@ * @subpackage Core * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Marcus Povey - * @version 0.1 + * @version 0.2 * @copyright Curverider Ltd 2008 * @link http://elgg.org/ */ @@ -147,7 +147,16 @@ } public function setBody($value) { $this->body = $value; } public function getBody() { return $this->body; } - + + /** + * Set the published time. + * + * @param int $time Unix timestamp + */ + public function setPublished($time) + { + $this->attributes['published'] = date("r", $time); + } /** * For serialisation, implement to return a string name of the tag eg "header" or "metadata". * @return string -- cgit v1.2.3