]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/twitapihelp.php
Merge branch '0.9.x-mobile' of git@gitorious.org:~csarven/statusnet/csarven-clone...
[quix0rs-gnu-social.git] / actions / twitapihelp.php
index 1b84cb11bb744df042716ea1fada5e51002619b7..81381620e7aa65f9d90c40ced74a2ad91cbc5547 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
- * Laconica - a distributed open-source microblogging tool
- * Copyright (C) 2008, Controlez-Vous, Inc.
+ * StatusNet - the distributed open-source microblogging tool
+ * Copyright (C) 2008, 2009, StatusNet, 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
@@ -17,7 +17,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-if (!defined('LACONICA')) { exit(1); }
+if (!defined('STATUSNET') && !defined('LACONICA')) {
+    exit(1);
+}
 
 require_once(INSTALLDIR.'/lib/twitterapi.php');
 
@@ -34,14 +36,14 @@ class TwitapihelpAction extends TwitterapiAction
 
         if ($apidata['content-type'] == 'xml') {
             $this->init_document('xml');
-            common_element('ok', null, 'true');
+            $this->element('ok', null, 'true');
             $this->end_document('xml');
         } elseif ($apidata['content-type'] == 'json') {
             $this->init_document('json');
             print '"ok"';
             $this->end_document('json');
         } else {
-            common_user_error(_('API method not found!'), $code=404);
+            $this->clientError(_('API method not found!'), $code=404);
         }
 
     }
@@ -49,7 +51,7 @@ class TwitapihelpAction extends TwitterapiAction
     function downtime_schedule($args, $apidata)
     {
         parent::handle($args);
-        common_server_error(_('API method under construction.'), $code=501);
+        $this->serverError(_('API method under construction.'), $code=501);
     }
 
 }
\ No newline at end of file