changed: DirContainer - uses std::list instead of std::vector as the main container
we do not have to rebuild indexes after deleting some items added: DirContainer::DelById(long id) changed: Dirs::CheckRootDir() addes the root dir if there is no one added: Dirs::DeleteDir(long id) - deletes specified directory (and its contents) (from the cache and the database) added: Db::DelDirById(long id) - deletes a dir from the database and its first children added: standard function rm can delete directories git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@487 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -169,6 +169,11 @@ void dir_last_default_item_url(Info & i)
|
||||
|
||||
|
||||
|
||||
void dir_old(Info & i)
|
||||
{
|
||||
HtmlEscape(i.out, request.session->dir_old);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@@ -79,6 +79,11 @@ void done_added_dir(Info & i)
|
||||
}
|
||||
|
||||
|
||||
void done_deleted_dir(Info & i)
|
||||
{
|
||||
i.result = request.session->done == Done::deleted_dir;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void done_defaulted_dir(Info & i)
|
||||
|
@@ -131,6 +131,7 @@ Ezc::Pattern * p = 0;
|
||||
|
||||
case Error::db_no_item:
|
||||
case Error::no_function:
|
||||
case Error::unknown_param:
|
||||
p = &pat_err_404;
|
||||
break;
|
||||
|
||||
@@ -241,6 +242,8 @@ void Templates::CreateFunctions()
|
||||
functions.Insert("dir_last_default_item_dir", dir_last_default_item_dir);
|
||||
functions.Insert("dir_last_default_item_url", dir_last_default_item_url);
|
||||
|
||||
functions.Insert("dir_old", dir_old);
|
||||
|
||||
/*
|
||||
user
|
||||
*/
|
||||
@@ -274,6 +277,7 @@ void Templates::CreateFunctions()
|
||||
functions.Insert("done_privileged_item", done_privileged_item);
|
||||
functions.Insert("done_loggedout", done_loggedout);
|
||||
functions.Insert("done_added_dir", done_added_dir);
|
||||
functions.Insert("done_deleted_dir", done_deleted_dir);
|
||||
functions.Insert("done_defaulted_dir", done_defaulted_dir);
|
||||
|
||||
|
||||
@@ -347,7 +351,7 @@ void Templates::Read()
|
||||
pat_err_others.ParseFile("err_others.html");
|
||||
|
||||
pat_fun_who.Directory(data.templates);
|
||||
pat_fun_who.ParseFile("who.html");
|
||||
pat_fun_who.ParseFile("fun_who.html");
|
||||
|
||||
CreateFunctions();
|
||||
|
||||
|
@@ -114,6 +114,9 @@ namespace TemplatesFunctions
|
||||
void dir_last_default_item_dir(Info &);
|
||||
void dir_last_default_item_url(Info & i);
|
||||
|
||||
void dir_old(Info & i);
|
||||
|
||||
|
||||
/*
|
||||
user
|
||||
*/
|
||||
@@ -149,6 +152,7 @@ namespace TemplatesFunctions
|
||||
void done_privileged_item(Info & i);
|
||||
|
||||
void done_added_dir(Info & i);
|
||||
void done_deleted_dir(Info & i);
|
||||
void done_defaulted_dir(Info & i);
|
||||
|
||||
void done_loggedout(Info & i);
|
||||
|
Reference in New Issue
Block a user