From: Evan Prodromou Date: Sun, 21 Feb 2010 14:17:00 +0000 (-0500) Subject: Notice::saveNew() accepts url and rendered options X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9498a164805892a8af17311f7e7697b132524990;p=quix0rs-gnu-social.git Notice::saveNew() accepts url and rendered options --- diff --git a/classes/Notice.php b/classes/Notice.php index 8b8f90474d..0051cf8851 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -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