summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-03-02 07:33:18 +0000
committerZach Copley <zach@status.net>2010-03-02 07:33:18 +0000
commit6c1321b108206d05b75703da22ea8abab82071bf (patch)
tree7380e7eb3f0ab121ea25413ddf6f847c8915fc2c /classes/Notice.php
parentdbb9957eea1887265532dbae000fb1fc30005988 (diff)
parent40e1b249cf1535a6074c8b32e5820c8ad6427836 (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index 2d02a9a19..3702dbcfa 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -282,12 +282,6 @@ class Notice extends Memcached_DataObject
$notice->content = $final;
- if (!empty($rendered)) {
- $notice->rendered = $rendered;
- } else {
- $notice->rendered = common_render_content($final, $notice);
- }
-
$notice->source = $source;
$notice->uri = $uri;
$notice->url = $url;
@@ -315,6 +309,12 @@ class Notice extends Memcached_DataObject
$notice->location_ns = $location_ns;
}
+ if (!empty($rendered)) {
+ $notice->rendered = $rendered;
+ } else {
+ $notice->rendered = common_render_content($final, $notice);
+ }
+
if (Event::handle('StartNoticeSave', array(&$notice))) {
// XXX: some of these functions write to the DB
@@ -973,7 +973,10 @@ class Notice extends Memcached_DataObject
$sender = Profile::staticGet($this->profile_id);
- $mentions = common_find_mentions($this->profile_id, $this->content);
+ // @todo ideally this parser information would only
+ // be calculated once.
+
+ $mentions = common_find_mentions($this->content, $this);
$replied = array();