From 7b49a436d0eb128b26cb2a427731074f0a9fce2b Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Sat, 21 Oct 2006 21:09:50 +0000 Subject: patched flaw in getid3() fixed a problem with vainfo and songs with no tags and fixed the xml_from_array() function --- lib/class/song.class.php | 9 +++++++-- lib/ui.lib.php | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/class/song.class.php b/lib/class/song.class.php index b437692a..f72506f8 100644 --- a/lib/class/song.class.php +++ b/lib/class/song.class.php @@ -708,13 +708,18 @@ class Song { * a stream URL taking into account the downsampling mojo and everything * else, this is used or will be used by _EVERYTHING_ */ - function get_url() { + function get_url($session_id='') { /* Define Variables we are going to need */ $username = $GLOBALS['user']->username; $song_id = $this->id; if (conf('require_session')) { - $session_string = "&sid=" . session_id(); + if ($session_id) { + $session_string = "&sid=" . $session_id; + } + else { + $session_string = "&sid=" . session_id(); + } } // if they are requiring a session $type = $this->type; diff --git a/lib/ui.lib.php b/lib/ui.lib.php index e08cab14..f4f5e3bd 100644 --- a/lib/ui.lib.php +++ b/lib/ui.lib.php @@ -1343,6 +1343,7 @@ function get_user_icon($name) { function xml_from_array($array,$callback=0) { foreach ($array as $key=>$value) { + if (is_numeric($key)) { $key = 'item'; } if (is_array($value)) { $value = xml_from_array($value,1); $string .= "\t<$key>$value\n"; -- cgit