diff options
Diffstat (limited to 'database/sqlite/administration/useraccount.c')
| -rw-r--r-- | database/sqlite/administration/useraccount.c | 9 |
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 ) { |
