summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-06-10 13:52:15 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-06-10 13:52:15 -0700
commit361a52a9c8042c26e72e85c42aff166bd531c85d (patch)
tree97da78637320bcb18f21fb5b1a6efd542670b607 /classes
parent5469e46ef5bd464559a648fdc02b285313132155 (diff)
some changes based on code review with zach
Diffstat (limited to 'classes')
-rw-r--r--classes/Notice.php9
-rw-r--r--classes/Notice_inbox.php5
2 files changed, 12 insertions, 2 deletions
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;
diff --git a/classes/Notice_inbox.php b/classes/Notice_inbox.php
index 8a27e1747..673e187c7 100644
--- a/classes/Notice_inbox.php
+++ b/classes/Notice_inbox.php
@@ -85,4 +85,9 @@ class Notice_inbox extends Memcached_DataObject
return $ids;
}
+
+ function &pkeyGet($kv)
+ {
+ return Memcached_DataObject::pkeyGet('Notice_inbox', $kv);
+ }
}