summaryrefslogtreecommitdiffstats
path: root/artists.php
diff options
context:
space:
mode:
authorpb1dft <pb1dft@ampache>2006-11-25 22:58:24 +0000
committerpb1dft <pb1dft@ampache>2006-11-25 22:58:24 +0000
commit0635397ab2bd5afc6789cef56b9a9d87bd52bcfd (patch)
tree931bc00aac44b959f5ed3d6efc0a673335357dea /artists.php
parent9d17e8cc950234277f156b91447696a2d40a0c21 (diff)
downloadampache-0635397ab2bd5afc6789cef56b9a9d87bd52bcfd.tar.gz
ampache-0635397ab2bd5afc6789cef56b9a9d87bd52bcfd.tar.bz2
ampache-0635397ab2bd5afc6789cef56b9a9d87bd52bcfd.zip
Fixed some stuff on album art added ability to sort albums on name/year in artist.php
Diffstat (limited to 'artists.php')
-rw-r--r--artists.php32
1 files changed, 31 insertions, 1 deletions
diff --git a/artists.php b/artists.php
index 8e8a8612..b84e1ed1 100644
--- a/artists.php
+++ b/artists.php
@@ -41,8 +41,38 @@ switch($action) {
show_box_top();
show_alphabet_list('artists','artists.php');
show_box_bottom();
+
+ // Setup the View Ojbect
+ $view = new View();
+ $view->import_session_view();
+
+
$artist = new Artist($_REQUEST['artist']);
- $artist->show_albums();
+
+ $sql = "SELECT DISTINCT(album.id) FROM song,album WHERE song.album=album.id AND song.artist='$artist->id'";
+
+ if ($_REQUEST['keep_view']) {
+ $view->initialize();
+ }
+
+ // If we aren't keeping the view then initlize it
+ elseif ($sql) {
+ if (!$sort_order) { $sort_order = 'album.name'; }
+ $db_results = mysql_query($sql, dbh());
+ $total_items = mysql_num_rows($db_results);
+ if ($match != "Show_all") { $offset_limit = $_SESSION['userdata']['offset_limit']; }
+ $view = new View($sql, 'artists.php',$sort_order,$total_items,$offset_limit);
+ }
+
+ else { $view = false; }
+
+ if ($view->base_sql) {
+ $artist->show_albums($view->sql);
+ }
+
+
+
+ //$artist->show_albums();
break;
case 'show_all_songs':