From 63f1fb4259402bf2b53097d2525878a2f6daa8c4 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 9 Jul 2008 15:52:38 -0400 Subject: store rendered content on save; display pre-rendered content darcs-hash:20080709195238-84dde-a5df98439faaf7058571b5e345f165adece9c7b8.gz --- lib/stream.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/stream.php') diff --git a/lib/stream.php b/lib/stream.php index 431580b13..0cf495f60 100644 --- a/lib/stream.php +++ b/lib/stream.php @@ -78,7 +78,14 @@ class StreamAction extends Action { $profile->nickname); # FIXME: URL, image, video, audio common_element_start('p', array('class' => 'content')); - common_raw(common_render_content($notice->content, $notice)); + if ($notice->rendered) { + common_raw($notice->rendered); + } else { + # XXX: may be some uncooked notices in the DB, + # we cook them right now. This can probably disappear in future + # versions (>> 0.4.x) + common_raw(common_render_content($notice->content, $notice)); + } common_element_end('p'); $noticeurl = common_local_url('shownotice', array('notice' => $notice->id)); common_element_start('p', 'time'); -- cgit v1.2.3-54-g00ecf