summaryrefslogtreecommitdiffstats
path: root/lib/class/user.class.php
diff options
context:
space:
mode:
authormartian <martian@ampache>2010-02-09 17:44:44 +0000
committermartian <martian@ampache>2010-02-09 17:44:44 +0000
commit1b35c20dd0a93b143d8b9542743a743e0db66386 (patch)
tree0500ae3eec1dfb70b66c3ca30e9a61da2c0daba8 /lib/class/user.class.php
parent5e52f0d7ccb6183d7e1b4e5033adad0d08a48eb6 (diff)
downloadampache-1b35c20dd0a93b143d8b9542743a743e0db66386.tar.gz
ampache-1b35c20dd0a93b143d8b9542743a743e0db66386.tar.bz2
ampache-1b35c20dd0a93b143d8b9542743a743e0db66386.zip
Adding the bandwidth option to the preferences. This changes the complexity of the UI and toggles album art.
Diffstat (limited to 'lib/class/user.class.php')
-rw-r--r--lib/class/user.class.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/class/user.class.php b/lib/class/user.class.php
index 5608e025..40065922 100644
--- a/lib/class/user.class.php
+++ b/lib/class/user.class.php
@@ -197,7 +197,8 @@ class User extends database_object {
$sql = "SELECT preference.name, preference.description, preference.catagory, preference.level, user_preference.value " .
"FROM preference INNER JOIN user_preference ON user_preference.preference=preference.id " .
- "WHERE user_preference.user='$user_id' " . $user_limit;
+ "WHERE user_preference.user='$user_id' " . $user_limit . " ORDER BY preference.catagory, preference.description";
+
$db_results = Dba::read($sql);
/* Ok this is crapy, need to clean this up or improve the code FIXME */
@@ -206,7 +207,7 @@ class User extends database_object {
$admin = false;
if ($type == 'system') { $admin = true; }
$type_array[$type][$r['name']] = array('name'=>$r['name'],'level'=>$r['level'],'description'=>$r['description'],'value'=>$r['value']);
- ksort($type_array[$type]);
+ //ksort($type_array[$type]); // sorted this via sql and added sub-category sorting - Vlet
$results[$type] = array ('title'=>ucwords($type),'admin'=>$admin,'prefs'=>$type_array[$type]);
} // end while