1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-05 02:39:47 +02:00

Changed how playlists are sent to browsers so that it works on IE. Hopefully there won't be side effects. Karl, if feedback is good, I let you cleanup the code :)

This commit is contained in:
spocky 2007-11-22 18:58:00 +00:00
parent 67cbb218cd
commit 467fd32a4e
4 changed files with 8 additions and 3 deletions

View file

@ -661,7 +661,8 @@ class Stream {
// Load our javascript
echo "<script type=\"text/javascript\">";
echo "reload_util();";
//echo "reload_util();";
echo "reload_util2('".$_SESSION['iframe']['target']."');";
echo "</script>";
} // run_playlist_method

View file

@ -89,6 +89,9 @@ function update_txt(value,field) {
function reload_util() {
document.getElementById('util_iframe').contentWindow.location.reload(true);
}
function reload_util2(target) {
document.getElementById('util_iframe').contentWindow.location.href = target;
}
function popup_art(url) {
var newwindow;

View file

@ -38,7 +38,8 @@ switch ($_REQUEST['action']) {
case 'basket':
// We need to set the basket up!
$_SESSION['iframe']['target'] = Config::get('web_path') . '/stream.php?action=basket&playlist_method=' . scrub_out($_REQUEST['playlist_method']);
$results['rfc3514'] = '<script type="text/javascript">reload_util()</script>';
//$results['rfc3514'] = '<script type="text/javascript">reload_util()</script>';
$results['rfc3514'] = '<script type="text/javascript">reload_util2("'.$_SESSION['iframe']['target'].'")</script>';
break;
default:
$results['rfc3514'] = '0x1';

View file

@ -27,6 +27,6 @@ require_once 'lib/init.php';
if (isset($_SESSION['iframe']['target'])) {
$target = $_SESSION['iframe']['target'];
unset($_SESSION['iframe']['target']);
header("Location: " . $target);
//header("Location: " . $target);
}
?>