summaryrefslogtreecommitdiff
path: root/lib/twitterapi.php
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-07-10 18:22:19 -0700
committerZach Copley <zach@controlyourself.ca>2009-07-10 18:22:19 -0700
commit0ac08c1fb3a930af420cb9c4252bc6f499ba1141 (patch)
tree0fe845ca41be168987ee1d114e253153af598171 /lib/twitterapi.php
parent6b0468358bd1148adfcf11a18cbb19ab4e80a799 (diff)
Make get_group() behave more like get_user()
Diffstat (limited to 'lib/twitterapi.php')
-rw-r--r--lib/twitterapi.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/twitterapi.php b/lib/twitterapi.php
index d2515070d..4f3a5c0b6 100644
--- a/lib/twitterapi.php
+++ b/lib/twitterapi.php
@@ -779,19 +779,19 @@ class TwitterapiAction extends Action
if (empty($id)) {
if (is_numeric($this->arg('id'))) {
- return User::staticGet($this->arg('id'));
+ return User_group::staticGet($this->arg('id'));
} else if ($this->arg('id')) {
$nickname = common_canonical_nickname($this->arg('id'));
return User_group::staticGet('nickname', $nickname);
- } else if ($this->arg('user_id')) {
+ } else if ($this->arg('group_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_group::staticGet('id', $this->arg('user_id'));
+ if (is_numeric($this->arg('group_id'))) {
+ return User_group::staticGet('id', $this->arg('group_id'));
}
- } else if ($this->arg('screen_name')) {
- $nickname = common_canonical_nickname($this->arg('screen_name'));
- return User::staticGet('nickname', $nickname);
+ } else if ($this->arg('group_name')) {
+ $nickname = common_canonical_nickname($this->arg('group_name'));
+ return User_group::staticGet('nickname', $nickname);
}
} else if (is_numeric($id)) {