added a new winix function "vim" - an editor based on the WYMeditor
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@673 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
+44
-38
@@ -25,13 +25,14 @@ app.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h
|
||||
app.o: ../functions/run.h ../functions/stat.h ../functions/subject.h
|
||||
app.o: ../functions/funthread.h ../functions/template.h
|
||||
app.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
|
||||
app.o: ../functions/uptime.h ../functions/who.h ../core/htmlfilter.h
|
||||
app.o: ../templates/templates.h misc.h ../templates/patterncacher.h
|
||||
app.o: ../core/item.h ../templates/ckeditorgetparser.h
|
||||
app.o: ../core/httpsimpleparser.h ../core/log.h ../templates/indexpatterns.h
|
||||
app.o: ../core/sessionmanager.h compress.h getparser.h httpsimpleparser.h
|
||||
app.o: postparser.h cookieparser.h postmultiparser.h acceptencodingparser.h
|
||||
app.o: acceptbaseparser.h plugin.h pluginmsg.h
|
||||
app.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
app.o: ../core/htmlfilter.h ../templates/templates.h misc.h
|
||||
app.o: ../templates/patterncacher.h ../core/item.h
|
||||
app.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
|
||||
app.o: ../core/log.h ../templates/indexpatterns.h ../core/sessionmanager.h
|
||||
app.o: compress.h getparser.h httpsimpleparser.h postparser.h cookieparser.h
|
||||
app.o: postmultiparser.h acceptencodingparser.h acceptbaseparser.h plugin.h
|
||||
app.o: pluginmsg.h
|
||||
bbcodeparser.o: bbcodeparser.h htmlfilter.h
|
||||
compress.o: compress.h log.h
|
||||
config.o: config.h confparser.h htmlfilter.h log.h plugin.h pluginmsg.h
|
||||
@@ -57,12 +58,13 @@ config.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h
|
||||
config.o: ../functions/run.h ../functions/stat.h ../functions/subject.h
|
||||
config.o: ../functions/funthread.h ../functions/template.h
|
||||
config.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
|
||||
config.o: ../functions/uptime.h ../functions/who.h ../core/htmlfilter.h
|
||||
config.o: ../templates/templates.h misc.h ../templates/patterncacher.h
|
||||
config.o: ../core/item.h ../templates/ckeditorgetparser.h
|
||||
config.o: ../core/httpsimpleparser.h ../core/log.h
|
||||
config.o: ../templates/indexpatterns.h ../templates/localefilter.h
|
||||
config.o: ../core/locale.h ../core/locale.h ../core/sessionmanager.h
|
||||
config.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
config.o: ../core/htmlfilter.h ../templates/templates.h misc.h
|
||||
config.o: ../templates/patterncacher.h ../core/item.h
|
||||
config.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
|
||||
config.o: ../core/log.h ../templates/indexpatterns.h
|
||||
config.o: ../templates/localefilter.h ../core/locale.h ../core/locale.h
|
||||
config.o: ../core/sessionmanager.h
|
||||
confparser.o: confparser.h misc.h item.h
|
||||
dircontainer.o: dircontainer.h item.h log.h
|
||||
dirs.o: dirs.h item.h dircontainer.h ../db/db.h ../db/dbbase.h ../db/dbconn.h
|
||||
@@ -121,12 +123,13 @@ mounts.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h
|
||||
mounts.o: ../functions/run.h ../functions/stat.h ../functions/subject.h
|
||||
mounts.o: ../functions/funthread.h ../functions/template.h
|
||||
mounts.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
|
||||
mounts.o: ../functions/uptime.h ../functions/who.h ../core/htmlfilter.h
|
||||
mounts.o: ../templates/templates.h misc.h ../templates/patterncacher.h
|
||||
mounts.o: ../core/item.h ../templates/ckeditorgetparser.h
|
||||
mounts.o: ../core/httpsimpleparser.h ../core/log.h
|
||||
mounts.o: ../templates/indexpatterns.h ../templates/localefilter.h
|
||||
mounts.o: ../core/locale.h ../core/locale.h ../core/sessionmanager.h
|
||||
mounts.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
mounts.o: ../core/htmlfilter.h ../templates/templates.h misc.h
|
||||
mounts.o: ../templates/patterncacher.h ../core/item.h
|
||||
mounts.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
|
||||
mounts.o: ../core/log.h ../templates/indexpatterns.h
|
||||
mounts.o: ../templates/localefilter.h ../core/locale.h ../core/locale.h
|
||||
mounts.o: ../core/sessionmanager.h
|
||||
notify.o: log.h notify.h ../templatesnotify/templatesnotify.h
|
||||
notify.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h confparser.h
|
||||
notify.o: ../core/config.h ../templates/misc.h ../templates/localefilter.h
|
||||
@@ -162,12 +165,13 @@ plugin.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h
|
||||
plugin.o: ../functions/run.h ../functions/stat.h ../functions/subject.h
|
||||
plugin.o: ../functions/funthread.h ../functions/template.h
|
||||
plugin.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
|
||||
plugin.o: ../functions/uptime.h ../functions/who.h ../core/htmlfilter.h
|
||||
plugin.o: ../templates/templates.h misc.h ../templates/patterncacher.h
|
||||
plugin.o: ../core/item.h ../templates/ckeditorgetparser.h
|
||||
plugin.o: ../core/httpsimpleparser.h ../core/log.h
|
||||
plugin.o: ../templates/indexpatterns.h ../templates/localefilter.h
|
||||
plugin.o: ../core/locale.h ../core/locale.h ../core/sessionmanager.h
|
||||
plugin.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
plugin.o: ../core/htmlfilter.h ../templates/templates.h misc.h
|
||||
plugin.o: ../templates/patterncacher.h ../core/item.h
|
||||
plugin.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
|
||||
plugin.o: ../core/log.h ../templates/indexpatterns.h
|
||||
plugin.o: ../templates/localefilter.h ../core/locale.h ../core/locale.h
|
||||
plugin.o: ../core/sessionmanager.h
|
||||
plugindata.o: plugindata.h plugin.h pluginmsg.h log.h config.h confparser.h
|
||||
plugindata.o: htmlfilter.h request.h requesttypes.h session.h item.h error.h
|
||||
plugindata.o: user.h rebus.h system.h dirs.h dircontainer.h ../db/db.h
|
||||
@@ -193,12 +197,13 @@ plugindata.o: ../functions/rm.h ../functions/run.h ../functions/stat.h
|
||||
plugindata.o: ../functions/subject.h ../functions/funthread.h
|
||||
plugindata.o: ../functions/template.h ../functions/tinymce.h
|
||||
plugindata.o: ../functions/uname.h ../functions/upload.h
|
||||
plugindata.o: ../functions/uptime.h ../functions/who.h ../core/htmlfilter.h
|
||||
plugindata.o: ../templates/templates.h misc.h ../templates/patterncacher.h
|
||||
plugindata.o: ../core/item.h ../templates/ckeditorgetparser.h
|
||||
plugindata.o: ../core/httpsimpleparser.h ../core/log.h
|
||||
plugindata.o: ../templates/indexpatterns.h ../templates/localefilter.h
|
||||
plugindata.o: ../core/locale.h ../core/locale.h ../core/sessionmanager.h
|
||||
plugindata.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
plugindata.o: ../core/htmlfilter.h ../templates/templates.h misc.h
|
||||
plugindata.o: ../templates/patterncacher.h ../core/item.h
|
||||
plugindata.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
|
||||
plugindata.o: ../core/log.h ../templates/indexpatterns.h
|
||||
plugindata.o: ../templates/localefilter.h ../core/locale.h ../core/locale.h
|
||||
plugindata.o: ../core/sessionmanager.h
|
||||
postmultiparser.o: postmultiparser.h error.h requesttypes.h config.h
|
||||
postmultiparser.o: confparser.h htmlfilter.h log.h
|
||||
rebus.o: log.h rebus.h misc.h item.h request.h requesttypes.h session.h
|
||||
@@ -226,12 +231,13 @@ request.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h
|
||||
request.o: ../functions/run.h ../functions/stat.h ../functions/subject.h
|
||||
request.o: ../functions/funthread.h ../functions/template.h
|
||||
request.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
|
||||
request.o: ../functions/uptime.h ../functions/who.h ../core/htmlfilter.h
|
||||
request.o: ../templates/templates.h misc.h ../templates/patterncacher.h
|
||||
request.o: ../core/item.h ../templates/ckeditorgetparser.h
|
||||
request.o: ../core/httpsimpleparser.h ../core/log.h
|
||||
request.o: ../templates/indexpatterns.h ../templates/localefilter.h
|
||||
request.o: ../core/locale.h ../core/locale.h ../core/sessionmanager.h
|
||||
request.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
request.o: ../core/htmlfilter.h ../templates/templates.h misc.h
|
||||
request.o: ../templates/patterncacher.h ../core/item.h
|
||||
request.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
|
||||
request.o: ../core/log.h ../templates/indexpatterns.h
|
||||
request.o: ../templates/localefilter.h ../core/locale.h ../core/locale.h
|
||||
request.o: ../core/sessionmanager.h
|
||||
session.o: session.h item.h error.h user.h plugindata.h rebus.h misc.h
|
||||
sessioncontainer.o: sessioncontainer.h session.h item.h error.h user.h
|
||||
sessioncontainer.o: plugindata.h rebus.h lastcontainer.h log.h misc.h
|
||||
@@ -263,7 +269,7 @@ sessionmanager.o: ../functions/run.h ../functions/stat.h
|
||||
sessionmanager.o: ../functions/subject.h ../functions/funthread.h
|
||||
sessionmanager.o: ../functions/template.h ../functions/tinymce.h
|
||||
sessionmanager.o: ../functions/uname.h ../functions/upload.h
|
||||
sessionmanager.o: ../functions/uptime.h ../functions/who.h
|
||||
sessionmanager.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
sessionmanager.o: ../core/htmlfilter.h ../templates/templates.h misc.h
|
||||
sessionmanager.o: ../templates/patterncacher.h ../core/item.h
|
||||
sessionmanager.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
|
||||
|
||||
+1
-1
@@ -148,7 +148,7 @@ bool App::Init()
|
||||
request.Clear();
|
||||
compress.Init();
|
||||
system.Init();
|
||||
functions.Create();
|
||||
functions.Init();
|
||||
|
||||
// !! teraz mamy dwa katalogi z templetami
|
||||
// !! o co chodzilo?
|
||||
|
||||
+26
-1
@@ -12,12 +12,14 @@
|
||||
|
||||
|
||||
std::string DirContainer::dir_etc = "etc";
|
||||
std::string DirContainer::dir_var = "var";
|
||||
|
||||
|
||||
DirContainer::DirContainer()
|
||||
{
|
||||
is_root = false;
|
||||
is_etc = false;
|
||||
is_var = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +42,15 @@ return etc_iter;
|
||||
}
|
||||
|
||||
|
||||
DirContainer::Iterator DirContainer::GetVar()
|
||||
{
|
||||
if( !is_var )
|
||||
return table.end();
|
||||
|
||||
return var_iter;
|
||||
}
|
||||
|
||||
|
||||
DirContainer::Iterator DirContainer::Begin()
|
||||
{
|
||||
return table.begin();
|
||||
@@ -69,6 +80,7 @@ bool DirContainer::Empty()
|
||||
void DirContainer::FindSpecialFolders()
|
||||
{
|
||||
is_etc = false;
|
||||
is_var = false;
|
||||
|
||||
if( !is_root )
|
||||
return;
|
||||
@@ -81,7 +93,12 @@ void DirContainer::FindSpecialFolders()
|
||||
{
|
||||
is_etc = true;
|
||||
etc_iter = i->second;
|
||||
break;
|
||||
}
|
||||
else
|
||||
if( i->second->url == dir_var )
|
||||
{
|
||||
is_var = true;
|
||||
var_iter = i->second;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -105,6 +122,14 @@ void DirContainer::CheckSpecialFolder(const Item & item, Iterator iter)
|
||||
etc_iter = iter;
|
||||
log << log1 << "DirCont: added special folder: /etc" << logend;
|
||||
}
|
||||
|
||||
if( item.parent_id==root_iter->id && item.url==dir_var )
|
||||
{
|
||||
is_var = true;
|
||||
var_iter = iter;
|
||||
log << log1 << "DirCont: added special folder: /var" << logend;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
+8
-1
@@ -34,6 +34,7 @@ public:
|
||||
|
||||
Iterator GetRoot();
|
||||
Iterator GetEtc();
|
||||
Iterator GetVar();
|
||||
|
||||
Iterator Begin();
|
||||
Iterator End();
|
||||
@@ -75,12 +76,18 @@ private:
|
||||
// etc
|
||||
Iterator etc_iter;
|
||||
|
||||
// true if there is a var dir in the table
|
||||
bool is_var;
|
||||
|
||||
// var
|
||||
Iterator var_iter;
|
||||
|
||||
// indexes
|
||||
TableId table_id;
|
||||
TableParent table_parent;
|
||||
|
||||
// names of folders
|
||||
static std::string dir_etc;
|
||||
static std::string dir_etc, dir_var;
|
||||
};
|
||||
|
||||
|
||||
|
||||
+48
-4
@@ -237,6 +237,17 @@ return &(*etc);
|
||||
}
|
||||
|
||||
|
||||
Item * Dirs::GetVarDir()
|
||||
{
|
||||
DirContainer::Iterator etc = dir_tab.GetVar();
|
||||
|
||||
if( etc == dir_tab.End() )
|
||||
return 0;
|
||||
|
||||
return &(*etc);
|
||||
}
|
||||
|
||||
|
||||
Item * Dirs::GetDir(const std::string & name, long parent)
|
||||
{
|
||||
DirContainer::ParentIterator i = dir_tab.FindFirstParent(parent);
|
||||
@@ -411,8 +422,11 @@ bool Dirs::DelDir(long dir_id)
|
||||
}
|
||||
|
||||
|
||||
Error Dirs::AddDirectory(Item & item, bool add_to_dir_tab)
|
||||
Error Dirs::AddDirectory(Item & item, bool add_to_dir_tab, Item ** pdir)
|
||||
{
|
||||
if( pdir )
|
||||
*pdir = 0;
|
||||
|
||||
if( item.type != Item::dir )
|
||||
return WINIX_ERR_DIR_EXPECTED;
|
||||
|
||||
@@ -421,10 +435,13 @@ Error Dirs::AddDirectory(Item & item, bool add_to_dir_tab)
|
||||
if( status == WINIX_ERR_OK )
|
||||
{
|
||||
request->notify_code |= WINIX_NOTIFY_DIR_ADD;
|
||||
Item * pdir = AddDir(item);
|
||||
Item * d = AddDir(item);
|
||||
|
||||
if( add_to_dir_tab && request->dir_tab.back()->id == item.parent_id )
|
||||
request->dir_tab.push_back(pdir);
|
||||
if( add_to_dir_tab && !request->dir_tab.empty() && request->dir_tab.back()->id == item.parent_id )
|
||||
request->dir_tab.push_back(d);
|
||||
|
||||
if( pdir )
|
||||
*pdir = d;
|
||||
}
|
||||
|
||||
return status;
|
||||
@@ -432,5 +449,32 @@ return status;
|
||||
|
||||
|
||||
|
||||
Item * Dirs::CreateVarDir()
|
||||
{
|
||||
Item * var = GetVarDir();
|
||||
|
||||
if( var )
|
||||
return var;
|
||||
|
||||
Item v;
|
||||
Item * root = GetRootDir();
|
||||
|
||||
if( root )
|
||||
{
|
||||
v.parent_id = root->id;
|
||||
v.user_id = -1;
|
||||
v.group_id = -1;
|
||||
v.privileges = 0755;
|
||||
v.subject = "var";
|
||||
v.url = "var";
|
||||
v.type = Item::dir;
|
||||
|
||||
AddDirectory(v, false, &var);
|
||||
}
|
||||
|
||||
return var;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+4
-2
@@ -54,6 +54,7 @@ public:
|
||||
// !! zmienic nazwy wskazujace ze operujemy tylko na lokalnej tablicy
|
||||
Item * GetRootDir();
|
||||
Item * GetEtcDir();
|
||||
Item * GetVarDir();
|
||||
Item * GetDir(const std::string & name, long parent);
|
||||
Item * GetDir(const std::string & path);
|
||||
Item * GetDir(long id);
|
||||
@@ -61,9 +62,10 @@ public:
|
||||
|
||||
void CheckRootDir();
|
||||
|
||||
Item * CreateVarDir();
|
||||
|
||||
// !! jak juz wczesniejsze nazwy beda zmienione to tutaj damy AddDir()
|
||||
Error AddDirectory(Item & item, bool add_to_dir_tab = false);
|
||||
// !! jak juz wczesniejsze nazwy beda zmienione to tutaj damy AddDir() /AddDir() juz istnieje przeciez?/
|
||||
Error AddDirectory(Item & item, bool add_to_dir_tab = false, Item ** pdir = 0);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user