summaryrefslogtreecommitdiffstats
path: root/templates/show_songs.inc
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-01-04 08:11:01 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-01-04 08:11:01 +0000
commit4e9823cd1064cc876b449752b933c89c367d84c6 (patch)
treec21f0f5c9d77176caefe5701c20afbd9d610409f /templates/show_songs.inc
parentc917726df7e3d327e3bc3030bb0b7f63925d0b42 (diff)
downloadampache-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 'templates/show_songs.inc')
-rw-r--r--templates/show_songs.inc13
1 files changed, 7 insertions, 6 deletions
diff --git a/templates/show_songs.inc b/templates/show_songs.inc
index db69d7e4..8329588b 100644
--- a/templates/show_songs.inc
+++ b/templates/show_songs.inc
@@ -55,11 +55,12 @@ if (is_object($playlist) && ($GLOBALS['user']->username == $playlist->user || $G
<?php
/* FIXME: don't even get me started with how many things are wrong with this code */
foreach ($song_ids as $song_id) {
-
+
/* Arr matey crapy code abounds! */
- if ($playlist_owner) {
+ if (is_object($playlist)) {
if ($song_id['song']) {
$song = new Song($song_id['song']);
+ $track_id = $song_id['id'];
}
else {
$song = new Song();
@@ -90,11 +91,11 @@ if (is_object($playlist) && ($GLOBALS['user']->username == $playlist->user || $G
<input type="checkbox" name="song[]" value="<?php echo $song->id; ?>" id="song_<?php echo $song->id; ?>" />
</td>
<?php
- if (is_object($playlist) && ($GLOBALS['user']->username == $playlist->user || $GLOBALS['user']->has_access('100'))) {
- /* $tracknum = $playlist->get_track($track_id); */
+ if ($playlist_owner) {
+ $tracknum = $playlist->get_track($track_id);
?>
<td>
- <input type="text" tabindex="<?php echo $tab; ?>" size="3" name="<?php echo "tr_" . $song->id; ?>" value="<?php echo $tracknum ?>" onchange="<?php echo "document.getElementById('song_" . $track_id . "').checked='checked';"; ?>" />
+ <input type="text" tabindex="<?php echo $tab; ?>" size="3" name="<?php echo "tr_" . $song->id; ?>" value="<?php echo $tracknum; ?>" onchange="<?php echo "document.getElementById('song_" . $track_id . "').checked='checked';"; ?>" />
</td>
<?php $tab++; } ?>
<td>
@@ -161,7 +162,7 @@ if (is_object($playlist) && ($GLOBALS['user']->username == $playlist->user || $G
?>
<tr class="table-header">
<td></td>
- <?php if (isset($playlist_id) && $playlist_id != 0 && ($user->username == $pluser->username || $user->access === 'admin')) { ?> <td></td> <?php } ?>
+ <?php if (is_object($playlist)) { ?> <td></td> <?php } ?>
<td><?php echo _("Total"); ?>:</td>
<td nowrap="nowrap"><?php echo $num; ?> song(s)</td>
<td></td>