summaryrefslogtreecommitdiffstats
path: root/lib/class/browse.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-04-11 01:56:54 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-04-11 01:56:54 +0000
commite1813f532f7ab0ad82b829ba4034181236e0f5ba (patch)
treeaca9d1470bc7b2f648de5ffa31683a76d658cb56 /lib/class/browse.class.php
parent0857968b961cc875c481ea603f0a8858433c4db3 (diff)
downloadampache-e1813f532f7ab0ad82b829ba4034181236e0f5ba.tar.gz
ampache-e1813f532f7ab0ad82b829ba4034181236e0f5ba.tar.bz2
ampache-e1813f532f7ab0ad82b829ba4034181236e0f5ba.zip
fixed db name validity and paging being forgotten on back
Diffstat (limited to 'lib/class/browse.class.php')
-rw-r--r--lib/class/browse.class.php22
1 files changed, 13 insertions, 9 deletions
diff --git a/lib/class/browse.class.php b/lib/class/browse.class.php
index d6d8e24f..dc5ac33e 100644
--- a/lib/class/browse.class.php
+++ b/lib/class/browse.class.php
@@ -183,14 +183,11 @@ class Browse {
case 'genre':
case 'shoutbox':
case 'live_stream':
- // Reset the start if they go to a different type
- if ($type != $_SESSION['browse']['type']) {
- self::set_start('0');
- }
- else {
- self::load_start();
- }
+ // Set it
+ self::$type = $type;
+ self::load_start();
+ // Save it in the session
$_SESSION['browse']['type'] = $type;
@@ -274,8 +271,10 @@ class Browse {
*/
public static function set_start($start) {
- $_SESSION['browse'][self::$type]['start'] = intval($start);
- self::$start = $_SESSION['browse'][self::$type]['start'];
+ if (!self::$static_content) {
+ $_SESSION['browse'][self::$type]['start'] = intval($start);
+ }
+ self::$start = intval($start);
} // set_start
@@ -304,6 +303,11 @@ class Browse {
$value = make_bool($value);
self::$static_content = $value;
+ // We want to start at 0 it's static
+ if ($value) {
+ self::set_start('0');
+ }
+
$_SESSION['browse']['static'] = $value;
} // set_static_content