]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/postnotice.php
ServerErrorAction always logs
[quix0rs-gnu-social.git] / actions / postnotice.php
index 0b47352964f8685538ee84ee9213e193932f9b94..eb2d63b61cf08119ba2911b130a6aaf50ee508fd 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  * Laconica - a distributed open-source microblogging tool
- * Copyright (C) 2008, Controlez-Vous, Inc.
+ * Copyright (C) 2008, 2009, Control Yourself, Inc.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
@@ -28,7 +28,7 @@ class PostnoticeAction extends Action
         parent::handle($args);
         try {
             common_remove_magic_from_request();
-            $req = OAuthRequest::from_request();
+            $req = OAuthRequest::from_request('POST', common_local_url('postnotice'));
             # Note: server-to-server function!
             $server = omb_oauth_server();
             list($consumer, $token) = $server->verify_request($req);
@@ -79,7 +79,7 @@ class PostnoticeAction extends Action
         }
         $notice = Notice::staticGet('uri', $notice_uri);
         if (!$notice) {
-            $notice = Notice::saveNew($remote_profile->id, $content, 'omb', false, 0, $notice_uri);
+            $notice = Notice::saveNew($remote_profile->id, $content, 'omb', false, null, $notice_uri);
             if (is_string($notice)) {
                 common_server_serror($notice, 500);
                 return false;