added: some methods in Dystem::Dirs (takes wchar_t * as an argument, now only std::wstring were)

changed: in plugin ticket: added message: WINIX_PL_TICKET_CAN_MAKE_REDIRECT
         it is sent at the end of POST request (editticket, createticket)
         if we can make a redirect (useful with AJAX)





git-svn-id: svn://ttmath.org/publicrep/winix/trunk@887 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2012-09-13 23:12:48 +00:00
parent 72013046fc
commit bd1f717b4c
9 changed files with 62 additions and 10 deletions

View File

@@ -351,7 +351,7 @@ return &(*etc);
}
Item * Dirs::GetDir(const std::wstring & name, long parent)
Item * Dirs::GetDir(const wchar_t * name, long parent)
{
DirContainer::ParentIterator i = dir_tab.FindFirstChild(parent);
@@ -363,10 +363,16 @@ return 0;
}
Item * Dirs::GetDir(const std::wstring & path)
Item * Dirs::GetDir(const std::wstring & name, long parent)
{
if( path.empty() )
return GetDir(name.c_str(), parent);
}
Item * Dirs::GetDir(const wchar_t * path)
{
if( *path == 0 )
return 0;
DirContainer::Iterator root = dir_tab.GetRoot();
@@ -376,7 +382,7 @@ Item * Dirs::GetDir(const std::wstring & path)
return 0;
Item * pitem = &(*root);
const wchar_t * s = path.c_str();
const wchar_t * s = path;
while( ExtractName(s, get_dir_temp) )
{
@@ -390,6 +396,13 @@ return pitem;
}
Item * Dirs::GetDir(const std::wstring & path)
{
return GetDir(path.c_str());
}
Item * Dirs::GetDir(long id)
{
DirContainer::Iterator i = dir_tab.FindId(id);

View File

@@ -67,7 +67,10 @@ public:
Item * GetRootDir();
Item * GetEtcDir();
Item * GetVarDir();
Item * GetDir(const wchar_t * name, long parent);
Item * GetDir(const std::wstring & name, long parent);
Item * GetDir(const wchar_t * path);
Item * GetDir(const std::wstring & path);
Item * GetDir(long id);
Item * AddDir(const Item & item);