diff options
author | deva <deva> | 2010-06-21 13:24:53 +0000 |
---|---|---|
committer | deva <deva> | 2010-06-21 13:24:53 +0000 |
commit | d23cdd88012b230692ba115471855031240db9eb (patch) | |
tree | 09cc4da0ba672b62de45c6f54f765ffb01804f06 /server/src/sessionserialiser.cc | |
parent | 6e5274045d2fb060d9ee437a254a0eb32036f281 (diff) |
Split journal code into modules. Fix bug, when user is changed in the middle of an active session.
Diffstat (limited to 'server/src/sessionserialiser.cc')
-rw-r--r-- | server/src/sessionserialiser.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/src/sessionserialiser.cc b/server/src/sessionserialiser.cc index 9b5e393..9706d22 100644 --- a/server/src/sessionserialiser.cc +++ b/server/src/sessionserialiser.cc @@ -67,8 +67,8 @@ void SessionSerialiser::loadStr(const std::string &xml) parser.parse(xml.data(), xml.length()); Journal *j = session->journal(); - j->currentuser = XDEC(parser.userid); - j->currentcpr = XDEC(parser.patientid); + j->setUser(XDEC(parser.userid)); + j->setPatientID(XDEC(parser.patientid)); std::vector<SessionParser::Entry>::iterator i = parser.entries.begin(); while(i != parser.entries.end()) { j->addEntry(XDEC(i->resume), xml_decode(i->macro), i->index); @@ -90,8 +90,8 @@ std::string SessionSerialiser::saveStr() Journal *journal = session->journal(); - xml += " <journal patientid=\"" + XENC(journal->currentcpr) + - "\" userid=\"" + XENC(journal->currentuser) + "\">\n"; + xml += " <journal patientid=\"" + XENC(journal->patientID()) + + "\" userid=\"" + XENC(journal->user()) + "\">\n"; std::map< int, Journal::ResumeEntry >::iterator i = journal->entrylist.begin(); |