diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-01-04 08:11:01 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-01-04 08:11:01 +0000 |
commit | 4e9823cd1064cc876b449752b933c89c367d84c6 (patch) | |
tree | c21f0f5c9d77176caefe5701c20afbd9d610409f /modules | |
parent | c917726df7e3d327e3bc3030bb0b7f63925d0b42 (diff) | |
download | ampache-4e9823cd1064cc876b449752b933c89c367d84c6.tar.gz ampache-4e9823cd1064cc876b449752b933c89c367d84c6.tar.bz2 ampache-4e9823cd1064cc876b449752b933c89c367d84c6.zip |
fixed mysql5 crap, thx WarrenG cleaned up some of the show_songs code and stuff that calls it, did a little work on playlists
Diffstat (limited to 'modules')
-rw-r--r-- | modules/lib.php | 37 | ||||
-rw-r--r-- | modules/libglue/session.php | 4 |
2 files changed, 5 insertions, 36 deletions
diff --git a/modules/lib.php b/modules/lib.php index b1eda672..ec833ca2 100644 --- a/modules/lib.php +++ b/modules/lib.php @@ -228,28 +228,6 @@ function get_song_ids_from_album ($album) { } -function get_song_ids_from_artist ($artist) { - - global $settings; - $dbh = dbh(); - - $song_ids = array(); - $artist = sql_escape($artist); - - $query = "SELECT id FROM song" . - " WHERE artist = '$artist'" . - " ORDER BY album, track"; - - $db_result = mysql_query($query, $dbh); - - while ( $r = mysql_fetch_object($db_result) ) { - $song_ids[] = $r->id; - } - - return $song_ids; -} - - /* * get_song_ids_from_artist_and_album(); * @@ -313,21 +291,12 @@ function get_songs_from_type ($type, $results, $artist_id = 0) { /* Lets tie it to album too, so we can show art ;) */ /*********************************************************/ /* One symbol, m(__)m */ -function show_songs ($song_ids, $playlist_id=0, $album=0) { +function show_songs ($song_ids, $playlist, $album=0) { $dbh = dbh(); // Get info about current user - $user = new User($_SESSION['userdata']['username']); - - // Get info about playlist owner - if (isset($playlist_id) && $playlist_id != 0) { - $sql = "SELECT user FROM playlist WHERE id = '$playlist_id'"; - $db_result = mysql_query($sql, $dbh); - if ($r = mysql_fetch_array($db_result)) { - $pluser = get_user_byid($r[0]); - } - } + $user = $GLOBALS['user']; $totaltime = 0; $totalsize = 0; @@ -336,7 +305,7 @@ function show_songs ($song_ids, $playlist_id=0, $album=0) { return true; -}// function show_songs +} // function show_songs diff --git a/modules/libglue/session.php b/modules/libglue/session.php index 9aa7c70b..7f18ce8a 100644 --- a/modules/libglue/session.php +++ b/modules/libglue/session.php @@ -147,8 +147,8 @@ function make_local_session_only($data,$id=0) $local_expirecol = libglue_param('local_expirecol'); $local_typecol = libglue_param('local_typecol'); $sql= "INSERT INTO $local_table ". - " ($local_sid,$local_usercol,$local_typecol)". - " VALUES ('$id','$username','$type')"; + " ($local_sid,$local_usercol,$local_typecol,value)". + " VALUES ('$id','$username','$type','')"; $db_result = mysql_query($sql, $local_dbh); if($db_result) return TRUE; |