summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-10-21 21:09:50 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-10-21 21:09:50 +0000
commit7b49a436d0eb128b26cb2a427731074f0a9fce2b (patch)
tree9253d2ed30ec0ab1d8979464fe8fc845d0103b73 /lib
parent7935a4a78558ed918e009d9a3f84f242dfaa88ea (diff)
downloadampache-7b49a436d0eb128b26cb2a427731074f0a9fce2b.tar.gz
ampache-7b49a436d0eb128b26cb2a427731074f0a9fce2b.tar.bz2
ampache-7b49a436d0eb128b26cb2a427731074f0a9fce2b.zip
patched flaw in getid3() fixed a problem with vainfo and songs with no tags and fixed the xml_from_array() function
Diffstat (limited to 'lib')
-rw-r--r--lib/class/song.class.php9
-rw-r--r--lib/ui.lib.php1
2 files changed, 8 insertions, 2 deletions
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</$key>\n";