diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-08-05 01:46:01 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-08-05 01:46:01 +0000 |
commit | 0dbace41fe33a9bc2460a58be1022f11b35f4b8c (patch) | |
tree | e533d73eebe62c38c04a36df09bc7592a3983953 /lib/class/preference.class.php | |
parent | f3b10721ac15f9a477057d3a7cddba3b3a67b7a9 (diff) | |
download | ampache-0dbace41fe33a9bc2460a58be1022f11b35f4b8c.tar.gz ampache-0dbace41fe33a9bc2460a58be1022f11b35f4b8c.tar.bz2 ampache-0dbace41fe33a9bc2460a58be1022f11b35f4b8c.zip |
added paging to the localplay playlist, fixed some preferences issues I introduced with the form register and caching
Diffstat (limited to 'lib/class/preference.class.php')
-rw-r--r-- | lib/class/preference.class.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/class/preference.class.php b/lib/class/preference.class.php index aae1d9aa..853e69a9 100644 --- a/lib/class/preference.class.php +++ b/lib/class/preference.class.php @@ -66,6 +66,7 @@ class Preference { $sql = "UPDATE `user_preference` SET `value`='$value' " . "WHERE `preference`='$id'$user_check"; $db_results = Dba::query($sql); + Preference::clear_from_session(); return true; } else { @@ -338,6 +339,17 @@ class Preference { } // load_from_session /** + * clear_from_session + * This clears the users preferences, this is done whenever modifications are made to the preferences + * or the admin resets something + */ + public static function clear_from_session() { + + unset($_SESSION['userdata']['preferences']); + + } // clear_from_session + + /** * init * This grabs the preferences and then loads them into conf it should be run on page load * to initialize the needed variables |