summaryrefslogtreecommitdiffstats
path: root/database
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2009-09-25 11:46:06 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2009-09-25 11:46:06 +0200
commitea848bbd45b4ede131d1a3514844c22d50736645 (patch)
treed98a68ac0cab269b8e3c1a212c044aff6639bc4c /database
parent1d74b4d24a3863e6ee8c80a208944e539017ebe6 (diff)
downloadeurephia-ea848bbd45b4ede131d1a3514844c22d50736645.tar.gz
eurephia-ea848bbd45b4ede131d1a3514844c22d50736645.tar.xz
eurephia-ea848bbd45b4ede131d1a3514844c22d50736645.zip
dded support for <sortkeys> tag in eDBadminUserAccount()
Diffstat (limited to 'database')
-rw-r--r--database/sqlite/administration/useraccount.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/database/sqlite/administration/useraccount.c b/database/sqlite/administration/useraccount.c
index 0908a51..574e196 100644
--- a/database/sqlite/administration/useraccount.c
+++ b/database/sqlite/administration/useraccount.c
@@ -87,7 +87,9 @@ static inline int xml_set_flag(xmlNode *node, char *flagname, int flagged) {
* @return Returns an eurephia ResultMsg XML document with status of the operation. On fatal errors,
* NULL is returned.
*/
-static xmlDoc *useracc_view(eurephiaCTX *ctx, unsigned int infoType, eDBfieldMap *uinfo_map) {
+static xmlDoc *useracc_view(eurephiaCTX *ctx, unsigned int infoType,
+ eDBfieldMap *uinfo_map, const char *sortkeys)
+{
dbresult *uinf = NULL, *qres = NULL;
unsigned int flag = 0, uid = 0, recid = 0;
char *username = NULL;
@@ -120,7 +122,7 @@ static xmlDoc *useracc_view(eurephiaCTX *ctx, unsigned int infoType, eDBfieldMap
" WHERE sessionstatus = 2"
" GROUP BY uid) os"
" ON (os.uid = u.uid)",
- NULL, uinfo_map, NULL);
+ NULL, uinfo_map, sortkeys);
if( uinf == NULL ) {
eurephia_log(ctx, LOG_ERROR, 0, "Error querying the database for a user");
@@ -539,7 +541,8 @@ xmlDoc *eDBadminUserAccount(eurephiaCTX *ctx, xmlDoc *qryxml) {
if( strcmp(mode, "view") == 0 ) {
unsigned int flags = atoi_nullsafe(defaultValue(xmlGetNodeContent(qry_n,"extractFlags"),"0"));
- res_d = useracc_view(ctx, flags, fmap_m);
+ const char *sortkeys = xmlGetNodeContent(qry_n, "sortkeys");
+ res_d = useracc_view(ctx, flags, fmap_m, sortkeys);
} else if( strcmp(mode, "add") == 0 ) {
res_d = useracc_add(ctx, fmap_m);
} else if( strcmp(mode, "update") == 0 ) {