]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/newnotice.php
Merge branch '0.9.x' into 1.0.x
[quix0rs-gnu-social.git] / actions / newnotice.php
index 8f1fb1c40f74a79349d9cb65c071541988d2b232..ea832cf4e1300ec0ce75424c40f9f4e8530e1164 100644 (file)
@@ -161,7 +161,7 @@ class NewnoticeAction extends Action
 
         $replyto = intval($this->trimmed('inreplyto'));
         if ($replyto) {
-            $options['replyto'] = $replyto;
+            $options['reply_to'] = $replyto;
         }
 
         $upload = null;
@@ -204,10 +204,18 @@ class NewnoticeAction extends Action
             $options = array_merge($options, $locOptions);
         }
 
-        $notice = Notice::saveNew($user->id, $content_shortened, 'web', $options);
+        $author_id = $user->id;
+        $text      = $content_shortened;
 
-        if (isset($upload)) {
-            $upload->attachToNotice($notice);
+        if (Event::handle('StartNoticeSaveWeb', array($this, &$author_id, &$text, &$options))) {
+
+            $notice = Notice::saveNew($user->id, $content_shortened, 'web', $options);
+
+            if (isset($upload)) {
+                $upload->attachToNotice($notice);
+            }
+
+            Event::handle('EndNoticeSaveWeb', array($this, $notice));
         }
         Event::handle('EndSaveNewNoticeWeb', array($this, $user, &$content_shortened, &$options));