Rename 'Parser' to 'ParserLegacy'

This commit is contained in:
2021-04-25 11:39:38 +02:00
rodzic 534d9f74e7
commit cec56d5a73
5 zmienionych plików z 15 dodań i 15 usunięć

Wyświetl plik

@ -21,8 +21,8 @@ SOFTWARE.
#include "handlerpageedit.h"
#include "../database/exceptions.h"
#include "../request.h"
#include "../parserlegacy.h"
#include "../parser.h"
bool HandlerPageEdit::canAccess(std::string page)
{
return this->userSession->user.permissions.canEdit();
@ -59,7 +59,7 @@ Response HandlerPageEdit::handleRequest(PageDao &pageDao, std::string pagename,
// TODO: must check, whether categories differ, and perhaps don't allow every user
// to set categories
Parser parser;
ParserLegacy parser;
std::vector<std::string> cats = parser.extractCategories(newContent);
try
{
@ -107,7 +107,7 @@ Response HandlerPageEdit::handleRequest(PageDao &pageDao, std::string pagename,
if(r.post("do") == "preview")
{
std::string newContent = r.post("content");
Parser parser;
ParserLegacy parser;
TemplatePage templatePage = this->templ->getPage("page_creation_preview");
templatePage.setVar("actionurl", urlProvider->editPage(pagename));
templatePage.setVar("preview_content", parser.parse(pageDao, *this->urlProvider, newContent));

Wyświetl plik

@ -21,7 +21,7 @@ SOFTWARE.
#include "handlerpageview.h"
#include "../database/exceptions.h"
#include "../logger.h"
#include "../parser.h"
#include "../parserlegacy.h"
#include "../htmllink.h"
bool HandlerPageView::canAccess(std::string page)
@ -130,7 +130,7 @@ Response HandlerPageView::handleRequest(PageDao &pageDao, std::string pagename,
TemplatePage &page = this->templ->getPage(templatepartname);
Parser parser;
ParserLegacy parser;
Response result;
result.setStatus(200);
std::string indexcontent;