diff options
author | Zach Copley <zach@status.net> | 2009-10-09 17:01:37 -0700 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2009-10-09 17:01:37 -0700 |
commit | 931e19073d522a41a54b5e9a77b213a10da95476 (patch) | |
tree | ca604346de91c116e280a110db10b77299752a5a /lib | |
parent | 743c844084bae75db02570d76694f4e9b79a9aa9 (diff) |
Remove dead code
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api.php | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/lib/api.php b/lib/api.php index fb51d5260..3afb20612 100644 --- a/lib/api.php +++ b/lib/api.php @@ -308,23 +308,6 @@ class ApiAction extends Action $entry['enclosures'] = $enclosures; } -/* - // Enclosure - $attachments = $notice->attachments(); - if($attachments){ - $entry['enclosures']=array(); - foreach($attachments as $attachment){ - if ($attachment->isEnclosure()) { - $enclosure=array(); - $enclosure['url']=$attachment->url; - $enclosure['mimetype']=$attachment->mimetype; - $enclosure['size']=$attachment->size; - $entry['enclosures'][]=$enclosure; - } - } - } -*/ - // Tags/Categories $tag = new Notice_tag(); $tag->notice_id = $notice->id; @@ -1100,38 +1083,6 @@ class ApiAction extends Action return; } - function get_user($id, $apidata=null) - { - 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')); - } else if ($this->arg('id')) { - $nickname = common_canonical_nickname($this->arg('id')); - return User::staticGet('nickname', $nickname); - } else if ($this->arg('user_id')) { - // This is to ensure that a non-numeric user_id still - // overrides screen_name even if it doesn't get used - if (is_numeric($this->arg('user_id'))) { - return User::staticGet('id', $this->arg('user_id')); - } - } else if ($this->arg('screen_name')) { - $nickname = common_canonical_nickname($this->arg('screen_name')); - return User::staticGet('nickname', $nickname); - } else { - // Fall back to trying the currently authenticated user - return $apidata['user']; - } - - } else if (is_numeric($id)) { - return User::staticGet($id); - } else { - $nickname = common_canonical_nickname($id); - return User::staticGet('nickname', $nickname); - } - } - function getTargetUser($id) { if (empty($id)) { @@ -1191,20 +1142,6 @@ class ApiAction extends Action } } - function get_profile($id) - { - if (is_numeric($id)) { - return Profile::staticGet($id); - } else { - $user = User::staticGet('nickname', $id); - if ($user) { - return $user->getProfile(); - } else { - return null; - } - } - } - function source_link($source) { $source_name = _($source); |