From ece11442739b7dc9fbcccd8accb8f78aa253c925 Mon Sep 17 00:00:00 2001 From: Albert S Date: Wed, 1 Feb 2023 18:55:51 +0100 Subject: [PATCH] revisionrenderer: renderContent(): Add modifydatetime var --- revisionrenderer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/revisionrenderer.cpp b/revisionrenderer.cpp index be7783a..6f17b1a 100644 --- a/revisionrenderer.cpp +++ b/revisionrenderer.cpp @@ -42,6 +42,7 @@ std::string RevisionRenderer::renderContent(std::string content) { dynamicVarsMap["pagetitle"] = parser.extractCommand("pagetitle", content); dynamicVarsMap["createdon"] = utils::toISODate(time(NULL)); + dynamicVarsMap["modifydatetime"] = utils::toISODateTime(time(NULL)); std::string resolvedContent = parser.parseDynamics(content, std::bind(&RevisionRenderer::dynamicCallback, this, std::placeholders::_1, std::placeholders::_2)); @@ -60,6 +61,7 @@ std::string RevisionRenderer::renderContent(const Revision &r, std::string_view dynamicVarsMap["createdon"] = utils::toISODate(firstRevision.value().timestamp); dynamicVarsMap["pagetitle"] = customTitle; + dynamicVarsMap["modifydatetime"] = utils::toISODateTime(r.timestamp); std::string resolvedContent = parser.parseDynamics(r.content, std::bind(&RevisionRenderer::dynamicCallback, this, std::placeholders::_1, std::placeholders::_2));