fixed two bugs.

This commit is contained in:
Martin Preuss
2023-08-10 01:53:10 +02:00
parent 9b0122e34c
commit f716ebd338

View File

@@ -299,7 +299,7 @@ void _handleGetEdit(AQH_HTTP_URLHANDLER *uh, AQH_HTTP_REQUEST *rq, int id, GWEN_
db=GWEN_DB_Group_new("room");
rv=AQH_Room_toDb(r, db);
if (rv>=0)
_writeEditPage(uh, rq, NULL, pageBuf);
_writeEditPage(uh, rq, db, pageBuf);
else {
DBG_ERROR(NULL, "Error writing room %d to db", id);
GWEN_Buffer_AppendArgs(pageBuf, "<p><font color=\"red\">%s</font></p>", I18N("Internal error."));
@@ -366,7 +366,7 @@ int _writeAddPage(AQH_HTTP_URLHANDLER *uh, AQH_HTTP_REQUEST *rq, GWEN_DB_NODE *d
int _writeEditPage(AQH_HTTP_URLHANDLER *uh, AQH_HTTP_REQUEST *rq, GWEN_DB_NODE *dbValues, GWEN_BUFFER *pageBuf)
{
unsigned long int id;
unsigned long int id=0;
const char *name=NULL;
const char *descr=NULL;