diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-04-02 08:14:21 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-04-02 08:14:21 +0000 |
commit | 05e6d947be96664074d95f9d6f4635415186ecac (patch) | |
tree | 6df88ea49db571474efa88af09fe21e088b59f5a | |
parent | 864a32a3287df06f4b1e4fb5a422b699562ab4e9 (diff) | |
download | ampache-05e6d947be96664074d95f9d6f4635415186ecac.tar.gz ampache-05e6d947be96664074d95f9d6f4635415186ecac.tar.bz2 ampache-05e6d947be96664074d95f9d6f4635415186ecac.zip |
fixed a problem I introduced by unfudging the song.php file
-rw-r--r-- | lib/class/song.class.php | 2 | ||||
-rw-r--r-- | lib/general.js | 2 | ||||
-rw-r--r-- | lib/general.lib.php | 2 | ||||
-rw-r--r-- | song.php | 3 | ||||
-rw-r--r-- | templates/list_duplicates.inc | 2 | ||||
-rw-r--r-- | templates/show_artist.inc | 2 | ||||
-rw-r--r-- | templates/show_now_playing.inc | 2 | ||||
-rw-r--r-- | templates/show_songs.inc | 28 |
8 files changed, 23 insertions, 20 deletions
diff --git a/lib/class/song.class.php b/lib/class/song.class.php index ff47fee8..d0868de2 100644 --- a/lib/class/song.class.php +++ b/lib/class/song.class.php @@ -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&song=" . $this->id . "\">$this->f_title</a>"; + $this->f_link = "<a href=\"" . conf('web_path') . "/song.php?action=single_song&song_id=" . $this->id . "\">$this->f_title</a>"; // Format the Bitrate $this->f_bitrate = intval($this->bitrate/1000) . "-" . strtoupper($this->mode); diff --git a/lib/general.js b/lib/general.js index 9eebe02b..ffc84683 100644 --- a/lib/general.js +++ b/lib/general.js @@ -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&song=' + + '<a href="song.php?action=single_song&song_id=' + now_playing.getElementsByTagName('songid')[0].firstChild.data + '">' + now_playing.getElementsByTagName('songtitle')[0].firstChild.data + '</a>'; diff --git a/lib/general.lib.php b/lib/general.lib.php index ad4d7519..82b0c38f 100644 --- a/lib/general.lib.php +++ b/lib/general.lib.php @@ -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&song=$song->id\" title=\"". htmlspecialchars($text) ."\">" . + $items[] = "<li> <a href=\"$web_path/song.php?action=single_song&song_id=$song->id\" title=\"". htmlspecialchars($text) ."\">" . htmlspecialchars(truncate_with_ellipse($text, conf('ellipse_threshold_title')+3)) . " ($r->count)</a> </li>"; } // if it's a song @@ -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; diff --git a/templates/list_duplicates.inc b/templates/list_duplicates.inc index c96058c4..f694c332 100644 --- a/templates/list_duplicates.inc +++ b/templates/list_duplicates.inc @@ -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&song=$song->id\">".scrub_out($formated_title)."</a> </td>". + "<td><a href=\"".$web_path."/song.php?action=single_song&song_id=$song->id\">".scrub_out($formated_title)."</a> </td>". "<td><a href=\"".$web_path."/artists.php?action=show&artist=".$dinfo['artistid']."\" title=\"".scrub_out($dinfo['artist'])."\">".scrub_out($dinfo['artist'])."</a> </td>". "<td><a href=\"".$web_path."/albums.php?action=show&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>". diff --git a/templates/show_artist.inc b/templates/show_artist.inc index bd8a6e31..7c7420da 100644 --- a/templates/show_artist.inc +++ b/templates/show_artist.inc @@ -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&album=<?php echo $id; ?>"><?php echo _("Play"); ?></a> + <a href="<?php echo $web_path; ?>/song.php?action=album&album_id=<?php echo $id; ?>"><?php echo _('Play'); ?></a> <?php if (batch_ok()) { ?> | <a href="<?php echo $web_path; ?>/batch.php?action=alb&id=<?php echo $album->id; ?>"><?php echo _("Download"); ?></a> <?php } ?> diff --git a/templates/show_now_playing.inc b/templates/show_now_playing.inc index a970dd9b..9aff071c 100644 --- a/templates/show_now_playing.inc +++ b/templates/show_now_playing.inc @@ -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&song=<?php echo $song->id; ?>"> + <a title="<?php echo scrub_out($song->f_title); ?>" href="<?php echo $web_path; ?>/song.php?action=single_song&song_id=<?php echo $song->id; ?>"> <?php echo $song->f_title; ?> </a> </div> diff --git a/templates/show_songs.inc b/templates/show_songs.inc index be31f8da..e01b8a20 100644 --- a/templates/show_songs.inc +++ b/templates/show_songs.inc @@ -33,19 +33,19 @@ if (is_object($playlist) && ($GLOBALS['user']->username == $playlist->user || $G <tr class="table-header"> <th> <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&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&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&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&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; ?> |