CC-4886: Warn if track is part of a playlist when deleting from library.

-done
This commit is contained in:
denise 2013-01-30 10:55:24 -05:00
parent 694c54f272
commit 043fbd1dfb
4 changed files with 78 additions and 4 deletions

View file

@ -955,6 +955,21 @@ SQL;
return $result;
}
public static function getAllPlaylistContent()
{
$con = Propel::getConnection();
$sql = <<<SQL
SELECT distinct(file_id)
FROM cc_playlistcontents
SQL;
$files = $con->query($sql)->fetchAll();
$real_files = array();
foreach ($files as $f) {
$real_files[] = $f['file_id'];
}
return $real_files;
}
} // class Playlist
class PlaylistNotFoundException extends Exception {}