added: functions: chmod, chown
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@587 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -266,6 +266,19 @@ void priv_privileges_for_dirs(Info & i)
|
||||
}
|
||||
|
||||
|
||||
void priv_show_form_chown(Info & i)
|
||||
{
|
||||
i.result = (request.pfunction->code == FUN_PRIV || request.pfunction->code == FUN_CHOWN);
|
||||
}
|
||||
|
||||
|
||||
void priv_show_form_chmod(Info & i)
|
||||
{
|
||||
i.result = (request.pfunction->code == FUN_PRIV || request.pfunction->code == FUN_CHMOD);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace TemplatesFunctions
|
||||
|
||||
|
||||
@@ -50,6 +50,8 @@ Ezc::Pattern * p = 0;
|
||||
{FUN_MKDIR, pat_fun_mkdir},
|
||||
{FUN_DEFAULT, pat_fun_default},
|
||||
{FUN_PRIV, pat_fun_priv},
|
||||
{FUN_CHMOD, pat_fun_priv},
|
||||
{FUN_CHOWN, pat_fun_priv},
|
||||
{FUN_RUN, pat_fun_run},
|
||||
{FUN_WHO, pat_fun_who},
|
||||
{FUN_LAST, pat_fun_last},
|
||||
@@ -309,7 +311,10 @@ void Templates::CreateFunctions()
|
||||
functions.Insert("priv_privileges", priv_privileges);
|
||||
functions.Insert("priv_privileges_for_files", priv_privileges_for_files);
|
||||
functions.Insert("priv_privileges_for_dirs", priv_privileges_for_dirs);
|
||||
|
||||
functions.Insert("priv_show_form_chown", priv_show_form_chown);
|
||||
functions.Insert("priv_show_form_chmod", priv_show_form_chmod);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
done
|
||||
@@ -457,6 +462,7 @@ void Templates::CreateFunctions()
|
||||
*/
|
||||
functions.Insert("winix_cur_time", winix_cur_time);
|
||||
functions.Insert("winix_users_logged", winix_users_logged);
|
||||
functions.Insert("winix_function", winix_function);
|
||||
functions.Insert("winix_function_is", winix_function_is);
|
||||
functions.Insert("winix_function_param_is", winix_function_param_is);
|
||||
functions.Insert("winix_loadavg_now", winix_loadavg_now);
|
||||
|
||||
@@ -207,6 +207,7 @@ namespace TemplatesFunctions
|
||||
void user_can_use_bbcode(Info & i);
|
||||
void user_can_use_raw(Info & i);
|
||||
|
||||
|
||||
/*
|
||||
privileges
|
||||
*/
|
||||
@@ -222,6 +223,9 @@ namespace TemplatesFunctions
|
||||
void priv_privileges_for_files(Info & i);
|
||||
void priv_privileges_for_dirs(Info & i);
|
||||
|
||||
void priv_show_form_chown(Info & i);
|
||||
void priv_show_form_chmod(Info & i);
|
||||
|
||||
|
||||
/*
|
||||
done
|
||||
@@ -365,6 +369,7 @@ namespace TemplatesFunctions
|
||||
*/
|
||||
void winix_cur_time(Info & i);
|
||||
void winix_users_logged(Info & i);
|
||||
void winix_function(Info & i);
|
||||
void winix_function_is(Info & i);
|
||||
void winix_function_param_is(Info & i);
|
||||
void winix_loadavg_now(Info & i);
|
||||
|
||||
@@ -37,6 +37,11 @@ void winix_users_logged(Info & i)
|
||||
}
|
||||
|
||||
|
||||
void winix_function(Info & i)
|
||||
{
|
||||
i.out << request.pfunction->item.url;
|
||||
}
|
||||
|
||||
|
||||
void winix_function_is(Info & i)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user