summaryrefslogtreecommitdiff
path: root/server/src/journalwriter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/journalwriter.cc')
-rw-r--r--server/src/journalwriter.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/server/src/journalwriter.cc b/server/src/journalwriter.cc
index c73a841..4b2b4be 100644
--- a/server/src/journalwriter.cc
+++ b/server/src/journalwriter.cc
@@ -187,7 +187,9 @@ void JournalWriter::addEntry(Transaction &transaction, Commit &commit,
PRACRO_DEBUG(journal, "addEntry: template(%s)\n", templ->attributes["name"].c_str());
- // Add the template resume as the header (ie. first entry) of the journal entry.
+#if 0 // this feature is no longer nessecary...
+ // Add the template resume as the header (ie. first entry)
+ // of the journal entry.
if(entrylist.size() == 0 && templ->attributes["name"] != "") {
std::string template_resume = templ->attributes["resume"];
@@ -200,16 +202,23 @@ void JournalWriter::addEntry(Transaction &transaction, Commit &commit,
entrylist[-1] = re; // Make sure it comes first.
}
}
+#endif
- // Test if the username or the cpr has changed... if so, commit and clear the list.
+ // Test if the username or the cpr has changed...
+ // if so, commit and clear the list.
if(currentuser != transaction.user || currentcpr != transaction.cpr) {
this->commit();
entrylist.clear();
}
+ addEntry(resume, commit.macro, index);
+}
+
+void JournalWriter::addEntry(std::string resume, std::string macro, int index)
+{
// Strip trailing whitespace, and add newlines.
std::string r = stripTrailingWhitepace(addNewlines(resume, 60));
- std::string m = commit.macro;
+ std::string m = macro;
ResumeEntry re;
re.resume = r;