blob: e5792ec79374c2eec25ce3014156b7abe71f6b42 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#include "strusCms.hpp"
#include <cppcms/url_mapper.h>
#include <cppcms/http_response.h>
#include <cppcms/json.h>
namespace apps {
strusCms::strusCms( cppcms::service &srv )
: cppcms::application( srv ),
intro( *this ),
user( *this ),
conn( settings( ).get<std::string>( "strusCms.db_connection" ) )
{
locale_name = "en";
script = settings( ).get<std::string>( "strusCms.script" );
add( intro );
add( user );
mapper( ).root( root( ) );
}
std::string strusCms::root( std::string l )
{
return script;
// TODO: localization later
//~ if( l.empty( ) ) l = locale_name;
//~ return script + "/" + l;
}
}
|