diff options
Diffstat (limited to 'lib/apiaction.php')
-rw-r--r-- | lib/apiaction.php | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/apiaction.php b/lib/apiaction.php index b4252db95..d8249055a 100644 --- a/lib/apiaction.php +++ b/lib/apiaction.php @@ -114,7 +114,6 @@ class ApiValidationException extends Exception { } * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class ApiAction extends Action { const READ_ONLY = 1; @@ -141,7 +140,6 @@ class ApiAction extends Action * * @return boolean false if user doesn't exist */ - function prepare($args) { StatusNet::setApi(true); // reduce exception reports to aid in debugging @@ -174,7 +172,6 @@ class ApiAction extends Action * * @return void */ - function handle($args) { header('Access-Control-Allow-Origin: *'); @@ -467,7 +464,6 @@ class ApiAction extends Action $entry = array(); if (Event::handle('StartRssEntryArray', array($notice, &$entry))) { - $profile = $notice->getProfile(); // We trim() to avoid extraneous whitespace in the output @@ -557,7 +553,6 @@ class ApiAction extends Action $notifications = false; if ($source->isSubscribed($target)) { - $sub = Subscription::pkeyGet(array('subscriber' => $source->id, 'subscribed' => $target->id)); @@ -743,7 +738,6 @@ class ApiAction extends Action function showXmlTimeline($notice) { - $this->initDocument('xml'); $this->elementStart('statuses', array('type' => 'array', 'xmlns:statusnet' => 'http://status.net/schema/api/1/')); @@ -768,7 +762,6 @@ class ApiAction extends Action function showRssTimeline($notice, $title, $link, $subtitle, $suplink = null, $logo = null, $self = null) { - $this->initDocument('rss'); $this->element('title', null, $title); @@ -824,7 +817,6 @@ class ApiAction extends Action function showAtomTimeline($notice, $title, $id, $link, $subtitle=null, $suplink=null, $selfuri=null, $logo=null) { - $this->initDocument('atom'); $this->element('title', null, $title); @@ -864,12 +856,10 @@ class ApiAction extends Action } $this->endDocument('atom'); - } function showRssGroups($group, $title, $link, $subtitle) { - $this->initDocument('rss'); $this->element('title', null, $title); @@ -1017,7 +1007,6 @@ class ApiAction extends Action function showAtomGroups($group, $title, $id, $link, $subtitle=null, $selfuri=null) { - $this->initDocument('atom'); $this->element('title', null, common_xml_safe_str($title)); @@ -1048,7 +1037,6 @@ class ApiAction extends Action function showJsonTimeline($notice) { - $this->initDocument('json'); $statuses = array(); @@ -1074,7 +1062,6 @@ class ApiAction extends Action function showJsonGroups($group) { - $this->initDocument('json'); $groups = array(); @@ -1120,7 +1107,6 @@ class ApiAction extends Action function showTwitterXmlUsers($user) { - $this->initDocument('xml'); $this->elementStart('users', array('type' => 'array', 'xmlns:statusnet' => 'http://status.net/schema/api/1/')); @@ -1143,7 +1129,6 @@ class ApiAction extends Action function showJsonUsers($user) { - $this->initDocument('json'); $users = array(); @@ -1228,7 +1213,6 @@ class ApiAction extends Action $this->endXML(); break; case 'json': - // Check for JSONP callback if (isset($this->callback)) { print ')'; @@ -1374,7 +1358,6 @@ class ApiAction extends Action function getTargetUser($id) { if (empty($id)) { - // Twitter supports these other ways of passing the user ID if (is_numeric($this->arg('id'))) { return User::staticGet($this->arg('id')); @@ -1485,7 +1468,6 @@ class ApiAction extends Action */ function arg($key, $def=null) { - // XXX: Do even more input validation/scrubbing? if (array_key_exists($key, $this->args)) { @@ -1552,5 +1534,4 @@ class ApiAction extends Action return $uri; } - } |