]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/twitapistatuses.php
fix format string, again again
[quix0rs-gnu-social.git] / actions / twitapistatuses.php
index 4ad2766c0a439ccdf5ac015fe80d4bcc68e943ba..3041240dded4dd59fdff76e5da2f49f0f0637672 100644 (file)
@@ -61,7 +61,10 @@ class TwitapistatusesAction extends TwitterapiAction {
 
                # XXX: sub-optimal performance
 
-               $notice->is_local = 1;
+               if (common_config('public', 'localonly')) {
+                       $notice->is_local = 1;
+               }
+
                $notice->orderBy('created DESC, notice.id DESC');
                $notice->limit($MAX_PUBSTATUSES);
                $cnt = $notice->find();
@@ -374,6 +377,11 @@ class TwitapistatusesAction extends TwitterapiAction {
 
                parent::handle($args);
 
+               if ($_SERVER['REQUEST_METHOD'] != 'POST') {
+                       $this->client_error(_('This method requires a POST.'), 400, $apidata['content-type']);
+                       exit();
+               }
+
                $user = $apidata['user'];
                $status = $this->trimmed('status');
                $source = $this->trimmed('source');