Introducing HandlerConfig class to give handlers config values they need

这个提交包含在:
2019-09-29 20:27:53 +02:00
父节点 364d82a99f
当前提交 0ccc20454b
共有 8 个文件被更改,包括 36 次插入33 次删除

查看文件

@@ -69,8 +69,8 @@ Config::Config(const std::map<std::string, std::string> &map)
this->configmap = map;
this->wikipath = optional("wikipath", "/");
this->anon_username = optional("anon_username", "anonymouse");
this->wikiname = required("wikiname");
this->handlersConfig.anon_username = optional("anon_username", "anonymouse");
this->handlersConfig.wikiname = required("wikiname");
this->logfile = required("logfile");
this->templatepath = required("templatepath");
this->urls.linkallcats = required("linkallcats");
@@ -96,12 +96,12 @@ Config::Config(const std::map<std::string, std::string> &map)
this->urls.userchangepwurl = required("userchangepwurl");
this->connectionstring = required("connectionstring");
this->max_pagename_length = optional("max_pagename_length", 256);
this->handlersConfig.max_pagename_length = optional("max_pagename_length", 256);
this->session_max_lifetime = optional("session_max_lifetime", 3600);
this->query_limit = optional("query_limit", 200);
this->handlersConfig.query_limit = optional("query_limit", 200);
this->threadscount = optional("threadscount", 1);
this->anon_permissions = Permissions(required("anon_permissions"));
this->handlersConfig.anon_permissions = Permissions(required("anon_permissions"));
this->templateprefix = "{qswiki:";