summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--albums.php2
-rwxr-xr-xdocs/CHANGELOG2
-rw-r--r--lib/class/browse.class.php22
-rw-r--r--lib/install.php2
4 files changed, 17 insertions, 11 deletions
diff --git a/albums.php b/albums.php
index ef80d218..100637e9 100644
--- a/albums.php
+++ b/albums.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2007 Ampache.org
+ Copyright (c) Ampache.org
All Rights Reserved.
This program is free software; you can redistribute it and/or
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index c043fb52..1995e413 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,8 @@
--------------------------------------------------------------------------
v.3.4-Beta3
+ - Fixed page point not being remembered by the back button
+ - Fixed naming restrictions on database name during install
- Fixed issue where verify updated all songs in the catalog even
if there was no change
- Fixed recently played, only shows distinct songs
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
diff --git a/lib/install.php b/lib/install.php
index 21c4f616..6bfc2f6f 100644
--- a/lib/install.php
+++ b/lib/install.php
@@ -99,7 +99,7 @@ function install_check_status($configfile) {
function install_insert_db($username,$password,$hostname,$database) {
// Make sure that the database name is valid
- $is_valid = preg_match("/([^\d\w\_])/",$database,$matches);
+ $is_valid = preg_match("/([^\d\w\_\-])/",$database,$matches);
if (count($matches)) {
Error::add('general','Error: Database name invalid must not be a reserved word, and must be Alphanumeric');