fixed two bugs.
This commit is contained in:
@@ -299,7 +299,7 @@ void _handleGetEdit(AQH_HTTP_URLHANDLER *uh, AQH_HTTP_REQUEST *rq, int id, GWEN_
|
|||||||
db=GWEN_DB_Group_new("room");
|
db=GWEN_DB_Group_new("room");
|
||||||
rv=AQH_Room_toDb(r, db);
|
rv=AQH_Room_toDb(r, db);
|
||||||
if (rv>=0)
|
if (rv>=0)
|
||||||
_writeEditPage(uh, rq, NULL, pageBuf);
|
_writeEditPage(uh, rq, db, pageBuf);
|
||||||
else {
|
else {
|
||||||
DBG_ERROR(NULL, "Error writing room %d to db", id);
|
DBG_ERROR(NULL, "Error writing room %d to db", id);
|
||||||
GWEN_Buffer_AppendArgs(pageBuf, "<p><font color=\"red\">%s</font></p>", I18N("Internal error."));
|
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)
|
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 *name=NULL;
|
||||||
const char *descr=NULL;
|
const char *descr=NULL;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user