added: some ezc functions for subdomains:
void winix_subdomain(Info & i); void winix_subdomain_is_empty(Info & i); void winix_subdomain_is_not_empty(Info & i); void winix_subdomain_is(Info & i); git-svn-id: svn://ttmath.org/publicrep/winix/trunk@843 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
ec773e5f29
commit
b605fb0a77
|
@ -562,6 +562,10 @@ void Templates::CreateFunctions()
|
|||
ezc_functions.Insert("winix_postvar", winix_postvar);
|
||||
ezc_functions.Insert("winix_postvar_value_is", winix_postvar_value_is);
|
||||
ezc_functions.Insert("winix_postvar_value_is_not", winix_postvar_value_is_not);
|
||||
ezc_functions.Insert("winix_subdomain", winix_subdomain);
|
||||
ezc_functions.Insert("winix_subdomain_is_empty", winix_subdomain_is_empty);
|
||||
ezc_functions.Insert("winix_subdomain_is_not_empty", winix_subdomain_is_not_empty);
|
||||
ezc_functions.Insert("winix_subdomain_is", winix_subdomain_is);
|
||||
ezc_functions.Insert("str", str);
|
||||
ezc_functions.Insert("strnc", strnc);
|
||||
|
||||
|
|
|
@ -480,6 +480,10 @@ namespace TemplatesFunctions
|
|||
void winix_postvar(Info & i);
|
||||
void winix_postvar_value_is(Info & i);
|
||||
void winix_postvar_value_is_not(Info & i);
|
||||
void winix_subdomain(Info & i);
|
||||
void winix_subdomain_is_empty(Info & i);
|
||||
void winix_subdomain_is_not_empty(Info & i);
|
||||
void winix_subdomain_is(Info & i);
|
||||
void str(Info & i);
|
||||
void strnc(Info & i);
|
||||
|
||||
|
|
|
@ -282,6 +282,28 @@ void winix_postvar_value_is_not(Info & i)
|
|||
}
|
||||
|
||||
|
||||
void winix_subdomain(Info & i)
|
||||
{
|
||||
cur->request->subdomain;
|
||||
}
|
||||
|
||||
|
||||
void winix_subdomain_is_empty(Info & i)
|
||||
{
|
||||
i.res = cur->request->subdomain.empty();
|
||||
}
|
||||
|
||||
|
||||
void winix_subdomain_is_not_empty(Info & i)
|
||||
{
|
||||
i.res = !cur->request->subdomain.empty();
|
||||
}
|
||||
|
||||
void winix_subdomain_is(Info & i)
|
||||
{
|
||||
i.res = cur->request->subdomain == i.par;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// these functions are to be used with [is...] statements
|
||||
|
|
Loading…
Reference in New Issue