From cab75224761b675e70b4ebd1fc31601270d91177 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 20 Dec 2010 12:03:33 -0500 Subject: [PATCH] Notice_bookmark::saveNew() takes options arg --- plugins/Bookmark/Notice_bookmark.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/plugins/Bookmark/Notice_bookmark.php b/plugins/Bookmark/Notice_bookmark.php index bff5df57d0..679064dbe9 100644 --- a/plugins/Bookmark/Notice_bookmark.php +++ b/plugins/Bookmark/Notice_bookmark.php @@ -116,8 +116,12 @@ class Notice_bookmark extends Memcached_DataObject 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)) { $rawtags = preg_split('/[\s,]+/', $rawtags); } @@ -167,10 +171,10 @@ class Notice_bookmark extends Memcached_DataObject htmlspecialchars($description), implode(' ', $taglinks)); - $options = array('urls' => array($url), - 'rendered' => $rendered, - 'tags' => $tags, - 'replies' => $replies); + $options = array_merge($options, array('urls' => array($url), + 'rendered' => $rendered, + 'tags' => $tags, + 'replies' => $replies)); $saved = Notice::saveNew($user->id, $content,