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:
2009-02-06 13:12:03 +00:00
parent 7d73d048c8
commit 951d0e8653
18 changed files with 303 additions and 102 deletions

View File

@@ -65,6 +65,8 @@ void Content::SetDefaultFunction()
}
else
{
request.session->IncrementTimersIfExist();
log << log3 << "Content: Default item: id: " << default_item << logend;
RedirectTo(default_item);
}
@@ -169,7 +171,7 @@ void Content::Make()
{
if( request.dir_table.empty() )
{
log << log1 << "Content: there is no a root dir" << logend;
log << log1 << "Content: there is no a root dir (dir_table is empty)" << logend;
return;
}
@@ -194,6 +196,13 @@ void Content::Make()
if( request.result == Request::redirect )
return;
if( request.dir_table.empty() )
{
log << log1 << "Content: there is no a root dir (dir_table is empty -- after calling some standard functions)" << logend;
return;
}
templates.Generate();