diff options
-rwxr-xr-x | docs/CHANGELOG.md | 2 | ||||
-rw-r--r-- | lib/class/random.class.php | 6 | ||||
-rw-r--r-- | play/index.php | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 6d4339f1..4af14511 100755 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -3,6 +3,8 @@ CHANGELOG 3.6-FUTURE ---------- +- Fixed "Pure Random" / Random URLs (reported by mafe) + 3.6-alpha5 *2013-04-15* ---------------------- diff --git a/lib/class/random.class.php b/lib/class/random.class.php index aa12ed9b..a4756db9 100644 --- a/lib/class/random.class.php +++ b/lib/class/random.class.php @@ -94,18 +94,18 @@ class Random implements media { /** * play_url + * * This generates a random play url based on the passed type * and returns it */ - public static function play_url($id,$sid='',$force_http='') { - + public static function play_url($id) { if (!$type = self::get_id_type($id)) { return false; } $uid = $GLOBALS['user']->id; - $url = Stream::get_base_url() . "random=1&type=$type&uid=$uid"; + $url = Stream::get_base_url() . "type=song&random=1&random_type=$type&uid=$uid"; return $url; diff --git a/play/index.php b/play/index.php index a55d1c0a..4500a7ad 100644 --- a/play/index.php +++ b/play/index.php @@ -169,7 +169,7 @@ if ($demo_id) { */ if ($random) { if ($start < 1) { - $oid = Random::get_single_song($_REQUEST['type']); + $oid = Random::get_single_song($_REQUEST['random_type']); // Save this one in case we do a seek $_SESSION['random']['last'] = $oid; } |