diff options
author | Zach Copley <zach@status.net> | 2010-01-13 17:52:25 +0000 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-01-24 16:36:05 -0800 |
commit | ba68e042a8acb9dd1054e0bc1c5cd4dfd415642e (patch) | |
tree | f91f5e2f4a9948ee5d615cf7f78e374653690c03 /actions/showapplication.php | |
parent | c0eee277d1058c9c291b3c4474cc8a72cb8c6d0e (diff) |
Fix user count
Diffstat (limited to 'actions/showapplication.php')
-rw-r--r-- | actions/showapplication.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/actions/showapplication.php b/actions/showapplication.php index bd3337136..b21b994aa 100644 --- a/actions/showapplication.php +++ b/actions/showapplication.php @@ -194,10 +194,13 @@ class ShowApplicationAction extends OwnerDesignAction $defaultAccess = ($this->application->access_type & Oauth_application::$writeAccess) ? 'read-write' : 'read-only'; $profile = Profile::staticGet($this->application->owner); - $userCnt = 0; // XXX: count how many users use the app + + $appUsers = new Oauth_application_user(); + $appUsers->application_id = $this->application->id; + $userCnt = $appUsers->count(); $this->raw(sprintf( - _('Created by %1$s - %2$s access by default - %3$d users.'), + _('created by %1$s - %2$s access by default - %3$d users'), $profile->getBestName(), $defaultAccess, $userCnt @@ -222,7 +225,7 @@ class ShowApplicationAction extends OwnerDesignAction 'class' => 'form_reset_key', 'method' => 'POST', 'action' => common_local_url('showapplication', - array('id' => $this->application->id)))); + array('id' => $this->application->id)))); $this->elementStart('fieldset'); $this->hidden('token', common_session_token()); |