diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-07-10 10:06:20 -0700 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-07-10 10:06:20 -0700 |
commit | 6a0f0e32d5e837c3f0f2041bc206fc35d69f497c (patch) | |
tree | e9ce262b15006927ffc46c71a89ecb1a3ebfadbd /lib/command.php | |
parent | 03ccb74052ccec209adedfcd9daf4648905b322b (diff) | |
parent | bafa1ab1c532118e2230df50ed18a1b4573692b7 (diff) |
Merge branch '0.8.x' into 0.9.x
Diffstat (limited to 'lib/command.php')
-rw-r--r-- | lib/command.php | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/command.php b/lib/command.php index 564661382..4e2280bc8 100644 --- a/lib/command.php +++ b/lib/command.php @@ -97,18 +97,11 @@ class StatsCommand extends Command { function execute($channel) { + $profile = $this->user->getProfile(); - $subs = new Subscription(); - $subs->subscriber = $this->user->id; - $subs_count = (int) $subs->count() - 1; - - $subbed = new Subscription(); - $subbed->subscribed = $this->user->id; - $subbed_count = (int) $subbed->count() - 1; - - $notices = new Notice(); - $notices->profile_id = $this->user->id; - $notice_count = (int) $notices->count(); + $subs_count = $profile->subscriptionCount(); + $subbed_count = $profile->subscriberCount(); + $notice_count = $profile->noticeCount(); $channel->output($this->user, sprintf(_("Subscriptions: %1\$s\n". "Subscribers: %2\$s\n". |