Notice::saveNew() accepts url and rendered options

This commit is contained in:
Evan Prodromou 2010-02-21 09:17:00 -05:00
parent 6169d8a877
commit 9498a16480

View File

@ -194,6 +194,7 @@ class Notice extends Memcached_DataObject
*/
static function saveNew($profile_id, $content, $source, $options=null) {
$defaults = array('uri' => null,
'url' => null,
'reply_to' => null,
'repeat_of' => null);
@ -256,9 +257,16 @@ class Notice extends Memcached_DataObject
}
$notice->content = $final;
$notice->rendered = common_render_content($final, $notice);
if (!empty($rendered)) {
$notice->rendered = $rendered;
} else {
$notice->rendered = common_render_content($final, $notice);
}
$notice->source = $source;
$notice->uri = $uri;
$notice->url = $url;
// Handle repeat case