move extension specific parts out of user and into extensions

This commit is contained in:
Shish
2009-01-20 03:24:35 -08:00
parent f9dffb96cb
commit 12cccde8f8
3 changed files with 8 additions and 20 deletions

View File

@ -47,6 +47,11 @@ class Comment { // {{{
$this->poster_ip = $row['poster_ip'];
$this->posted = $row['posted'];
}
public static function count_comments_by_user($user) {
global $database;
return $database->db->GetOne("SELECT COUNT(*) AS count FROM comments WHERE owner_id=?", array($user->id));
}
} // }}}
class CommentList implements Extension {