new _working_ group count api addition

This commit is contained in:
Hannes Mannerheim 2013-08-20 16:33:02 +02:00
parent e44fb59f91
commit d4240edf68
2 changed files with 4 additions and 7 deletions

View File

@ -9,7 +9,7 @@
* lib/apiaction.php
- add urls to larger avatars
- add urls to larger avatars and groupcount field
~LINE 213
$avatar = $profile->getAvatar(AVATAR_STREAM_SIZE);
@ -21,9 +21,8 @@
$avatar = $profile->getOriginalAvatar();
$twitter_user['profile_image_url_original'] = ($avatar) ? $avatar->displayUrl() :
Avatar::defaultImage(AVATAR_PROFILE_SIZE);
$groups = $profile->getGroups();
$groups_count = 0; while($groups->fetch()) $groups_count++;
$twitter_user['groups_count'] = $groups_count;
$twitter_user['groups_count'] = $profile->getGroups(0, null)->N;
- add the uri-field

View File

@ -220,9 +220,7 @@ class ApiAction extends Action
$twitter_user['profile_image_url_original'] = ($avatar) ? $avatar->displayUrl() :
Avatar::defaultImage(AVATAR_PROFILE_SIZE);
$groups = $profile->getGroups();
$groups_count = 0; while($groups->fetch()) $groups_count++;
$twitter_user['groups_count'] = $groups_count;
$twitter_user['groups_count'] = $profile->getGroups(0, null)->N;
$twitter_user['url'] = ($profile->homepage) ? $profile->homepage : null;
$twitter_user['protected'] = (!empty($user) && $user->private_stream) ? true : false;