Page: Add 'title' column, storing title of last revision
This commit is contained in:
@ -66,6 +66,7 @@ Response HandlerPageEdit::handleRequest(PageDao &pageDao, std::string pagename,
|
||||
this->database->beginTransaction();
|
||||
std::string visiblecmd = parser.extractCommand("visible", newContent);
|
||||
std::string rename = parser.extractCommand("rename", newContent);
|
||||
std::string customtitle = parser.extractCommand("pagetitle", newContent);
|
||||
Page page;
|
||||
std::optional<Page> currentPage = pageDao.find(pagename);
|
||||
if(currentPage)
|
||||
@ -83,6 +84,11 @@ Response HandlerPageEdit::handleRequest(PageDao &pageDao, std::string pagename,
|
||||
page.current_revision = current_revision;
|
||||
page.listed = !(visiblecmd == "0");
|
||||
page.name = pagename;
|
||||
page.title = customtitle;
|
||||
if(page.title.empty())
|
||||
{
|
||||
page.title = page.name;
|
||||
}
|
||||
pageDao.save(page);
|
||||
|
||||
Revision newRevision;
|
||||
|
Verwijs in nieuw issue
Block a user