diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2010-02-14 00:56:07 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2010-02-14 00:56:07 +0000 |
commit | 8bc17dd3f0ed4dc520bb64b20dac8a31e72e447f (patch) | |
tree | 49fc67aaf19bfbc749c54d22522f31cfea8fabb5 /lib/class/browse.class.php | |
parent | 704e66d0b489a7d3b0d4dcedc79515e5300732ff (diff) | |
download | ampache-8bc17dd3f0ed4dc520bb64b20dac8a31e72e447f.tar.gz ampache-8bc17dd3f0ed4dc520bb64b20dac8a31e72e447f.tar.bz2 ampache-8bc17dd3f0ed4dc520bb64b20dac8a31e72e447f.zip |
Tweaked how features / bandwidth level is checked, not happy with it.
Diffstat (limited to 'lib/class/browse.class.php')
-rw-r--r-- | lib/class/browse.class.php | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/lib/class/browse.class.php b/lib/class/browse.class.php index f36c47f6..ab0e0e29 100644 --- a/lib/class/browse.class.php +++ b/lib/class/browse.class.php @@ -92,6 +92,28 @@ class Browse extends Query { } // get_supplemental_objects + /** + * is_enabled + * This checks if the specified function/feature + * of browsing is enabled, not sure if this is the best + * way to go about it, but hey. Returns boolean t/f + */ + public static function is_enabled($item) { + + switch ($item) { + case 'show_art': + if (Browse::get_filter('show_art')) { + return true; + } + if (Config::get('bandwidth') > 25) { + return true; + } + break; + } // end switch + + return false; + + } // is_enabled /** * show_objects @@ -235,8 +257,11 @@ class Browse extends Query { } // _auto_init - public static function set_filter_from_request($r) - { + /** + * set_filter_from_request + * //FIXME + */ + public static function set_filter_from_request($r) { foreach ($r as $k=>$v) { //reinterpret v as a list of int $vl = explode(',', $v); @@ -253,6 +278,6 @@ class Browse extends Query { else self::set_filter($k, $vl); } - } + } // set_filter_from_request } // browse |