diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-06-10 22:10:33 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-06-10 22:10:33 +0000 |
commit | c3e9518ab49817e05033736c6cca7605c0761cab (patch) | |
tree | b16f9f79e7b4f7eeb1c85e8143eac377f9333cc3 /lib/class/user.class.php | |
parent | 67ab0016bfb15415034ace50a63e1c8cbd3f0bd4 (diff) | |
download | ampache-c3e9518ab49817e05033736c6cca7605c0761cab.tar.gz ampache-c3e9518ab49817e05033736c6cca7605c0761cab.tar.bz2 ampache-c3e9518ab49817e05033736c6cca7605c0761cab.zip |
fixed stats recording mostly
Diffstat (limited to 'lib/class/user.class.php')
-rw-r--r-- | lib/class/user.class.php | 11 |
1 files changed, 5 insertions, 6 deletions
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 |