added: to the Item: auth_path - a path to a static file (if auth is different from auth_none)

added: function 'mv' (move)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@596 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-03-15 01:47:26 +00:00
parent ebd868fa33
commit 6fbcffe63b
33 changed files with 1122 additions and 319 deletions

View File

@@ -131,6 +131,45 @@ return last_iter;
bool DirContainer::ChangeParent(long dir_id, long new_parent_id)
{
Iterator i = FindId(dir_id);
if( i == table.end() )
return false;
if( i->parent_id == new_parent_id )
return true; // nothing to do
ParentIterator p = FindFirstParent(i->parent_id);
bool found = false;
for( ; p != table_parent.end() ; p = NextParent(p) )
{
if( p->second->id == dir_id )
{
table_parent.erase(p);
log << log3 << "DirCont: removed parent index to dir: " << i->id << logend;
i->parent_id = new_parent_id;
table_parent.insert( std::make_pair(new_parent_id, i) );
log << log3 << "DirCont: added parent index to dir, id: " << i->id << ", parent_id: " << i->parent_id << logend;
found = true;
if( i->url == "etc" ) // !! in the future can be more special folders
FindSpecialFolders();
break; // that iterator (p) is only one
}
}
if( !found )
log << log1 << "DirCont: cannot find parent_id: " << i->parent_id << " in parent indexes" << logend;
return found;
}
void DirContainer::Clear()