1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-03 09:49:30 +02:00

fixed a problem I introduced by unfudging the song.php file

This commit is contained in:
Karl 'vollmerk' Vollmer 2006-04-02 08:14:21 +00:00
parent 864a32a328
commit 05e6d947be
8 changed files with 23 additions and 20 deletions

View file

@ -601,7 +601,7 @@ class Song {
$this->f_title = truncate_with_ellipse($this->title,conf('ellipse_threshold_title'));
// Create A link inclduing the title
$this->f_link = "<a href=\"" . conf('web_path') . "/song.php?action=m3u&amp;song=" . $this->id . "\">$this->f_title</a>";
$this->f_link = "<a href=\"" . conf('web_path') . "/song.php?action=single_song&amp;song_id=" . $this->id . "\">$this->f_title</a>";
// Format the Bitrate
$this->f_bitrate = intval($this->bitrate/1000) . "-" . strtoupper($this->mode);

View file

@ -133,7 +133,7 @@ function show_now_playing_display (el) {
// output the song name and link tag
document.getElementById('np_song_'+i).innerHTML =
'<a href="song.php?action=m3u&amp;song=' +
'<a href="song.php?action=single_song&amp;song_id=' +
now_playing.getElementsByTagName('songid')[0].firstChild.data + '">' +
now_playing.getElementsByTagName('songtitle')[0].firstChild.data + '</a>';

View file

@ -625,7 +625,7 @@ function get_global_popular($type) {
$artist = $song->get_artist_name();
$text = "$artist - $song->title";
/* Add to array */
$items[] = "<li> <a href=\"$web_path/song.php?action=m3u&amp;song=$song->id\" title=\"". htmlspecialchars($text) ."\">" .
$items[] = "<li> <a href=\"$web_path/song.php?action=single_song&amp;song_id=$song->id\" title=\"". htmlspecialchars($text) ."\">" .
htmlspecialchars(truncate_with_ellipse($text, conf('ellipse_threshold_title')+3)) . "&nbsp;($r->count)</a> </li>";
} // if it's a song

View file

@ -61,6 +61,9 @@ switch ($action) {
$song_ids = $_POST['song'];
}
break;
case 'single_song':
$song_ids[] = scrub_in($_REQUEST['song_id']);
break;
case 'your_popular_songs':
$song_ids = get_popular_songs($_REQUEST['limit'], 'your', $GLOBALS['user']->id);
break;

View file

@ -50,7 +50,7 @@ if ($flags) { ?>
foreach ($dinfolist as $dinfo) {
echo "<tr class=\"".flip_class()."\">".
"<td><input type=\"checkbox\" name=\"song_ids[]\" value=\"" . $dinfo['songid'] . "\" /></td>".
"<td><a href=\"".$web_path."/song.php?action=m3u&amp;song=$song->id\">".scrub_out($formated_title)."</a> </td>".
"<td><a href=\"".$web_path."/song.php?action=single_song&amp;song_id=$song->id\">".scrub_out($formated_title)."</a> </td>".
"<td><a href=\"".$web_path."/artists.php?action=show&amp;artist=".$dinfo['artistid']."\" title=\"".scrub_out($dinfo['artist'])."\">".scrub_out($dinfo['artist'])."</a> </td>".
"<td><a href=\"".$web_path."/albums.php?action=show&amp;album=".$dinfo['albumid']."\" title=\"".scrub_out($dinfo['album'])."\">".scrub_out($dinfo['album'])."</a> </td>".
"<td>".floor($dinfo['time']/60).":".sprintf("%02d", ($dinfo['time']%60) )."</td>".

View file

@ -62,7 +62,7 @@ foreach ($albums as $album) {
<td><?php echo $album->year; ?></td>
<td><?php echo $count; ?></td>
<td>
<a href="<?php echo $web_path; ?>/song.php?action=m3u&amp;album=<?php echo $id; ?>"><?php echo _("Play"); ?></a>
<a href="<?php echo $web_path; ?>/song.php?action=album&amp;album_id=<?php echo $id; ?>"><?php echo _('Play'); ?></a>
<?php if (batch_ok()) { ?>
| <a href="<?php echo $web_path; ?>/batch.php?action=alb&amp;id=<?php echo $album->id; ?>"><?php echo _("Download"); ?></a>
<?php } ?>

View file

@ -57,7 +57,7 @@ foreach ($results as $item) {
</td>
<td width="30%">
<div id="np_song_<?php echo $c; ?>">
<a title="<?php echo scrub_out($song->f_title); ?>" href="<?php echo $web_path; ?>/song.php?action=m3u&amp;song=<?php echo $song->id; ?>">
<a title="<?php echo scrub_out($song->f_title); ?>" href="<?php echo $web_path; ?>/song.php?action=single_song&amp;song_id=<?php echo $song->id; ?>">
<?php echo $song->f_title; ?>
</a>
</div>

View file

@ -33,19 +33,19 @@ if (is_object($playlist) && ($GLOBALS['user']->username == $playlist->user || $G
<tr class="table-header">
<th>&nbsp;&nbsp;<a href="#" onclick="check_songs(); return false;">Select</a></th>
<?php if ($playlist_owner) { ?>
<th><?php echo _("Track"); ?></th>
<th><?php echo _('Track'); ?></th>
<?php } ?>
<th><?php echo _("Song title"); ?></th>
<th><?php echo _("Artist"); ?></th>
<th><?php echo _("Album"); ?></th>
<th><?php echo _("Track"); ?></th>
<th><?php echo _("Time"); ?></th>
<th><?php echo _("Size"); ?></th>
<th><?php echo _("Bitrate"); ?></th>
<th><?php echo _("Genre"); ?></th>
<th><?php echo _("Action"); ?></th>
<th><?php echo _('Song title'); ?></th>
<th><?php echo _('Artist'); ?></th>
<th><?php echo _('Album'); ?></th>
<th><?php echo _('Track'); ?></th>
<th><?php echo _('Time'); ?></th>
<th><?php echo _('Size'); ?></th>
<th><?php echo _('Bitrate'); ?></th>
<th><?php echo _('Genre'); ?></th>
<th><?php echo _('Action'); ?></th>
<?php if (conf('ratings') || conf('ratings')=="false") { ?>
<th width="90"><?php echo _("Rating"); ?></th>
<th width="90"><?php echo _('Rating'); ?></th>
<?php } ?>
</tr>
<?php
@ -94,13 +94,13 @@ foreach ($song_ids as $song_id) {
} ?>
<td>
<?php if ($song->has_flag()) { echo "<strong>**</strong>"; } ?>
<a href="<?php echo $web_path; ?>/song.php?action=m3u&amp;song=<?php echo $song->id; ?>" title="<?php echo scrub_out($song->title); ?>" <?php echo $text_class; ?>><?php echo scrub_out($song->f_title); ?></a>
<a href="<?php echo $web_path; ?>/song.php?action=single_song&amp;song_id=<?php echo $song->id; ?>" title="<?php echo scrub_out($song->title); ?>" <?php echo $text_class; ?>><?php echo scrub_out($song->f_title); ?></a>
</td>
<td>
<a href="<?php echo $web_path; ?>/artists.php?action=show&amp;artist=<?php echo htmlspecialchars($song->artist); ?>" title="<?php echo htmlspecialchars($song->f_artist_full); ?>" <?php echo $text_class; ?>><?php echo htmlspecialchars($song->f_artist); ?></a>
<a href="<?php echo $web_path; ?>/artists.php?action=show&amp;artist=<?php echo scrub_out($song->artist); ?>" title="<?php echo scrub_out($song->f_artist_full); ?>" <?php echo $text_class; ?>><?php echo scrub_out($song->f_artist); ?></a>
</td>
<td>
<a href="<?php echo $web_path; ?>/albums.php?album=<?php echo htmlspecialchars($song->album); ?>" title="<?php echo htmlspecialchars($song->f_album_full); ?>" <?php echo $text_class; ?>><?php echo htmlspecialchars($song->f_album); ?></a>
<a href="<?php echo $web_path; ?>/albums.php?album=<?php echo scrub_out($song->album); ?>" title="<?php echo scrub_out($song->f_album_full); ?>" <?php echo $text_class; ?>><?php echo scrub_out($song->f_album); ?></a>
</td>
<td align="right">
<?php echo $song->track; ?>