summaryrefslogtreecommitdiffstats
path: root/lib/class
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-01-14 05:03:03 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-01-14 05:03:03 +0000
commit427c5ac163cd7a79c83102aaa3fcb6572ab59cfb (patch)
treeaf8a96374a62629c8439d37fdc812a697f068a6d /lib/class
parent3c99e635ee70b89cf1689d3372c7526e638b2b25 (diff)
downloadampache-427c5ac163cd7a79c83102aaa3fcb6572ab59cfb.tar.gz
ampache-427c5ac163cd7a79c83102aaa3fcb6572ab59cfb.tar.bz2
ampache-427c5ac163cd7a79c83102aaa3fcb6572ab59cfb.zip
fixed the filter display and added a playlist_type filter for admins
Diffstat (limited to 'lib/class')
-rw-r--r--lib/class/browse.class.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/class/browse.class.php b/lib/class/browse.class.php
index c6ad958e..1ba01e65 100644
--- a/lib/class/browse.class.php
+++ b/lib/class/browse.class.php
@@ -129,6 +129,34 @@ class Browse {
} // get_filter
+ /**
+ * get_allowed_filters
+ * This returns an array of the allowed filters based on the type of object we are working
+ * with, this is used to display the 'filter' sidebar stuff, must be called post browse stuff
+ */
+ public static function get_allowed_filters() {
+
+ switch ($_SESSION['browse']['type']) {
+ case 'album':
+ $valid_array = array('show_art','alpha_match');
+ break;
+ case 'artist':
+ case 'genre':
+ case 'song':
+ case 'live-stream':
+ $valid_array = array('alpha_match');
+ break;
+ case 'playlist':
+ $valid_array = array('alpha_match');
+ if (Access::check('interface','50')) {
+ array_push($valid_array,'playlist_type');
+ }
+ break;
+ } // switch on the browsetype
+
+ return $valid_array;
+
+ } // get_allowed_filters
/**
* set_type