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

Add Playlists to search and option to customize log filename (fix #147)

This commit is contained in:
Afterster 2014-02-22 17:34:24 +01:00
parent 87b459bfa4
commit 5ea358d90e
9 changed files with 141 additions and 7 deletions

View file

@ -59,6 +59,7 @@ class Playlist extends playlist_object
public static function gc()
{
Dba::write("DELETE FROM `playlist_data` USING `playlist_data` LEFT JOIN `song` ON `song`.`id` = `playlist_data`.`object_id` WHERE `song`.`file` IS NULL AND `playlist_data`.`object_type`='song'");
Dba::write("DELETE FROM `playlist` USING `playlist` LEFT JOIN `playlist_data` ON `playlist_data`.`playlist` = `playlist`.`id` WHERE `playlist_data`.`object_id` IS NULL");
}
/**
@ -107,7 +108,8 @@ class Playlist extends playlist_object
public function format()
{
parent::format();
$this->f_link = '<a href="' . AmpConfig::get('web_path') . '/playlist.php?action=show_playlist&amp;playlist_id=' . $this->id . '">' . $this->f_name . '</a>';
$this->f_link = AmpConfig::get('web_path') . '/playlist.php?action=show_playlist&playlist_id=' . $this->id;
$this->f_name_link = '<a href="' . $this->f_link . '/playlist.php?action=show_playlist&amp;playlist_id=' . $this->id . '">' . $this->f_name . '</a>';
} // format