fixed: dots in url-es (now only one dot is available in the whole name and it cannot be only one dot ".")
added: cmslu can act as an authorizer (fast cgi authorize role)
added: Item::static_auth we can have additional static content on the file system
this content is authorized through cmslu (fastcgi authorizer mode)
changed: some changes in config
changed: the way how the www server is using cmslu
added new virtuals: static static_auth
changed: cmslu returns correct http headers (200, 404, 403)
changed: in cookie parser: we get the last cookie (if the server has more than one cookie with the same name)
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@540 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -64,6 +64,19 @@ void doc_base_url(Info & i)
|
||||
|
||||
|
||||
|
||||
void doc_base_url_static(Info & i)
|
||||
{
|
||||
i.out << data.base_url_static;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void doc_base_url_static_auth(Info & i)
|
||||
{
|
||||
i.out << data.base_url_static_auth;
|
||||
}
|
||||
|
||||
|
||||
void doc_current_url(Info & i)
|
||||
{
|
||||
i.out << request.env_request_uri;
|
||||
|
||||
@@ -119,6 +119,31 @@ void item_link(Info & i)
|
||||
}
|
||||
|
||||
|
||||
void item_link_static_auth(Info & i)
|
||||
{
|
||||
HtmlEscape(i.out, data.base_url_static_auth);
|
||||
item_dir(i);
|
||||
item_url(i);
|
||||
}
|
||||
|
||||
|
||||
void item_static_auth_is_none(Info & i)
|
||||
{
|
||||
i.result = request.item.static_auth == Item::static_none;
|
||||
}
|
||||
|
||||
|
||||
void item_static_auth_is_image(Info & i)
|
||||
{
|
||||
i.result = request.item.static_auth == Item::static_image;
|
||||
}
|
||||
|
||||
|
||||
void item_static_auth_is_other(Info & i)
|
||||
{
|
||||
i.result = request.item.static_auth == Item::static_other;
|
||||
}
|
||||
|
||||
|
||||
void item_can_read(Info & i)
|
||||
{
|
||||
|
||||
@@ -202,13 +202,15 @@ void Templates::CreateFunctions()
|
||||
/*
|
||||
doc
|
||||
*/
|
||||
functions.Insert("doc_language", doc_language);
|
||||
functions.Insert("doc_title", doc_title);
|
||||
functions.Insert("doc_charset", doc_charset);
|
||||
functions.Insert("doc_base_url", doc_base_url);
|
||||
functions.Insert("doc_current_url", doc_current_url);
|
||||
functions.Insert("doc_is_error", doc_is_error);
|
||||
functions.Insert("doc_status", doc_status);
|
||||
functions.Insert("doc_language", doc_language);
|
||||
functions.Insert("doc_title", doc_title);
|
||||
functions.Insert("doc_charset", doc_charset);
|
||||
functions.Insert("doc_base_url", doc_base_url);
|
||||
functions.Insert("doc_base_url_static", doc_base_url_static);
|
||||
functions.Insert("doc_base_url_static_auth", doc_base_url_static_auth);
|
||||
functions.Insert("doc_current_url", doc_current_url);
|
||||
functions.Insert("doc_is_error", doc_is_error);
|
||||
functions.Insert("doc_status", doc_status);
|
||||
|
||||
/*
|
||||
item
|
||||
@@ -224,6 +226,11 @@ void Templates::CreateFunctions()
|
||||
functions.Insert("item_dir", item_dir);
|
||||
functions.Insert("item_url", item_url);
|
||||
functions.Insert("item_link", item_link);
|
||||
functions.Insert("item_link_static_auth", item_link_static_auth);
|
||||
functions.Insert("item_static_auth_is_none", item_static_auth_is_none);
|
||||
functions.Insert("item_static_auth_is_image", item_static_auth_is_image);
|
||||
functions.Insert("item_static_auth_is_other", item_static_auth_is_other);
|
||||
|
||||
functions.Insert("item_can_read", item_can_read);
|
||||
functions.Insert("item_can_write", item_can_write);
|
||||
functions.Insert("item_info", item_info);
|
||||
|
||||
@@ -45,6 +45,8 @@ namespace TemplatesFunctions
|
||||
void doc_title(Info & i);
|
||||
void doc_charset(Info & i);
|
||||
void doc_base_url(Info & i);
|
||||
void doc_base_url_static(Info & i);
|
||||
void doc_base_url_static_auth(Info & i);
|
||||
void doc_current_url(Info & i);
|
||||
void doc_is_error(Info & i);
|
||||
void doc_status(Info & i);
|
||||
@@ -64,6 +66,10 @@ namespace TemplatesFunctions
|
||||
void item_dir(Info & i);
|
||||
void item_url(Info & i);
|
||||
void item_link(Info & i);
|
||||
void item_link_static_auth(Info & i);
|
||||
void item_static_auth_is_none(Info & i);
|
||||
void item_static_auth_is_image(Info & i);
|
||||
void item_static_auth_is_other(Info & i);
|
||||
void item_can_read(Info & i);
|
||||
void item_can_write(Info & i);
|
||||
void item_info(Info & i);
|
||||
|
||||
Reference in New Issue
Block a user