Notice_bookmark::saveNew() takes options arg

This commit is contained in:
Evan Prodromou 2010-12-20 12:03:33 -05:00
parent cb76465cfa
commit cab7522476

View File

@ -116,8 +116,12 @@ class Notice_bookmark extends Memcached_DataObject
return array(false, false, false); return array(false, false, false);
} }
static function saveNew($user, $title, $url, $rawtags, $description) static function saveNew($user, $title, $url, $rawtags, $description, $options=null)
{ {
if (empty($options)) {
$options = array();
}
if (is_string($rawtags)) { if (is_string($rawtags)) {
$rawtags = preg_split('/[\s,]+/', $rawtags); $rawtags = preg_split('/[\s,]+/', $rawtags);
} }
@ -167,10 +171,10 @@ class Notice_bookmark extends Memcached_DataObject
htmlspecialchars($description), htmlspecialchars($description),
implode(' ', $taglinks)); implode(' ', $taglinks));
$options = array('urls' => array($url), $options = array_merge($options, array('urls' => array($url),
'rendered' => $rendered, 'rendered' => $rendered,
'tags' => $tags, 'tags' => $tags,
'replies' => $replies); 'replies' => $replies));
$saved = Notice::saveNew($user->id, $saved = Notice::saveNew($user->id,
$content, $content,