diff options
Diffstat (limited to 'server/src/sessionserialiser.cc')
-rw-r--r-- | server/src/sessionserialiser.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/src/sessionserialiser.cc b/server/src/sessionserialiser.cc index 0929a30..b20e4c4 100644 --- a/server/src/sessionserialiser.cc +++ b/server/src/sessionserialiser.cc @@ -82,6 +82,7 @@ Session *SessionSerialiser::loadStr(const std::string &xml) XDEC(parser.sessionid), XDEC(parser.patientid), XDEC(parser.templ)); + session->isreadonly = parser.status == "readonly"; Journal *j = session->journal(); j->setUser(XDEC(parser.userid)); j->setPatientID(XDEC(parser.patientid)); @@ -104,6 +105,7 @@ std::string SessionSerialiser::saveStr(Session *session) xml += "<?xml version='1.0' encoding='UTF-8'?>\n"; xml += "<session timestamp=\""+itostr(time(NULL))+"\" " + "status=\"" + XENC(session->isreadonly?"readonly":"") + "\" " "id=\""+XENC(session->id())+"\" " "template=\""+XENC(session->templ)+ "\" " "patientid=\"" + XENC(session->patientid) + "\">\n"; |