From bc90c0128c804252ff60c910658c5bc8218aef2b Mon Sep 17 00:00:00 2001 From: Paul Arthur Date: Fri, 12 Oct 2012 15:42:07 -0400 Subject: Start cleaning up the democratic thing. Whoever wrote the old implementation of get_items suffered from intense fear and hatred of SQL. --- templates/show_democratic_playlist.inc.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'templates') diff --git a/templates/show_democratic_playlist.inc.php b/templates/show_democratic_playlist.inc.php index b1b01cf9..edac64f9 100644 --- a/templates/show_democratic_playlist.inc.php +++ b/templates/show_democratic_playlist.inc.php @@ -72,26 +72,26 @@ else { set_parent(); -foreach($object_ids as $row_id=>$data) { - $media = new $data['object_type']($data['object_id']); +foreach($object_ids as $item) { + $media = new $item['object_type']($item['object_id']); $media->format(); ?> - has_vote($media->id)) { ?> - + has_vote($item['object_id'], $item['object_type'])) { ?> + - id . '&type=' . scrub_out($data['object_type']),'tick', T_('Add Vote'),'remove_vote_' . $row_id); ?> + id . '&type=' . scrub_out($item['object_type']),'tick', T_('Add Vote'),'remove_vote_' . $item['id']); ?> - get_vote($row_id)); ?> + get_vote($item['id'])); ?> f_link; ?> f_album_link; ?> f_artist_link; ?> f_time; ?> - + -- cgit