added: parameter 'r' to priv function
all directories and files can be changed git-svn-id: svn://ttmath.org/publicrep/winix/trunk@586 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -31,6 +31,18 @@ void dir(Info & i)
|
||||
}
|
||||
|
||||
|
||||
void dir_without_slash(Info & i)
|
||||
{
|
||||
for(size_t a=0 ; a<request.dir_table.size() ; ++a)
|
||||
{
|
||||
HtmlEscape(i.out, request.dir_table[a]->url);
|
||||
|
||||
if( a < request.dir_table.size()-1 )
|
||||
i.out << '/';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//!! moze wystarczy sprawdzac tylko ostatni katalog?
|
||||
// bo inaczej i tak bylo by 'access denied'
|
||||
void dir_can_read_exec(Info & i)
|
||||
|
||||
@@ -252,8 +252,19 @@ void priv_privileges(Info & i)
|
||||
}
|
||||
|
||||
|
||||
void priv_privileges_for_files(Info & i)
|
||||
{
|
||||
//!! bedzie uzyte umask
|
||||
i.out << std::setbase(8) << (int)0644 << std::setbase(10);
|
||||
}
|
||||
|
||||
|
||||
void priv_privileges_for_dirs(Info & i)
|
||||
{
|
||||
//!! bedzie uzyte umask
|
||||
i.out << std::setbase(8) << (int)0755 << std::setbase(10);
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace TemplatesFunctions
|
||||
|
||||
@@ -251,6 +251,7 @@ void Templates::CreateFunctions()
|
||||
dir
|
||||
*/
|
||||
functions.Insert("dir", dir);
|
||||
functions.Insert("dir_without_slash", dir_without_slash);
|
||||
functions.Insert("dir_can_read_exec", dir_can_read_exec);
|
||||
functions.Insert("dir_can_write", dir_can_write);
|
||||
functions.Insert("dir_can_remove", dir_can_remove);
|
||||
@@ -306,6 +307,8 @@ void Templates::CreateFunctions()
|
||||
functions.Insert("priv_group_tab_isdefault", priv_group_tab_isdefault);
|
||||
|
||||
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);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -166,6 +166,7 @@ namespace TemplatesFunctions
|
||||
dir
|
||||
*/
|
||||
void dir(Info & i);
|
||||
void dir_without_slash(Info & i);
|
||||
void dir_can_read_exec(Info & i);
|
||||
void dir_can_write(Info & i);
|
||||
void dir_can_remove(Info & i);
|
||||
@@ -218,6 +219,8 @@ namespace TemplatesFunctions
|
||||
void priv_group_tab_isdefault(Info & i);
|
||||
|
||||
void priv_privileges(Info & i);
|
||||
void priv_privileges_for_files(Info & i);
|
||||
void priv_privileges_for_dirs(Info & i);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user