From 79ec0f2f4c48e131972349d5289ee9da526cb2fa Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 20 Aug 2006 14:54:54 +0100 Subject: [PATCH] sortable user editor --- backend.php | 14 ++++++++++---- prefs.js | 5 +++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/backend.php b/backend.php index 5a372586..fc36d2e0 100644 --- a/backend.php +++ b/backend.php @@ -3384,6 +3384,12 @@ } } + $sort = db_escape_string($_GET["sort"]); + + if (!$sort || $sort == "undefined") { + $sort = "login"; + } + print "
PLACEHOLDER
"; @@ -3413,9 +3419,9 @@ print "   - Login - Access Level - Last login"; + Login + Access Level + Last login"; $lnum = 0; diff --git a/prefs.js b/prefs.js index a91d430c..c6daa6b6 100644 --- a/prefs.js +++ b/prefs.js @@ -157,7 +157,7 @@ function updateFeedList(sort_key) { } -function updateUsersList() { +function updateUsersList(sort_key) { if (!xmlhttp_ready(xmlhttp)) { printLockingError(); @@ -168,7 +168,8 @@ function updateUsersList() { // p_notify("Loading, please wait..."); - xmlhttp.open("GET", "backend.php?op=pref-users", true); + xmlhttp.open("GET", "backend.php?op=pref-users&sort=" + + param_escape(sort_key), true); xmlhttp.onreadystatechange=userlist_callback; xmlhttp.send(null); -- 2.39.2