From c3e9518ab49817e05033736c6cca7605c0761cab Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Sun, 10 Jun 2007 22:10:33 +0000 Subject: fixed stats recording mostly --- lib/class/user.class.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lib/class/user.class.php') diff --git a/lib/class/user.class.php b/lib/class/user.class.php index 4019ba98..876b4a36 100644 --- a/lib/class/user.class.php +++ b/lib/class/user.class.php @@ -511,18 +511,17 @@ class User { * update_user_stats * updates the playcount mojo for this specific user */ - function update_stats($song_id) { + public function update_stats($song_id) { $song_info = new Song($song_id); $user = $this->id; if (!$song_info->file) { return false; } - $stats = new Stats(); - $stats->insert('song',$song_id,$user); - $stats->insert('album',$song_info->album,$user); - $stats->insert('artist',$song_info->artist,$user); - $stats->insert('genre',$song_info->genre,$user); + Stats::insert('song',$song_id,$user); + Stats::insert('album',$song_info->album,$user); + Stats::insert('artist',$song_info->artist,$user); + Stats::insert('genre',$song_info->genre,$user); /** * Record this play to LastFM -- cgit