summaryrefslogtreecommitdiffstats
path: root/server/stream.ajax.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-11-30 07:41:24 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-11-30 07:41:24 +0000
commit4ff16a2c33746a57a2f3bd67c6dc2f1199b19252 (patch)
tree6c8eaae89cc24317e4931648f831cd80bab8989f /server/stream.ajax.php
parentd14a08c618c8ea38b7fad26bee6fee51ea55b9c6 (diff)
downloadampache-4ff16a2c33746a57a2f3bd67c6dc2f1199b19252.tar.gz
ampache-4ff16a2c33746a57a2f3bd67c6dc2f1199b19252.tar.bz2
ampache-4ff16a2c33746a57a2f3bd67c6dc2f1199b19252.zip
fixed a potential consistancy issue with the play type drop down
Diffstat (limited to 'server/stream.ajax.php')
-rw-r--r--server/stream.ajax.php21
1 files changed, 20 insertions, 1 deletions
diff --git a/server/stream.ajax.php b/server/stream.ajax.php
index 30513b43..c92a654a 100644
--- a/server/stream.ajax.php
+++ b/server/stream.ajax.php
@@ -31,9 +31,28 @@ switch ($_REQUEST['action']) {
$results['rfc3514'] = '0x1';
break;
}
-
+
+ switch ($_POST['type']) {
+ case 'stream':
+ case 'localplay':
+ case 'democratic':
+ $key = 'allow_' . $_POST['type'] . '_playback';
+ if (!Config::get($key)) {
+ $results['rfc3514'] = '0x1';
+ break 2;
+ }
+ break;
+ case 'xspf_player':
+ // Rien a faire
+ break;
+ default:
+ $results['rfc3514'] = '0x1';
+ break 2;
+ } // end switch
+
// Go ahead and update their preference
Preference::update('play_type',$GLOBALS['user']->id,$_POST['type']);
+ $results['rfc3514'] = '0x0';
break;
case 'basket':
// We need to set the basket up!