summaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorpb1dft <pb1dft@ampache>2006-11-09 01:37:19 +0000
committerpb1dft <pb1dft@ampache>2006-11-09 01:37:19 +0000
commit29aca5c21898ad71bbb537bf533a8adf0e74978d (patch)
tree0b94d25c1816de63096fd52b04ba14abf9451069 /admin
parent70853913cf0d21bd44643c7333dd5810fe5a81d3 (diff)
downloadampache-29aca5c21898ad71bbb537bf533a8adf0e74978d.tar.gz
ampache-29aca5c21898ad71bbb537bf533a8adf0e74978d.tar.bz2
ampache-29aca5c21898ad71bbb537bf533a8adf0e74978d.zip
Fixed mail threshold and added user ability to change it
Diffstat (limited to 'admin')
-rw-r--r--admin/mail.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/admin/mail.php b/admin/mail.php
index df48b5b2..cdab5c36 100644
--- a/admin/mail.php
+++ b/admin/mail.php
@@ -34,6 +34,7 @@ if (isset ($_POST['cat_stats'])){$cat_stats = scrub_in($_POST['cat_stats']);}
if (isset ($_POST['pop_albums'])){$pop_albums = scrub_in($_POST['pop_albums']);}
if (isset ($_POST['pop_artists'])){$pop_artists = scrub_in($_POST['pop_artists']);}
if (isset ($_POST['pop_songs'])){$pop_songs = scrub_in($_POST['pop_songs']);}
+if (isset ($_POST['threshold'])){$threshold = scrub_in($_POST['threshold']);} else { $threshold = conf($stats_threshold); };
if (isset ($_POST['new_artists'])){$new_artists = scrub_in($_POST['new_artists']);}
if (isset ($_POST['new_albums'])){$new_albums = scrub_in($_POST['new_albums']);}
$subject = stripslashes(scrub_in($_POST['subject']));
@@ -142,7 +143,7 @@ switch ($action) {
if (isset ($pop_albums)){
$message .= "\n\nMost Popular Albums\n\n";
$stats = new Stats();
- $stats = $stats->get_top('10','album');
+ $stats = $stats->get_top('10','album',$threshold);
foreach( $stats as $r){
$album = new Album($r[object_id]);
@@ -154,7 +155,7 @@ switch ($action) {
if (isset ($pop_artists)){
$message .= "\n\nMost Popular Artists\n\n";
$stats = new Stats();
- $stats = $stats->get_top('10','artist');
+ $stats = $stats->get_top('10','artist',$threshold);
foreach( $stats as $r){
$artist = new Artist($r[object_id]);
@@ -167,7 +168,7 @@ switch ($action) {
$message .= "\n\nMost Popular Songs\n\n";
$stats = new Stats();
- $stats = $stats->get_top('10','song');
+ $stats = $stats->get_top('10','song',$threshold);
foreach( $stats as $r){
$song = new Song($r[object_id]);