Pages must specify whether they want to be included or not. Otherwise there too many surprises possibe, enforcing access restrictions will get more complicated
		
			
				
	
	
		
			17 líneas
		
	
	
		
			379 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			17 líneas
		
	
	
		
			379 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include "dynamiccontentincludepage.h"
 | |
| #include "../parser.h"
 | |
| std::string DynamicContentIncludePage::render()
 | |
| {
 | |
| 	auto revisionDao = this->database->createRevisionDao();
 | |
| 	auto rev = revisionDao->getCurrentForPage(this->argument);
 | |
| 	if(rev)
 | |
| 	{
 | |
| 		/* Quite dirty */
 | |
| 		if(rev->content.find("[cmd:allowinclude]1[") != std::string::npos)
 | |
| 		{
 | |
| 			return rev->content;
 | |
| 		}
 | |
| 	}
 | |
| 	return {};
 | |
| }
 |