added: Export plugin (not finished yet)

added:   ThreadManager
         all threads are connected to the ThreadManager
         they are started/stopped by the manager
changed: FunctionParser
         now we are parsing directly what is in URI
         (we were using GetParser beforehand)
         we are able to recognize ordinary URI scheme (with '?' and '#' characters)
         sample:
         http://domain.com/dir1/dir2/item/function?par1=val2&par2=val2#htmlanchor
         is the same as:
         http://domain.com/dir1/dir2/item/function/par1:val2/par2:val2#htmlanchor
         'htmlanchor' is put in Request::anchor field,
         and the default function can be used like this:
         http://domain.com/dir1/dir2/item?par1=val2&par2=val2#htmlanchor
         but there is not an equivalent in winix form
         e.g. http://domain.com/dir1/dir2/item/par1:val2/par2:val2#htmlanchor
         because 'par1:val2' would be treated as a function name
removed: GetParser
         now we don't have Request::get_tab structure
removed: CKEditorGetParser
         it is not needed now



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@752 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2011-07-28 22:18:10 +00:00
parent c37c1ff812
commit 4d87359aca
51 changed files with 1646 additions and 1203 deletions

View File

@@ -28,7 +28,7 @@ adduser.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
adduser.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
adduser.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
adduser.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
adduser.o: ../core/synchro.h ../core/slog.h
adduser.o: ../core/threadmanager.h ../core/synchro.h ../core/slog.h
cat.o: cat.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
cat.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
cat.o: ../core/misc.h ../core/item.h ../core/requesttypes.h ../core/error.h
@@ -55,7 +55,7 @@ cat.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
cat.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
cat.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h ../core/users.h
cat.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
cat.o: ../core/basethread.h ../core/synchro.h
cat.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
chmod.o: chmod.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
chmod.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
chmod.o: ../core/misc.h ../core/item.h ../core/requesttypes.h ../core/error.h
@@ -83,7 +83,7 @@ chmod.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
chmod.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
chmod.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
chmod.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
chmod.o: ../core/synchro.h
chmod.o: ../core/threadmanager.h ../core/synchro.h
chown.o: chown.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
chown.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
chown.o: ../core/misc.h ../core/item.h ../core/requesttypes.h ../core/error.h
@@ -111,7 +111,7 @@ chown.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
chown.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
chown.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
chown.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
chown.o: ../core/synchro.h
chown.o: ../core/threadmanager.h ../core/synchro.h
ckeditor.o: ckeditor.h functionbase.h ../core/item.h ../db/db.h
ckeditor.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
ckeditor.o: ../core/textstream.h ../core/misc.h ../core/item.h
@@ -141,7 +141,7 @@ ckeditor.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
ckeditor.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
ckeditor.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
ckeditor.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
ckeditor.o: ../core/synchro.h
ckeditor.o: ../core/threadmanager.h ../core/synchro.h
cp.o: cp.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
cp.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h ../core/misc.h
cp.o: ../core/item.h ../core/requesttypes.h ../core/error.h
@@ -168,7 +168,7 @@ cp.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
cp.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
cp.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
cp.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
cp.o: ../core/synchro.h ../core/misc.h
cp.o: ../core/threadmanager.h ../core/synchro.h ../core/misc.h
default.o: default.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
default.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
default.o: ../core/misc.h ../core/item.h ../core/requesttypes.h
@@ -197,7 +197,7 @@ default.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
default.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
default.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
default.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
default.o: ../core/synchro.h
default.o: ../core/threadmanager.h ../core/synchro.h
download.o: download.h functionbase.h ../core/item.h ../db/db.h
download.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
download.o: ../core/textstream.h ../core/misc.h ../core/item.h
@@ -227,7 +227,7 @@ download.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
download.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
download.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
download.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
download.o: ../core/synchro.h
download.o: ../core/threadmanager.h ../core/synchro.h
emacs.o: emacs.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
emacs.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
emacs.o: ../core/misc.h ../core/item.h ../core/requesttypes.h ../core/error.h
@@ -255,11 +255,9 @@ emacs.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
emacs.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
emacs.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
emacs.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
emacs.o: ../core/synchro.h ../templates/templates.h
emacs.o: ../templates/patterncacher.h ../templates/ckeditorgetparser.h
emacs.o: ../core/httpsimpleparser.h ../core/log.h
emacs.o: ../templates/indexpatterns.h ../core/sessionmanager.h
emacs.o: ../core/sessioncontainer.h ../core/system.h
emacs.o: ../core/threadmanager.h ../core/synchro.h ../templates/templates.h
emacs.o: ../templates/patterncacher.h ../templates/indexpatterns.h
emacs.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h
functionbase.o: functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
functionbase.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
functionbase.o: ../core/misc.h ../core/item.h ../core/requesttypes.h
@@ -291,7 +289,7 @@ functionbase.o: ../core/ugcontainer.h ../core/lastcontainer.h
functionbase.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h
functionbase.o: ../core/users.h ../core/groups.h ../core/group.h
functionbase.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
functionbase.o: ../core/synchro.h
functionbase.o: ../core/threadmanager.h ../core/synchro.h
functionparser.o: functionparser.h ../db/db.h ../db/dbbase.h ../db/dbconn.h
functionparser.o: ../db/dbtextstream.h ../core/textstream.h ../core/misc.h
functionparser.o: ../core/item.h ../core/requesttypes.h ../core/error.h
@@ -323,8 +321,9 @@ functionparser.o: ../core/users.h ../core/ugcontainer.h
functionparser.o: ../core/lastcontainer.h ../core/mounts.h
functionparser.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
functionparser.o: ../core/groups.h ../core/group.h ../core/loadavg.h
functionparser.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
functionparser.o: ../core/cur.h ../core/log.h
functionparser.o: ../core/thumb.h ../core/basethread.h
functionparser.o: ../core/threadmanager.h ../core/synchro.h ../core/cur.h
functionparser.o: ../core/log.h
functions.o: functions.h functionbase.h ../core/item.h ../db/db.h
functions.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
functions.o: ../core/textstream.h ../core/misc.h ../core/item.h
@@ -348,18 +347,17 @@ functions.o: ../notify/templatesnotify.h ../core/users.h
functions.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/mounts.h
functions.o: ../core/mountparser.h ../core/crypt.h run.h ../core/users.h
functions.o: ../core/groups.h ../core/group.h ../core/loadavg.h
functions.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
functions.o: functionparser.h ../core/cur.h adduser.h cat.h chmod.h
functions.o: privchanger.h chown.h ckeditor.h cp.h default.h download.h
functions.o: emacs.h last.h login.h logout.h ln.h ls.h mkdir.h mv.h nicedit.h
functions.o: node.h passwd.h priv.h reload.h rm.h specialdefault.h stat.h
functions.o: subject.h template.h tinymce.h uname.h upload.h uptime.h who.h
functions.o: vim.h ../core/htmlfilter.h ../core/log.h ../core/misc.h
functions.o: ../core/plugin.h ../core/pluginmsg.h ../core/system.h
functions.o: ../core/sessionmanager.h ../core/sessioncontainer.h
functions.o: ../functions/functions.h ../templates/templates.h
functions.o: ../templates/patterncacher.h ../templates/ckeditorgetparser.h
functions.o: ../core/httpsimpleparser.h ../core/log.h
functions.o: ../core/thumb.h ../core/basethread.h ../core/threadmanager.h
functions.o: ../core/synchro.h functionparser.h ../core/cur.h adduser.h cat.h
functions.o: chmod.h privchanger.h chown.h ckeditor.h cp.h default.h
functions.o: download.h emacs.h last.h login.h logout.h ln.h ls.h mkdir.h
functions.o: mv.h nicedit.h node.h passwd.h priv.h reload.h rm.h
functions.o: specialdefault.h stat.h subject.h template.h tinymce.h uname.h
functions.o: upload.h uptime.h who.h vim.h ../core/htmlfilter.h ../core/log.h
functions.o: ../core/misc.h ../core/plugin.h ../core/pluginmsg.h
functions.o: ../core/system.h ../core/sessionmanager.h
functions.o: ../core/sessioncontainer.h ../functions/functions.h
functions.o: ../templates/templates.h ../templates/patterncacher.h
functions.o: ../templates/indexpatterns.h ../core/sessionmanager.h
last.o: last.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
last.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
@@ -387,7 +385,8 @@ last.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
last.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
last.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h
last.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
last.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
last.o: ../core/thumb.h ../core/basethread.h ../core/threadmanager.h
last.o: ../core/synchro.h
ln.o: ln.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
ln.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h ../core/misc.h
ln.o: ../core/item.h ../core/requesttypes.h ../core/error.h
@@ -414,7 +413,8 @@ ln.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
ln.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
ln.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
ln.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
ln.o: ../core/synchro.h ../core/misc.h ../functions/functions.h
ln.o: ../core/threadmanager.h ../core/synchro.h ../core/misc.h
ln.o: ../functions/functions.h
login.o: login.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
login.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
login.o: ../core/misc.h ../core/item.h ../core/requesttypes.h ../core/error.h
@@ -442,7 +442,7 @@ login.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
login.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
login.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
login.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
login.o: ../core/synchro.h
login.o: ../core/threadmanager.h ../core/synchro.h
logout.o: logout.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
logout.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
logout.o: ../core/misc.h ../core/item.h ../core/requesttypes.h
@@ -471,7 +471,7 @@ logout.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
logout.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
logout.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
logout.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
logout.o: ../core/synchro.h
logout.o: ../core/threadmanager.h ../core/synchro.h
ls.o: ls.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
ls.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h ../core/misc.h
ls.o: ../core/item.h ../core/requesttypes.h ../core/error.h
@@ -498,7 +498,7 @@ ls.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
ls.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
ls.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
ls.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
ls.o: ../core/synchro.h
ls.o: ../core/threadmanager.h ../core/synchro.h
mkdir.o: mkdir.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
mkdir.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
mkdir.o: ../core/misc.h ../core/item.h ../core/requesttypes.h ../core/error.h
@@ -526,7 +526,7 @@ mkdir.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
mkdir.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
mkdir.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
mkdir.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
mkdir.o: ../core/synchro.h
mkdir.o: ../core/threadmanager.h ../core/synchro.h
mount.o: mount.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
mount.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
mount.o: ../core/misc.h ../core/item.h ../core/requesttypes.h ../core/error.h
@@ -554,7 +554,7 @@ mount.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
mount.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
mount.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
mount.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
mount.o: ../core/synchro.h
mount.o: ../core/threadmanager.h ../core/synchro.h
mv.o: mv.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
mv.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h ../core/misc.h
mv.o: ../core/item.h ../core/requesttypes.h ../core/error.h
@@ -581,7 +581,7 @@ mv.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
mv.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
mv.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
mv.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
mv.o: ../core/synchro.h
mv.o: ../core/threadmanager.h ../core/synchro.h
nicedit.o: nicedit.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
nicedit.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
nicedit.o: ../core/misc.h ../core/item.h ../core/requesttypes.h
@@ -610,7 +610,7 @@ nicedit.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
nicedit.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
nicedit.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
nicedit.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
nicedit.o: ../core/synchro.h
nicedit.o: ../core/threadmanager.h ../core/synchro.h
node.o: node.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
node.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
node.o: ../core/misc.h ../core/item.h ../core/requesttypes.h ../core/error.h
@@ -638,7 +638,7 @@ node.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
node.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
node.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
node.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
node.o: ../core/synchro.h
node.o: ../core/threadmanager.h ../core/synchro.h
passwd.o: passwd.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
passwd.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
passwd.o: ../core/misc.h ../core/item.h ../core/requesttypes.h
@@ -667,7 +667,8 @@ passwd.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
passwd.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
passwd.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
passwd.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
passwd.o: ../core/synchro.h ../core/slog.h ../functions/functions.h
passwd.o: ../core/threadmanager.h ../core/synchro.h ../core/slog.h
passwd.o: ../functions/functions.h
priv.o: priv.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
priv.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
priv.o: ../core/misc.h ../core/item.h ../core/requesttypes.h ../core/error.h
@@ -695,7 +696,7 @@ priv.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
priv.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
priv.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
priv.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
priv.o: ../core/synchro.h
priv.o: ../core/threadmanager.h ../core/synchro.h
privchanger.o: privchanger.h ../core/request.h ../core/system.h
privchanger.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h
privchanger.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
@@ -726,7 +727,7 @@ privchanger.o: ../notify/templatesnotify.h ../core/users.h
privchanger.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/mounts.h
privchanger.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
privchanger.o: ../core/groups.h ../core/group.h ../core/loadavg.h
privchanger.o: ../core/thumb.h ../core/basethread.h
privchanger.o: ../core/thumb.h ../core/basethread.h ../core/threadmanager.h
reload.o: reload.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
reload.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
reload.o: ../core/misc.h ../core/item.h ../core/requesttypes.h
@@ -755,11 +756,10 @@ reload.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
reload.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
reload.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
reload.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
reload.o: ../core/synchro.h ../templates/templates.h
reload.o: ../templates/patterncacher.h ../templates/ckeditorgetparser.h
reload.o: ../core/httpsimpleparser.h ../core/log.h
reload.o: ../templates/indexpatterns.h ../core/sessionmanager.h
reload.o: ../core/sessioncontainer.h ../core/system.h
reload.o: ../core/threadmanager.h ../core/synchro.h ../templates/templates.h
reload.o: ../templates/patterncacher.h ../templates/indexpatterns.h
reload.o: ../core/sessionmanager.h ../core/sessioncontainer.h
reload.o: ../core/system.h
rm.o: rm.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
rm.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h ../core/misc.h
rm.o: ../core/item.h ../core/requesttypes.h ../core/error.h
@@ -786,13 +786,12 @@ rm.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
rm.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
rm.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h ../core/users.h
rm.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
rm.o: ../core/basethread.h ../core/synchro.h ../core/plugin.h
rm.o: ../core/pluginmsg.h ../core/system.h ../core/sessionmanager.h
rm.o: ../core/sessioncontainer.h ../functions/functions.h
rm.o: ../templates/templates.h ../templates/patterncacher.h
rm.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
rm.o: ../core/log.h ../templates/indexpatterns.h ../core/sessionmanager.h
rm.o: ../core/misc.h
rm.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
rm.o: ../core/plugin.h ../core/pluginmsg.h ../core/system.h
rm.o: ../core/sessionmanager.h ../core/sessioncontainer.h
rm.o: ../functions/functions.h ../templates/templates.h
rm.o: ../templates/patterncacher.h ../templates/indexpatterns.h
rm.o: ../core/sessionmanager.h ../core/misc.h
run.o: run.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
run.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
run.o: ../core/misc.h ../core/item.h ../core/requesttypes.h ../core/error.h
@@ -819,7 +818,7 @@ run.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
run.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
run.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h ../core/users.h
run.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
run.o: ../core/basethread.h ../core/synchro.h
run.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
specialdefault.o: specialdefault.h functionbase.h ../core/item.h ../db/db.h
specialdefault.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
specialdefault.o: ../core/textstream.h ../core/misc.h ../core/item.h
@@ -852,7 +851,7 @@ specialdefault.o: ../core/ugcontainer.h ../core/lastcontainer.h
specialdefault.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h
specialdefault.o: ../core/users.h ../core/groups.h ../core/group.h
specialdefault.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
specialdefault.o: ../core/synchro.h
specialdefault.o: ../core/threadmanager.h ../core/synchro.h
stat.o: stat.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
stat.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
stat.o: ../core/misc.h ../core/item.h ../core/requesttypes.h ../core/error.h
@@ -879,7 +878,8 @@ stat.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
stat.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
stat.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h
stat.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
stat.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
stat.o: ../core/thumb.h ../core/basethread.h ../core/threadmanager.h
stat.o: ../core/synchro.h
subject.o: subject.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
subject.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
subject.o: ../core/misc.h ../core/item.h ../core/requesttypes.h
@@ -908,7 +908,7 @@ subject.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
subject.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
subject.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
subject.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
subject.o: ../core/synchro.h
subject.o: ../core/threadmanager.h ../core/synchro.h
template.o: template.h functionbase.h ../core/item.h ../db/db.h
template.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
template.o: ../core/textstream.h ../core/misc.h ../core/item.h
@@ -938,7 +938,7 @@ template.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
template.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
template.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
template.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
template.o: ../core/synchro.h ../core/misc.h
template.o: ../core/threadmanager.h ../core/synchro.h ../core/misc.h
tinymce.o: tinymce.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
tinymce.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
tinymce.o: ../core/misc.h ../core/item.h ../core/requesttypes.h
@@ -967,7 +967,7 @@ tinymce.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
tinymce.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
tinymce.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
tinymce.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
tinymce.o: ../core/synchro.h
tinymce.o: ../core/threadmanager.h ../core/synchro.h
uname.o: uname.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
uname.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
uname.o: ../core/misc.h ../core/item.h ../core/requesttypes.h ../core/error.h
@@ -994,7 +994,8 @@ uname.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
uname.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
uname.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h
uname.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
uname.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
uname.o: ../core/thumb.h ../core/basethread.h ../core/threadmanager.h
uname.o: ../core/synchro.h
upload.o: upload.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
upload.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
upload.o: ../core/misc.h ../core/item.h ../core/requesttypes.h
@@ -1023,11 +1024,11 @@ upload.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
upload.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
upload.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
upload.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
upload.o: ../core/synchro.h ../core/misc.h ../functions/functions.h
upload.o: ../templates/templates.h ../templates/patterncacher.h
upload.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
upload.o: ../core/log.h ../templates/indexpatterns.h ../core/sessionmanager.h
upload.o: ../core/sessioncontainer.h ../core/system.h
upload.o: ../core/threadmanager.h ../core/synchro.h ../core/misc.h
upload.o: ../functions/functions.h ../templates/templates.h
upload.o: ../templates/patterncacher.h ../templates/indexpatterns.h
upload.o: ../core/sessionmanager.h ../core/sessioncontainer.h
upload.o: ../core/system.h
uptime.o: uptime.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
uptime.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
uptime.o: ../core/misc.h ../core/item.h ../core/requesttypes.h
@@ -1056,7 +1057,7 @@ uptime.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
uptime.o: ../core/lastcontainer.h ../core/mounts.h ../core/mountparser.h
uptime.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
uptime.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
uptime.o: ../core/synchro.h
uptime.o: ../core/threadmanager.h ../core/synchro.h
vim.o: vim.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
vim.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
vim.o: ../core/misc.h ../core/item.h ../core/requesttypes.h ../core/error.h
@@ -1083,7 +1084,7 @@ vim.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
vim.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
vim.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h ../core/users.h
vim.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
vim.o: ../core/basethread.h ../core/synchro.h
vim.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
who.o: who.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
who.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
who.o: ../core/misc.h ../core/item.h ../core/requesttypes.h ../core/error.h
@@ -1110,4 +1111,4 @@ who.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
who.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
who.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h ../core/users.h
who.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
who.o: ../core/basethread.h ../core/synchro.h
who.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h

View File

@@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2008-2010, Tomasz Sowa
* Copyright (c) 2008-2011, Tomasz Sowa
* All rights reserved.
*
*/
@@ -12,138 +12,231 @@
#include "core/item.h"
#include "core/error.h"
#include "functions.h"
#include "utf8.h"
void FunctionParser::SkipEmptyString(const char * msg)
FunctionParser::FunctionParser()
{
for( ; get_index != get_tab_len && cur->request->get_tab[get_index].empty() ; ++get_index )
log << log3 << msg << logend;
utf8 = false;
}
void FunctionParser::UTF8(bool use_utf8)
{
utf8 = use_utf8;
}
bool FunctionParser::Parse(Cur * pcur, Db * pdb, Functions * pfunctions, System * psystem)
{
db = pdb;
cur = pcur;
system = psystem;
functions = pfunctions;
last_dir = 0;
path = cur->request->env_request_uri;
//!! mozna dodac sprawdzanie dlugosci path
// jesli wieksza niz np 2048 to zglosic incorrect url
// i nie parsowac
ParseDirsItemFunction();
ParseParams();
ParseAnchor();
return cur->request->status == WINIX_ERR_OK;
}
void FunctionParser::ParseDirectories()
void FunctionParser::ParseDirsItemFunction()
{
Item * pdir = system->dirs.GetRootDir();
if( !pdir )
if( !AddRootDir() )
return;
ReadName();
while( IsDir() )
{
// there is no the root dir
cur->request->status = WINIX_ERR_NO_ROOT_DIR;
return;
AddDir();
ReadName();
}
if( name.empty() )
return;
while( true )
{
cur->request->dir_tab.push_back( pdir );
log << log3 << "FP: Directory: ";
if( pdir->parent_id == -1 )
log << "(root)" << logend;
else
log << pdir->url << logend;
if( CheckAddFunction() )
return;
SkipEmptyString("FP: Directory: skipped empty string");
if( get_index == get_tab_len )
break;
if( CheckAddItem() )
{
ReadName();
CheckAddFunction();
SkipSlashes();
pdir = system->dirs.GetDir(cur->request->get_tab[get_index], pdir->id);
if( !cur->request->function && *path && *path!='#' && *path!='?' )
{
log << log3 << "FP: unknown function: " << name << logend;
cur->request->status = WINIX_ERR_NO_ITEM;
}
}
}
bool FunctionParser::AddRootDir()
{
last_dir = system->dirs.GetRootDir();
if( !last_dir )
{
log << log3 << "FP: there is not a root directory" << logend;
cur->request->status = WINIX_ERR_INTERNAL_ERROR;
return false;
}
AddDir();
return true;
}
bool FunctionParser::IsDir()
{
// directory names should not be empty
if( name.empty() || !last_dir )
return false;
last_dir = system->dirs.GetDir(name, last_dir->id);
if( !pdir )
break;
++get_index;
}
return last_dir != 0;
}
bool FunctionParser::CheckAddItem()
{
// cur->request->dir_tab has at least one element
long parent_id = cur->request->dir_tab.back()->id;
Error status = db->GetItem(parent_id, name, cur->request->item);
if( status == WINIX_ERR_OK )
{
log << log3 << "FP: Item: id: " << cur->request->item.id << ", url: " << cur->request->item.url << logend;
cur->request->last_item = &cur->request->item;
cur->request->is_item = true;
return true;
}
if( status == WINIX_ERR_NO_ITEM )
{
log << log3 << "FP: No Item: url: " << name << logend;
cur->request->status = WINIX_ERR_NO_ITEM;
return false;
}
log << log1 << "FP: db error" << logend;
cur->request->status = WINIX_ERR_INTERNAL_ERROR;
return false;
}
bool FunctionParser::CheckAddFunction()
{
cur->request->function = functions->Find(name);
if( cur->request->function )
{
log << log3 << "FP: Function: " << cur->request->function->fun.url << logend;
return true;
}
return false;
}
void FunctionParser::AddDir()
{
cur->request->dir_tab.push_back( last_dir );
log << log3 << "FP: Directory: ";
if( last_dir->parent_id == -1 )
log << "(root)" << logend;
else
log << last_dir->url << logend;
cur->request->last_item = cur->request->dir_tab.back();
}
void FunctionParser::ParseItem()
void FunctionParser::ParseParams()
{
SkipEmptyString("FP: Item: skipped empty string");
if( get_index == get_tab_len )
SkipSlashes();
if( *path == '#' )
{
// there are not any parameters
return;
// cur->request->dir_tab has at least one element
long parent_id = cur->request->dir_tab.back()->id;
const std::wstring & url = cur->request->get_tab[get_index];
cur->request->status = db->GetItem(parent_id, url, cur->request->item);
if( cur->request->status == WINIX_ERR_OK )
{
cur->request->last_item = &cur->request->item;
if( cur->request->role == Request::authorizer && cur->request->item.file_type == WINIX_ITEM_FILETYPE_NONE )
{
log << log1 << "FP: item.url: " << url << " exists but has not a static content (authorizer role)" << logend;
cur->request->status = WINIX_ERR_NO_ITEM;
return;
}
++get_index;
cur->request->is_item = true;
log << log3 << "FP: Item: id: " << cur->request->item.id << ", url: " << cur->request->item.url << logend;
}
if( *path == '?' )
ParseOrdinaryParams();
else
{
log << log3 << "FP: No Item: url: " << url << logend;
}
ParseWinixParams();
}
void FunctionParser::ParseFunction()
void FunctionParser::ParseOrdinaryParams()
{
SkipEmptyString("FP: Function: skipped empty string");
if( get_index == get_tab_len )
return;
cur->request->function = functions->Find(cur->request->get_tab[get_index]);
if( cur->request->function )
if( *path=='?' )
path += 1;
do
{
++get_index;
log << log3 << "FP: Function: " << cur->request->function->fun.url << logend;
ReadOrdinaryParName();
if( name.empty() )
break;
ReadOrdinaryParValue();
if( *path == '&' )
path += 1;
AddParam();
}
while( true );
}
void FunctionParser::ParseParams(const std::wstring & par)
void FunctionParser::ParseWinixParams()
{
Param param;
size_t i;
if( par.empty() )
return;
// looking for the first colon ':'
for(i=0 ; i<par.size() && par[i] != ':' ; ++i);
if( i == par.size() )
do
{
// there is no a colon
param.name = par;
}
else
{
if( i > 0 )
param.name = par.substr(0, i);
SkipSlashes();
ReadWinixParName();
if( i < par.size() - 1 )
param.value = par.substr(i+1);
}
if( name.empty() )
break;
ReadWinixParValue();
AddParam();
}
while( true );
}
void FunctionParser::AddParam()
{
param.name = name;
param.value = value;
cur->request->param_tab.push_back(param);
log << log3 << "FP: Param: name=" << param.name;
@@ -155,81 +248,153 @@ size_t i;
}
void FunctionParser::ParseParams()
void FunctionParser::ParseAnchor()
{
for( ; true ; ++get_index )
{
SkipEmptyString("FP: Params: skipped empty string");
if( get_index == get_tab_len )
break;
ParseParams(cur->request->get_tab[get_index]);
}
}
void FunctionParser::Parse(Cur * pcur, Db * pdb, Functions * pfunctions, System * psystem)
{
db = pdb;
cur = pcur;
system = psystem;
functions = pfunctions;
cur->request->status = WINIX_ERR_OK;
get_index = 0;
get_tab_len = cur->request->get_tab.size();
cur->request->function = 0;
cur->request->is_item = false;
ParseDirectories();
if( cur->request->status != WINIX_ERR_OK )
if( *path == 0 )
return;
ParseFunction();
if( !cur->request->function )
if( *path != '#' )
{
ParseItem();
if( cur->request->status != WINIX_ERR_OK )
return;
ParseFunction();
if( !cur->request->function && get_index != get_tab_len )
{
cur->request->status = WINIX_ERR_NO_FUNCTION;
log << log3 << "FP: Parse: unknown function: \"" << cur->request->get_tab[get_index] << "\"" << logend;
return;
}
cur->request->status = WINIX_ERR_INCORRECT_URI;
return;
}
ParseParams();
path += 1;
name_ascii.clear();
while( *path )
name_ascii += GetChar();
ToWide(name_ascii, cur->request->anchor);
if( !cur->request->anchor.empty() )
log << log3 << "FP: anchor: " << cur->request->anchor << logend;
}
void FunctionParser::SkipSlashes()
{
while( *path == '/' )
path += 1;
}
int FunctionParser::FromHex(int c)
{
if( c>='0' && c<='9' )
return c - '0';
else
if( c>='a' && c<='f' )
return c - 'a' + 10;
else
if( c>='A' && c<='F' )
return c - 'A' + 10;
else
cur->request->status = WINIX_ERR_INCORRECT_URI;
return 0;
}
int FunctionParser::GetChar()
{
int c;
if( *path == 0 )
return 0;
if( *path == '%' && *(path+1)!=0 && *(path+2)!=0 )
{
c = (FromHex(*(path+1)) << 4) + FromHex(*(path+2));
if( c == 0 )
cur->request->status = WINIX_ERR_INCORRECT_URI;
path += 3;
}
else
{
c = *path;
path += 1;
}
return c;
}
void FunctionParser::ToWide(const std::string & src, std::wstring & dst)
{
dst.clear();
if( utf8 )
Ezc::UTF8ToWide(src, dst, false);
else
AssignString(src, dst, false);
}
void FunctionParser::ReadName()
{
SkipSlashes();
name_ascii.clear();
while( *path && *path!='/' && *path!='?' && *path!='#' )
name_ascii += GetChar();
ToWide(name_ascii, name);
}
void FunctionParser::ReadOrdinaryParName()
{
name_ascii.clear();
while( *path && *path!='=' && *path!='&' && *path!='#' )
name_ascii += GetChar();
ToWide(name_ascii, name);
}
void FunctionParser::ReadOrdinaryParValue()
{
value_ascii.clear();
if( *path=='=' )
path += 1;
while( *path && *path!='&' && *path!='#' )
value_ascii += GetChar();
ToWide(value_ascii, value);
}
void FunctionParser::ReadWinixParName()
{
name_ascii.clear();
while( *path && *path!='/' && *path!=':' && *path!='#' )
name_ascii += GetChar();
ToWide(name_ascii, name);
}
void FunctionParser::ReadWinixParValue()
{
value_ascii.clear();
if( *path==':' )
path += 1;
while( *path && *path!='/' && *path!='#' )
value_ascii += GetChar();
ToWide(value_ascii, value);
}

View File

@@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2008-2010, Tomasz Sowa
* Copyright (c) 2008-2011, Tomasz Sowa
* All rights reserved.
*
*/
@@ -10,6 +10,7 @@
#ifndef headerfile_winix_functions_functionparser
#define headerfile_winix_functions_functionparser
#include <string>
#include "db/db.h"
#include "core/cur.h"
#include "core/system.h"
@@ -18,31 +19,57 @@
class Functions;
class FunctionParser
{
public:
FunctionParser();
bool Parse(Cur * pcur, Db * pdb, Functions * pfunctions, System * psystem);
void UTF8(bool use_utf8);
private:
Db * db;
Cur * cur;
System * system;
Functions * functions;
GetTab::size_type get_index;
GetTab::size_type get_tab_len;
void SkipEmptyString(const char * msg);
void ParseDirectories();
void ParseItem();
bool IsAppFunction();
void ParseFunction();
void ParseParams(const std::wstring & par);
const char * path;
std::string name_ascii, value_ascii;
std::wstring name, value;
Item * last_dir;
Param param;
bool utf8;
void SkipSlashes();
void ParseDirsItemFunction();
void ParseParams();
void ParseAnchor();
public:
bool IsDir();
bool CheckAddItem();
bool CheckAddFunction();
bool AddRootDir();
void AddDir();
void AddParam();
void ParseOrdinaryParams();
void ParseWinixParams();
void ToWide(const std::string & src, std::wstring & dst);
int FromHex(int c);
int GetChar();
void ReadName();
void ReadOrdinaryParName();
void ReadOrdinaryParValue();
void ReadWinixParName();
void ReadWinixParValue();
void Parse(Cur * pcur, Db * pdb, Functions * pfunctions, System * psystem);
};
#endif

View File

@@ -228,6 +228,7 @@ void Functions::Init()
void Functions::Parse()
{
function_parser.UTF8(config->utf8);
function_parser.Parse(cur, db, this, system);
}