diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/class/browse.class.php | 34 | ||||
-rw-r--r-- | lib/ui.lib.php | 2 |
2 files changed, 31 insertions, 5 deletions
diff --git a/lib/class/browse.class.php b/lib/class/browse.class.php index d74d2514..caaf79b5 100644 --- a/lib/class/browse.class.php +++ b/lib/class/browse.class.php @@ -36,6 +36,10 @@ class Browse { // Boolean if this is a simple browse method (use different paging code) public static $simple_browse; + // Static Content, this is defaulted to false, if set to true then wen can't + // apply any filters that would change the result set. + public static $static_content = false; + /** * constructor * This should never be called @@ -58,9 +62,6 @@ class Browse { switch ($key) { case 'show_art': - case 'min_count': - case 'unplayed': - case 'rated': $key = $_REQUEST['key']; if ($_SESSION['browse']['filter'][$key]) { unset($_SESSION['browse']['filter'][$key]); @@ -69,14 +70,23 @@ class Browse { $_SESSION['browse']['filter'][$key] = 1; } break; + case 'min_count': + case 'unplayed': + case 'rated': + + break; case 'alpha_match': + if (self::$static_content) { return false; } if ($value == _('All')) { $value = ''; } $_SESSION['browse']['filter'][$key] = $value; break; default: // Rien a faire + return false; break; } // end switch + + return true; } // set_filter @@ -100,7 +110,6 @@ class Browse { */ public static function reset_supplemental_objects() { - $_SESSION['browse']['supplemental'] = array(); } // reset_supplemental_objects @@ -138,6 +147,7 @@ class Browse { $_SESSION['browse']['type'] = $type; // Resets the simple browse self::set_simple_browse(0); + self::set_static_content(0); self::reset_supplemental_objects(); break; default: @@ -226,6 +236,21 @@ class Browse { } // set_simple_browse /** + * set_static_content + * This sets true/false if the content of this browse + * should be static, if they are then content filtering/altering + * methods will be skipped + */ + public static function set_static_content($value) { + + $value = make_bool($value); + self::$static_content = $value; + + $_SESSION['browse']['static'] = $value; + + } // set_static_content + + /** * get_saved * This looks in the session for the saved * stuff and returns what it finds @@ -723,6 +748,7 @@ class Browse { public static function _auto_init() { self::$simple_browse = make_bool($_SESSION['browse']['simple']); + self::$static_content = make_bool($_SESSION['browse']['static']); } // _auto_init diff --git a/lib/ui.lib.php b/lib/ui.lib.php index ad51b148..e932aaae 100644 --- a/lib/ui.lib.php +++ b/lib/ui.lib.php @@ -137,7 +137,7 @@ function show_alphabet_list () { $style_name = "style_" . strtolower($l); $class = "link"; if ($l==$selected) $class .=" active"; - echo "<span class=\"" . $class . "\" onclick=\"ajaxPut('". Config::get('ajax_url') ."?action=browse&key=alpha_match&value=$l');return true;\">" . + echo "<span class=\"" . $class . "\" onclick=\"ajaxPut('". Config::get('ajax_url') ."?page=browse&action=browse&key=alpha_match&value=$l');return true;\">" . $l . "</span>\n"; } echo "</div>"; |