From 361a52a9c8042c26e72e85c42aff166bd531c85d Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 10 Jun 2009 13:52:15 -0700 Subject: some changes based on code review with zach --- classes/Notice.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'classes/Notice.php') diff --git a/classes/Notice.php b/classes/Notice.php index 895b5d2c7..45ea72823 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -120,7 +120,8 @@ class Notice extends Memcached_DataObject } } - static function saveNew($profile_id, $content, $source=null, $is_local=1, $reply_to=null, $uri=null) { + static function saveNew($profile_id, $content, $source=null, + $is_local=1, $reply_to=null, $uri=null, $created=null) { $profile = Profile::staticGet($profile_id); @@ -166,7 +167,11 @@ class Notice extends Memcached_DataObject $notice->query('BEGIN'); $notice->reply_to = $reply_to; - $notice->created = common_sql_now(); + if (!empty($created)) { + $notice->created = $created; + } else { + $notice->created = common_sql_now(); + } $notice->content = $final; $notice->rendered = common_render_content($final, $notice); $notice->source = $source; -- cgit v1.2.3-54-g00ecf