Notice::saveNew() accepts url and rendered options
This commit is contained in:
parent
6169d8a877
commit
9498a16480
@ -194,6 +194,7 @@ class Notice extends Memcached_DataObject
|
|||||||
*/
|
*/
|
||||||
static function saveNew($profile_id, $content, $source, $options=null) {
|
static function saveNew($profile_id, $content, $source, $options=null) {
|
||||||
$defaults = array('uri' => null,
|
$defaults = array('uri' => null,
|
||||||
|
'url' => null,
|
||||||
'reply_to' => null,
|
'reply_to' => null,
|
||||||
'repeat_of' => null);
|
'repeat_of' => null);
|
||||||
|
|
||||||
@ -256,9 +257,16 @@ class Notice extends Memcached_DataObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
$notice->content = $final;
|
$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->source = $source;
|
||||||
$notice->uri = $uri;
|
$notice->uri = $uri;
|
||||||
|
$notice->url = $url;
|
||||||
|
|
||||||
// Handle repeat case
|
// Handle repeat case
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user