]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Notice_bookmark::saveNew() takes options arg
authorEvan Prodromou <evan@status.net>
Mon, 20 Dec 2010 17:03:33 +0000 (12:03 -0500)
committerEvan Prodromou <evan@status.net>
Mon, 20 Dec 2010 17:03:33 +0000 (12:03 -0500)
plugins/Bookmark/Notice_bookmark.php

index bff5df57d022370b9b6cd86258884f61ec7a0b9c..679064dbe9f03d6588bc8035e8cf101ec4185a79 100644 (file)
@@ -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,