2022-03-27 21:36:53 +02:00
|
|
|
#include "dynamiccontentincludepage.h"
|
|
|
|
#include "../parser.h"
|
|
|
|
std::string DynamicContentIncludePage::render()
|
|
|
|
{
|
|
|
|
auto revisionDao = this->database->createRevisionDao();
|
|
|
|
auto rev = revisionDao->getCurrentForPage(this->argument);
|
|
|
|
if(rev)
|
|
|
|
{
|
2022-08-17 21:54:32 +02:00
|
|
|
/* Quite dirty */
|
|
|
|
if(rev->content.find("[cmd:allowinclude]1[") != std::string::npos)
|
|
|
|
{
|
|
|
|
return rev->content;
|
|
|
|
}
|
2022-03-27 21:36:53 +02:00
|
|
|
}
|
|
|
|
return {};
|
|
|
|
}
|