diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/show_play_selected.inc.php | 6 | ||||
-rw-r--r-- | templates/show_songs.inc | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/templates/show_play_selected.inc.php b/templates/show_play_selected.inc.php index 1f7ac16c..d85997d6 100644 --- a/templates/show_play_selected.inc.php +++ b/templates/show_play_selected.inc.php @@ -57,14 +57,15 @@ function ToBatch(action) --> </td> </tr> -<?php if ($GLOBALS['playlist_id']) { ?> +<?php if (is_object($GLOBALS['playlist'])) { ?> <tr> <td> + <input type="hidden" name="playlist_id" value="<?php echo $GLOBALS['playlist']->id; ?>" /> <input class="button" type="button" name="super_action" value="<?php echo _("Set Track Numbers"); ?>" onclick="return ToPlaylist('set_track_numbers');" /> <input class="button" type="button" name="super_action" value="<?php echo _("Remove Selected Tracks"); ?>" onclick="return ToPlaylist('remove_song');" /> </td> </tr> -<?php } ?> +<?php } else { ?> <tr align="center"> <td colspan="2"> <?php echo _("Playlist"); ?>: <input type="button" name="super_action" value="<?php echo _("Add to"); ?>" onclick="return ToPlaylist('add_to');" /> @@ -73,4 +74,5 @@ function ToBatch(action) <input class="button" type="button" name="super_action" value="<?php echo _("Edit"); ?>" onclick="return ToPlaylist('edit');" /> </td> </tr> +<?php } ?> </table> diff --git a/templates/show_songs.inc b/templates/show_songs.inc index 8329588b..7e0eee8b 100644 --- a/templates/show_songs.inc +++ b/templates/show_songs.inc @@ -88,14 +88,14 @@ if (is_object($playlist) && ($GLOBALS['user']->username == $playlist->user || $G ?> <tr class="<?php echo flip_class(); ?>"> <td align="center"> - <input type="checkbox" name="song[]" value="<?php echo $song->id; ?>" id="song_<?php echo $song->id; ?>" /> + <input type="checkbox" name="song[]" value="<?php echo $track_id; ?>" id="song_<?php echo $track_id; ?>" /> </td> <?php 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_" . $track_id; ?>" value="<?php echo $tracknum; ?>" onchange="<?php echo "document.getElementById('song_" . $track_id . "').checked='checked';"; ?>" /> </td> <?php $tab++; } ?> <td> |