]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Notice::saveNew() accepts url and rendered options
authorEvan Prodromou <evan@status.net>
Sun, 21 Feb 2010 14:17:00 +0000 (09:17 -0500)
committerEvan Prodromou <evan@status.net>
Sun, 21 Feb 2010 14:17:00 +0000 (09:17 -0500)
classes/Notice.php

index 8b8f90474da5feda8060c9ae69ae6cb575d0d661..0051cf8851df7bb2df0afb89a892ec76712c8266 100644 (file)
@@ -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