summaryrefslogtreecommitdiffstats
path: root/lib/class/stats.class.php
diff options
context:
space:
mode:
authorPaul Arthur <paul.arthur@flowerysong.com>2013-01-25 20:35:45 -0500
committerPaul Arthur <paul.arthur@flowerysong.com>2013-01-25 20:35:45 -0500
commit80f4859712b433d8cee1158951efc19e939224f4 (patch)
tree4f95eae0397a0f6b3eb0246f79a9fc67f90ea471 /lib/class/stats.class.php
parentd14b5215ebd23097f504607c1db3f653c58cf3e9 (diff)
downloadampache-80f4859712b433d8cee1158951efc19e939224f4.tar.gz
ampache-80f4859712b433d8cee1158951efc19e939224f4.tar.bz2
ampache-80f4859712b433d8cee1158951efc19e939224f4.zip
Move Catalog::clear_stats() to Stats::clear()
Diffstat (limited to 'lib/class/stats.class.php')
-rw-r--r--lib/class/stats.class.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/class/stats.class.php b/lib/class/stats.class.php
index fb7de902..e92ed994 100644
--- a/lib/class/stats.class.php
+++ b/lib/class/stats.class.php
@@ -49,6 +49,16 @@ class Stats {
} // Constructor
/**
+ * clear
+ *
+ * This clears all stats for _everything_.
+ */
+ public static function clear() {
+ Dba::write('TRUNCATE `object_count`');
+ Dba::write('UPDATE `song` SET `played` = 0';
+ }
+
+ /**
* insert
* This inserts a new record for the specified object
* with the specified information, amazing!