mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-29 16:50:13 +01:00
2018-07-27 Fred Gleason <fredg@paravelsystems.com>
* Added a 'SaveFile' test method to the web API. * Added a 'SaveString' test method to the web API. * Refactored the multipart-mime parser in 'RDFormPost' to process UTF-8 strings correctly.
This commit is contained in:
@@ -43,9 +43,10 @@ void Xport::ListGroups()
|
||||
//
|
||||
// Generate Group List
|
||||
//
|
||||
sql=QString().sprintf("select GROUP_NAME from USER_PERMS \
|
||||
where USER_NAME=\"%s\" order by GROUP_NAME",
|
||||
(const char *)RDEscapeString(rda->user()->name()));
|
||||
sql=QString("select ")+
|
||||
"GROUP_NAME from USER_PERMS where "+
|
||||
"USER_NAME=\""+RDEscapeString(rda->user()->name())+"\" "+
|
||||
"order by GROUP_NAME";
|
||||
q=new RDSqlQuery(sql);
|
||||
|
||||
//
|
||||
@@ -57,7 +58,7 @@ void Xport::ListGroups()
|
||||
printf("<groupList>\n");
|
||||
while(q->next()) {
|
||||
group=new RDGroup(q->value(0).toString());
|
||||
printf("%s",(const char *)group->xml());
|
||||
printf("%s",(const char *)group->xml().utf8());
|
||||
delete group;
|
||||
}
|
||||
printf("</groupList>\n");
|
||||
@@ -84,10 +85,10 @@ void Xport::ListGroup()
|
||||
//
|
||||
// Check Group Accessibility
|
||||
//
|
||||
sql=QString().sprintf("select GROUP_NAME from USER_PERMS \
|
||||
where (USER_NAME=\"%s\")&&(GROUP_NAME=\"%s\")",
|
||||
(const char *)RDEscapeString(rda->user()->name()),
|
||||
(const char *)RDEscapeString(group_name));
|
||||
sql=QString("select ")+
|
||||
"GROUP_NAME from USER_PERMS where "+
|
||||
"(USER_NAME=\""+RDEscapeString(rda->user()->name())+"\")&&"+
|
||||
"(GROUP_NAME=\""+RDEscapeString(group_name)+"\")";
|
||||
q=new RDSqlQuery(sql);
|
||||
if(!q->first()) {
|
||||
delete q;
|
||||
@@ -101,7 +102,7 @@ void Xport::ListGroup()
|
||||
printf("Status: 200\n\n");
|
||||
printf("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n");
|
||||
group=new RDGroup(q->value(0).toString());
|
||||
printf("%s",(const char *)group->xml());
|
||||
printf("%s",(const char *)group->xml().utf8());
|
||||
delete group;
|
||||
|
||||
delete q;
|
||||
|
||||
Reference in New Issue
Block a user