From c0455678c1f6644801e5c25cb07510e49db7b28d Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Mon, 7 May 2007 08:00:05 +0000 Subject: started work on the sorting, and added in album viewing that kinda works --- browse.php | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) (limited to 'browse.php') diff --git a/browse.php b/browse.php index 69454c2e..ea594156 100644 --- a/browse.php +++ b/browse.php @@ -42,34 +42,9 @@ echo '
'; switch($_REQUEST['action']) { case 'file': case 'album': - show_alphabet_list('albums','albums.php',$match); - show_alphabet_form($match,_("Show Albums starting with"),"albums.php?action=match"); - - /* Get the results and show them */ - $sql = "SELECT id FROM album WHERE name LIKE '$match%'"; - - $view = new View(); - $view->import_session_view(); - - // if we are returning - if ($_REQUEST['keep_view']) { - $view->initialize(); - } - - // If we aren't keeping the view then initlize it - elseif ($sql) { - $db_results = mysql_query($sql, dbh()); - $total_items = mysql_num_rows($db_results); - if ($match != "Show_all") { $offset_limit = $user->prefs['offset_limit']; } - $view = new View($sql, 'albums.php','name',$total_items,$offset_limit); - } - - else { $view = false; } - - if ($view->base_sql) { - $albums = get_albums($view->sql); - show_albums($albums,$view); - } + Browse::set_type('album'); + $album_ids = Browse::get_objects(); + Browse::show_objects($album_ids); break; case 'artist': show_alphabet_list('artists','artists.php'); @@ -107,6 +82,7 @@ switch($_REQUEST['action']) { Browse::set_type('song'); $song_ids = Browse::get_objects(); Browse::show_objects($song_ids); + break; case 'catalog': -- cgit