changed: added Cur structure
we have there two pointers: Request * request; Session * session; these are the current request and the current session the session GC was moved to SessionManager (was in SessionContainer) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@708 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -6,48 +6,47 @@ app.o: dircontainer.h ../db/db.h ../db/dbbase.h ../db/dbconn.h
|
||||
app.o: ../db/dbtextstream.h ../core/textstream.h misc.h ../core/error.h log.h
|
||||
app.o: textstream.h ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h
|
||||
app.o: ../core/user.h ../core/group.h ../core/dircontainer.h
|
||||
app.o: ../core/ugcontainer.h request.h requesttypes.h session.h error.h
|
||||
app.o: user.h plugindata.h rebus.h ../templates/htmltextstream.h
|
||||
app.o: ../notify/notify.h ../notify/notifypool.h ../templates/locale.h
|
||||
app.o: ../core/confparser.h ../templates/misc.h ../templates/localefilter.h
|
||||
app.o: ../templates/locale.h ../../ezc/src/ezc.h ../../ezc/src/utf8.h
|
||||
app.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
|
||||
app.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
|
||||
app.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
app.o: ../notify/notifythread.h ../core/basethread.h synchro.h
|
||||
app.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h
|
||||
app.o: ugcontainer.h lastcontainer.h mounts.h mount.h mountparser.h users.h
|
||||
app.o: groups.h group.h loadavg.h thumb.h basethread.h sessionmanager.h
|
||||
app.o: sessioncontainer.h ../functions/functions.h
|
||||
app.o: ../core/ugcontainer.h request.h requesttypes.h error.h
|
||||
app.o: ../templates/htmltextstream.h ../notify/notify.h
|
||||
app.o: ../notify/notifypool.h ../templates/locale.h ../core/confparser.h
|
||||
app.o: ../templates/misc.h ../templates/localefilter.h ../templates/locale.h
|
||||
app.o: ../../ezc/src/ezc.h ../../ezc/src/utf8.h ../../ezc/src/generator.h
|
||||
app.o: ../../ezc/src/pattern.h ../../ezc/src/functions.h
|
||||
app.o: ../../ezc/src/funinfo.h ../../ezc/src/stringconv.h
|
||||
app.o: ../templates/htmltextstream.h ../notify/notifythread.h
|
||||
app.o: ../core/basethread.h synchro.h ../notify/templatesnotify.h
|
||||
app.o: ../core/config.h ../core/users.h user.h ugcontainer.h lastcontainer.h
|
||||
app.o: cur.h session.h plugindata.h rebus.h mounts.h mount.h mountparser.h
|
||||
app.o: users.h groups.h group.h loadavg.h thumb.h basethread.h
|
||||
app.o: sessionmanager.h sessioncontainer.h ../functions/functions.h
|
||||
app.o: ../functions/functionbase.h ../core/request.h ../core/system.h
|
||||
app.o: ../core/synchro.h ../functions/functionparser.h ../functions/adduser.h
|
||||
app.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h
|
||||
app.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h
|
||||
app.o: ../functions/default.h ../functions/download.h ../functions/emacs.h
|
||||
app.o: ../functions/last.h ../functions/login.h ../functions/logout.h
|
||||
app.o: ../functions/ln.h ../functions/ls.h ../functions/mkdir.h
|
||||
app.o: ../functions/mv.h ../functions/node.h ../functions/priv.h
|
||||
app.o: ../functions/reload.h ../functions/rm.h ../functions/run.h
|
||||
app.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
app.o: ../functions/subject.h ../functions/template.h ../functions/tinymce.h
|
||||
app.o: ../functions/uname.h ../functions/upload.h ../functions/uptime.h
|
||||
app.o: ../functions/who.h ../functions/vim.h ../core/htmlfilter.h
|
||||
app.o: ../templates/templates.h ../templates/patterncacher.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
|
||||
app.o: ../core/synchro.h ../functions/functionparser.h ../core/cur.h
|
||||
app.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
|
||||
app.o: ../functions/privchanger.h ../functions/chown.h
|
||||
app.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h
|
||||
app.o: ../functions/download.h ../functions/emacs.h ../functions/last.h
|
||||
app.o: ../functions/login.h ../functions/logout.h ../functions/ln.h
|
||||
app.o: ../functions/ls.h ../functions/mkdir.h ../functions/mv.h
|
||||
app.o: ../functions/node.h ../functions/priv.h ../functions/reload.h
|
||||
app.o: ../functions/rm.h ../functions/run.h ../functions/specialdefault.h
|
||||
app.o: ../functions/stat.h ../functions/subject.h ../functions/template.h
|
||||
app.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
|
||||
app.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
app.o: ../core/htmlfilter.h ../templates/templates.h
|
||||
app.o: ../templates/patterncacher.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
|
||||
basethread.o: basethread.h log.h textstream.h
|
||||
bbcodeparser.o: bbcodeparser.h htmlfilter.h
|
||||
compress.o: compress.h log.h textstream.h
|
||||
config.o: config.h confparser.h htmlfilter.h log.h textstream.h plugin.h
|
||||
config.o: pluginmsg.h plugindata.h request.h requesttypes.h session.h item.h
|
||||
config.o: error.h user.h rebus.h ../templates/htmltextstream.h
|
||||
config.o: ../core/textstream.h misc.h system.h dirs.h dircontainer.h
|
||||
config.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
|
||||
config.o: ../core/error.h ../db/dbitemquery.h ../core/item.h
|
||||
config.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h
|
||||
config.o: pluginmsg.h plugindata.h request.h requesttypes.h item.h error.h
|
||||
config.o: ../templates/htmltextstream.h ../core/textstream.h misc.h system.h
|
||||
config.o: dirs.h dircontainer.h ../db/db.h ../db/dbbase.h ../db/dbconn.h
|
||||
config.o: ../db/dbtextstream.h ../core/error.h ../db/dbitemquery.h
|
||||
config.o: ../core/item.h ../db/dbitemcolumns.h ../core/user.h ../core/group.h
|
||||
config.o: ../core/dircontainer.h ../core/ugcontainer.h ../notify/notify.h
|
||||
config.o: ../notify/notifypool.h ../templates/locale.h ../core/confparser.h
|
||||
config.o: ../templates/misc.h ../templates/localefilter.h
|
||||
@@ -56,21 +55,22 @@ config.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
|
||||
config.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
|
||||
config.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
config.o: ../notify/notifythread.h ../core/basethread.h synchro.h
|
||||
config.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h
|
||||
config.o: ugcontainer.h lastcontainer.h mounts.h mount.h mountparser.h
|
||||
config.o: users.h groups.h group.h loadavg.h thumb.h basethread.h
|
||||
config.o: sessionmanager.h sessioncontainer.h ../functions/functions.h
|
||||
config.o: ../functions/functionbase.h ../core/request.h ../core/system.h
|
||||
config.o: ../core/synchro.h ../functions/functionparser.h
|
||||
config.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
|
||||
config.o: ../functions/privchanger.h ../functions/chown.h
|
||||
config.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h
|
||||
config.o: ../functions/download.h ../functions/emacs.h ../functions/last.h
|
||||
config.o: ../functions/login.h ../functions/logout.h ../functions/ln.h
|
||||
config.o: ../functions/ls.h ../functions/mkdir.h ../functions/mv.h
|
||||
config.o: ../functions/node.h ../functions/priv.h ../functions/reload.h
|
||||
config.o: ../functions/rm.h ../functions/run.h ../functions/specialdefault.h
|
||||
config.o: ../functions/stat.h ../functions/subject.h ../functions/template.h
|
||||
config.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h user.h
|
||||
config.o: ugcontainer.h lastcontainer.h cur.h session.h rebus.h mounts.h
|
||||
config.o: mount.h mountparser.h users.h groups.h group.h loadavg.h thumb.h
|
||||
config.o: basethread.h sessionmanager.h sessioncontainer.h
|
||||
config.o: ../functions/functions.h ../functions/functionbase.h
|
||||
config.o: ../core/request.h ../core/system.h ../core/synchro.h
|
||||
config.o: ../functions/functionparser.h ../core/cur.h ../functions/adduser.h
|
||||
config.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h
|
||||
config.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h
|
||||
config.o: ../functions/default.h ../functions/download.h ../functions/emacs.h
|
||||
config.o: ../functions/last.h ../functions/login.h ../functions/logout.h
|
||||
config.o: ../functions/ln.h ../functions/ls.h ../functions/mkdir.h
|
||||
config.o: ../functions/mv.h ../functions/node.h ../functions/priv.h
|
||||
config.o: ../functions/reload.h ../functions/rm.h ../functions/run.h
|
||||
config.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
config.o: ../functions/subject.h ../functions/template.h
|
||||
config.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
|
||||
config.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
config.o: ../core/htmlfilter.h ../templates/templates.h
|
||||
@@ -84,8 +84,8 @@ dirs.o: ../db/dbtextstream.h ../core/textstream.h misc.h ../core/error.h
|
||||
dirs.o: log.h textstream.h ../db/dbitemquery.h ../core/item.h
|
||||
dirs.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h
|
||||
dirs.o: ../core/dircontainer.h ../core/ugcontainer.h request.h requesttypes.h
|
||||
dirs.o: session.h error.h user.h plugindata.h rebus.h config.h confparser.h
|
||||
dirs.o: htmlfilter.h ../templates/htmltextstream.h ../notify/notify.h
|
||||
dirs.o: error.h config.h confparser.h htmlfilter.h
|
||||
dirs.o: ../templates/htmltextstream.h ../notify/notify.h
|
||||
dirs.o: ../notify/notifypool.h ../templates/locale.h ../core/confparser.h
|
||||
dirs.o: ../templates/misc.h ../templates/localefilter.h ../templates/locale.h
|
||||
dirs.o: ../../ezc/src/ezc.h ../../ezc/src/utf8.h ../../ezc/src/generator.h
|
||||
@@ -93,7 +93,8 @@ dirs.o: ../../ezc/src/pattern.h ../../ezc/src/functions.h
|
||||
dirs.o: ../../ezc/src/funinfo.h ../../ezc/src/stringconv.h
|
||||
dirs.o: ../templates/htmltextstream.h ../notify/notifythread.h
|
||||
dirs.o: ../core/basethread.h synchro.h ../notify/templatesnotify.h
|
||||
dirs.o: ../core/config.h ../core/users.h ugcontainer.h lastcontainer.h
|
||||
dirs.o: ../core/config.h ../core/users.h user.h ugcontainer.h lastcontainer.h
|
||||
dirs.o: cur.h session.h plugindata.h rebus.h
|
||||
groups.o: groups.h group.h ugcontainer.h ../db/db.h ../db/dbbase.h
|
||||
groups.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h misc.h
|
||||
groups.o: item.h ../core/error.h log.h textstream.h ../db/dbitemquery.h
|
||||
@@ -117,7 +118,7 @@ misc.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
|
||||
misc.o: ../core/textstream.h ../core/error.h ../db/dbitemquery.h
|
||||
misc.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h
|
||||
misc.o: ../core/dircontainer.h ../core/ugcontainer.h
|
||||
misc.o: ../templates/htmltextstream.h ../core/request.h ../core/system.h
|
||||
misc.o: ../templates/htmltextstream.h ../core/cur.h ../core/system.h
|
||||
misc.o: ../core/sessionmanager.h
|
||||
mount.o: mount.h misc.h item.h
|
||||
mountparser.o: mountparser.h mount.h item.h error.h dirs.h dircontainer.h
|
||||
@@ -125,11 +126,10 @@ mountparser.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
|
||||
mountparser.o: ../core/textstream.h misc.h ../core/error.h log.h textstream.h
|
||||
mountparser.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h
|
||||
mountparser.o: ../core/user.h ../core/group.h ../core/dircontainer.h
|
||||
mountparser.o: ../core/ugcontainer.h request.h requesttypes.h session.h
|
||||
mountparser.o: user.h plugindata.h rebus.h config.h confparser.h htmlfilter.h
|
||||
mountparser.o: ../templates/htmltextstream.h ../notify/notify.h
|
||||
mountparser.o: ../notify/notifypool.h ../templates/locale.h
|
||||
mountparser.o: ../core/confparser.h ../templates/misc.h
|
||||
mountparser.o: ../core/ugcontainer.h request.h requesttypes.h config.h
|
||||
mountparser.o: confparser.h htmlfilter.h ../templates/htmltextstream.h
|
||||
mountparser.o: ../notify/notify.h ../notify/notifypool.h
|
||||
mountparser.o: ../templates/locale.h ../core/confparser.h ../templates/misc.h
|
||||
mountparser.o: ../templates/localefilter.h ../templates/locale.h
|
||||
mountparser.o: ../../ezc/src/ezc.h ../../ezc/src/utf8.h
|
||||
mountparser.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
|
||||
@@ -137,37 +137,39 @@ mountparser.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
|
||||
mountparser.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
mountparser.o: ../notify/notifythread.h ../core/basethread.h synchro.h
|
||||
mountparser.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h
|
||||
mountparser.o: ugcontainer.h lastcontainer.h
|
||||
mountparser.o: user.h ugcontainer.h lastcontainer.h cur.h session.h
|
||||
mountparser.o: plugindata.h rebus.h
|
||||
mounts.o: mounts.h mount.h error.h dirs.h item.h dircontainer.h ../db/db.h
|
||||
mounts.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
|
||||
mounts.o: ../core/textstream.h misc.h ../core/error.h log.h textstream.h
|
||||
mounts.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h
|
||||
mounts.o: ../core/user.h ../core/group.h ../core/dircontainer.h
|
||||
mounts.o: ../core/ugcontainer.h request.h requesttypes.h session.h user.h
|
||||
mounts.o: plugindata.h rebus.h config.h confparser.h htmlfilter.h
|
||||
mounts.o: ../templates/htmltextstream.h ../notify/notify.h
|
||||
mounts.o: ../notify/notifypool.h ../templates/locale.h ../core/confparser.h
|
||||
mounts.o: ../templates/misc.h ../templates/localefilter.h
|
||||
mounts.o: ../templates/locale.h ../../ezc/src/ezc.h ../../ezc/src/utf8.h
|
||||
mounts.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
|
||||
mounts.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
|
||||
mounts.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
mounts.o: ../notify/notifythread.h ../core/basethread.h synchro.h
|
||||
mounts.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h
|
||||
mounts.o: ugcontainer.h lastcontainer.h mountparser.h plugin.h pluginmsg.h
|
||||
mounts.o: system.h users.h groups.h group.h loadavg.h thumb.h basethread.h
|
||||
mounts.o: sessionmanager.h sessioncontainer.h ../functions/functions.h
|
||||
mounts.o: ../functions/functionbase.h ../core/request.h ../core/system.h
|
||||
mounts.o: ../core/synchro.h ../functions/functionparser.h
|
||||
mounts.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
|
||||
mounts.o: ../functions/privchanger.h ../functions/chown.h
|
||||
mounts.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h
|
||||
mounts.o: ../functions/download.h ../functions/emacs.h ../functions/last.h
|
||||
mounts.o: ../functions/login.h ../functions/logout.h ../functions/ln.h
|
||||
mounts.o: ../functions/ls.h ../functions/mkdir.h ../functions/mv.h
|
||||
mounts.o: ../functions/node.h ../functions/priv.h ../functions/reload.h
|
||||
mounts.o: ../functions/rm.h ../functions/run.h ../functions/specialdefault.h
|
||||
mounts.o: ../functions/stat.h ../functions/subject.h ../functions/template.h
|
||||
mounts.o: ../core/ugcontainer.h request.h requesttypes.h config.h
|
||||
mounts.o: confparser.h htmlfilter.h ../templates/htmltextstream.h
|
||||
mounts.o: ../notify/notify.h ../notify/notifypool.h ../templates/locale.h
|
||||
mounts.o: ../core/confparser.h ../templates/misc.h
|
||||
mounts.o: ../templates/localefilter.h ../templates/locale.h
|
||||
mounts.o: ../../ezc/src/ezc.h ../../ezc/src/utf8.h ../../ezc/src/generator.h
|
||||
mounts.o: ../../ezc/src/pattern.h ../../ezc/src/functions.h
|
||||
mounts.o: ../../ezc/src/funinfo.h ../../ezc/src/stringconv.h
|
||||
mounts.o: ../templates/htmltextstream.h ../notify/notifythread.h
|
||||
mounts.o: ../core/basethread.h synchro.h ../notify/templatesnotify.h
|
||||
mounts.o: ../core/config.h ../core/users.h user.h ugcontainer.h
|
||||
mounts.o: lastcontainer.h cur.h session.h plugindata.h rebus.h mountparser.h
|
||||
mounts.o: plugin.h pluginmsg.h system.h users.h groups.h group.h loadavg.h
|
||||
mounts.o: thumb.h basethread.h sessionmanager.h sessioncontainer.h
|
||||
mounts.o: ../functions/functions.h ../functions/functionbase.h
|
||||
mounts.o: ../core/request.h ../core/system.h ../core/synchro.h
|
||||
mounts.o: ../functions/functionparser.h ../core/cur.h ../functions/adduser.h
|
||||
mounts.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h
|
||||
mounts.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h
|
||||
mounts.o: ../functions/default.h ../functions/download.h ../functions/emacs.h
|
||||
mounts.o: ../functions/last.h ../functions/login.h ../functions/logout.h
|
||||
mounts.o: ../functions/ln.h ../functions/ls.h ../functions/mkdir.h
|
||||
mounts.o: ../functions/mv.h ../functions/node.h ../functions/priv.h
|
||||
mounts.o: ../functions/reload.h ../functions/rm.h ../functions/run.h
|
||||
mounts.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
mounts.o: ../functions/subject.h ../functions/template.h
|
||||
mounts.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
|
||||
mounts.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
mounts.o: ../core/htmlfilter.h ../templates/templates.h
|
||||
@@ -175,12 +177,11 @@ mounts.o: ../templates/patterncacher.h ../templates/ckeditorgetparser.h
|
||||
mounts.o: ../core/httpsimpleparser.h ../core/log.h
|
||||
mounts.o: ../templates/indexpatterns.h ../core/sessionmanager.h
|
||||
plugin.o: plugin.h pluginmsg.h log.h textstream.h plugindata.h config.h
|
||||
plugin.o: confparser.h htmlfilter.h request.h requesttypes.h session.h item.h
|
||||
plugin.o: error.h user.h rebus.h ../templates/htmltextstream.h
|
||||
plugin.o: ../core/textstream.h misc.h system.h dirs.h dircontainer.h
|
||||
plugin.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
|
||||
plugin.o: ../core/error.h ../db/dbitemquery.h ../core/item.h
|
||||
plugin.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h
|
||||
plugin.o: confparser.h htmlfilter.h request.h requesttypes.h item.h error.h
|
||||
plugin.o: ../templates/htmltextstream.h ../core/textstream.h misc.h system.h
|
||||
plugin.o: dirs.h dircontainer.h ../db/db.h ../db/dbbase.h ../db/dbconn.h
|
||||
plugin.o: ../db/dbtextstream.h ../core/error.h ../db/dbitemquery.h
|
||||
plugin.o: ../core/item.h ../db/dbitemcolumns.h ../core/user.h ../core/group.h
|
||||
plugin.o: ../core/dircontainer.h ../core/ugcontainer.h ../notify/notify.h
|
||||
plugin.o: ../notify/notifypool.h ../templates/locale.h ../core/confparser.h
|
||||
plugin.o: ../templates/misc.h ../templates/localefilter.h
|
||||
@@ -189,21 +190,22 @@ plugin.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
|
||||
plugin.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
|
||||
plugin.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
plugin.o: ../notify/notifythread.h ../core/basethread.h synchro.h
|
||||
plugin.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h
|
||||
plugin.o: ugcontainer.h lastcontainer.h mounts.h mount.h mountparser.h
|
||||
plugin.o: users.h groups.h group.h loadavg.h thumb.h basethread.h
|
||||
plugin.o: sessionmanager.h sessioncontainer.h ../functions/functions.h
|
||||
plugin.o: ../functions/functionbase.h ../core/request.h ../core/system.h
|
||||
plugin.o: ../core/synchro.h ../functions/functionparser.h
|
||||
plugin.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
|
||||
plugin.o: ../functions/privchanger.h ../functions/chown.h
|
||||
plugin.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h
|
||||
plugin.o: ../functions/download.h ../functions/emacs.h ../functions/last.h
|
||||
plugin.o: ../functions/login.h ../functions/logout.h ../functions/ln.h
|
||||
plugin.o: ../functions/ls.h ../functions/mkdir.h ../functions/mv.h
|
||||
plugin.o: ../functions/node.h ../functions/priv.h ../functions/reload.h
|
||||
plugin.o: ../functions/rm.h ../functions/run.h ../functions/specialdefault.h
|
||||
plugin.o: ../functions/stat.h ../functions/subject.h ../functions/template.h
|
||||
plugin.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h user.h
|
||||
plugin.o: ugcontainer.h lastcontainer.h cur.h session.h rebus.h mounts.h
|
||||
plugin.o: mount.h mountparser.h users.h groups.h group.h loadavg.h thumb.h
|
||||
plugin.o: basethread.h sessionmanager.h sessioncontainer.h
|
||||
plugin.o: ../functions/functions.h ../functions/functionbase.h
|
||||
plugin.o: ../core/request.h ../core/system.h ../core/synchro.h
|
||||
plugin.o: ../functions/functionparser.h ../core/cur.h ../functions/adduser.h
|
||||
plugin.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h
|
||||
plugin.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h
|
||||
plugin.o: ../functions/default.h ../functions/download.h ../functions/emacs.h
|
||||
plugin.o: ../functions/last.h ../functions/login.h ../functions/logout.h
|
||||
plugin.o: ../functions/ln.h ../functions/ls.h ../functions/mkdir.h
|
||||
plugin.o: ../functions/mv.h ../functions/node.h ../functions/priv.h
|
||||
plugin.o: ../functions/reload.h ../functions/rm.h ../functions/run.h
|
||||
plugin.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
plugin.o: ../functions/subject.h ../functions/template.h
|
||||
plugin.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
|
||||
plugin.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
plugin.o: ../core/htmlfilter.h ../templates/templates.h
|
||||
@@ -211,15 +213,14 @@ plugin.o: ../templates/patterncacher.h ../templates/ckeditorgetparser.h
|
||||
plugin.o: ../core/httpsimpleparser.h ../core/log.h
|
||||
plugin.o: ../templates/indexpatterns.h ../core/sessionmanager.h
|
||||
plugindata.o: plugindata.h plugin.h pluginmsg.h log.h textstream.h config.h
|
||||
plugindata.o: confparser.h htmlfilter.h request.h requesttypes.h session.h
|
||||
plugindata.o: item.h error.h user.h rebus.h ../templates/htmltextstream.h
|
||||
plugindata.o: ../core/textstream.h misc.h system.h dirs.h dircontainer.h
|
||||
plugindata.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
|
||||
plugindata.o: ../core/error.h ../db/dbitemquery.h ../core/item.h
|
||||
plugindata.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h
|
||||
plugindata.o: ../core/dircontainer.h ../core/ugcontainer.h ../notify/notify.h
|
||||
plugindata.o: ../notify/notifypool.h ../templates/locale.h
|
||||
plugindata.o: ../core/confparser.h ../templates/misc.h
|
||||
plugindata.o: confparser.h htmlfilter.h request.h requesttypes.h item.h
|
||||
plugindata.o: error.h ../templates/htmltextstream.h ../core/textstream.h
|
||||
plugindata.o: misc.h system.h dirs.h dircontainer.h ../db/db.h ../db/dbbase.h
|
||||
plugindata.o: ../db/dbconn.h ../db/dbtextstream.h ../core/error.h
|
||||
plugindata.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h
|
||||
plugindata.o: ../core/user.h ../core/group.h ../core/dircontainer.h
|
||||
plugindata.o: ../core/ugcontainer.h ../notify/notify.h ../notify/notifypool.h
|
||||
plugindata.o: ../templates/locale.h ../core/confparser.h ../templates/misc.h
|
||||
plugindata.o: ../templates/localefilter.h ../templates/locale.h
|
||||
plugindata.o: ../../ezc/src/ezc.h ../../ezc/src/utf8.h
|
||||
plugindata.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
|
||||
@@ -227,11 +228,12 @@ plugindata.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
|
||||
plugindata.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
plugindata.o: ../notify/notifythread.h ../core/basethread.h synchro.h
|
||||
plugindata.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h
|
||||
plugindata.o: ugcontainer.h lastcontainer.h mounts.h mount.h mountparser.h
|
||||
plugindata.o: users.h groups.h group.h loadavg.h thumb.h basethread.h
|
||||
plugindata.o: sessionmanager.h sessioncontainer.h ../functions/functions.h
|
||||
plugindata.o: user.h ugcontainer.h lastcontainer.h cur.h session.h rebus.h
|
||||
plugindata.o: mounts.h mount.h mountparser.h users.h groups.h group.h
|
||||
plugindata.o: loadavg.h thumb.h basethread.h sessionmanager.h
|
||||
plugindata.o: sessioncontainer.h ../functions/functions.h
|
||||
plugindata.o: ../functions/functionbase.h ../core/request.h ../core/system.h
|
||||
plugindata.o: ../core/synchro.h ../functions/functionparser.h
|
||||
plugindata.o: ../core/synchro.h ../functions/functionparser.h ../core/cur.h
|
||||
plugindata.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
|
||||
plugindata.o: ../functions/privchanger.h ../functions/chown.h
|
||||
plugindata.o: ../functions/ckeditor.h ../functions/cp.h
|
||||
@@ -252,38 +254,40 @@ plugindata.o: ../templates/indexpatterns.h ../core/sessionmanager.h
|
||||
postmultiparser.o: postmultiparser.h error.h requesttypes.h config.h
|
||||
postmultiparser.o: confparser.h htmlfilter.h log.h textstream.h
|
||||
postmultiparser.o: ../../ezc/src/utf8.h misc.h item.h
|
||||
rebus.o: log.h textstream.h rebus.h misc.h item.h request.h requesttypes.h
|
||||
rebus.o: session.h error.h user.h plugindata.h config.h confparser.h
|
||||
rebus.o: htmlfilter.h ../templates/htmltextstream.h ../core/textstream.h
|
||||
request.o: request.h requesttypes.h session.h item.h error.h user.h
|
||||
request.o: plugindata.h rebus.h config.h confparser.h htmlfilter.h
|
||||
request.o: textstream.h ../templates/htmltextstream.h ../core/textstream.h
|
||||
request.o: misc.h log.h plugin.h pluginmsg.h system.h dirs.h dircontainer.h
|
||||
request.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
|
||||
request.o: ../core/error.h ../db/dbitemquery.h ../core/item.h
|
||||
request.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h
|
||||
request.o: ../core/dircontainer.h ../core/ugcontainer.h ../notify/notify.h
|
||||
request.o: ../notify/notifypool.h ../templates/locale.h ../core/confparser.h
|
||||
request.o: ../templates/misc.h ../templates/localefilter.h
|
||||
request.o: ../templates/locale.h ../../ezc/src/ezc.h ../../ezc/src/utf8.h
|
||||
request.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
|
||||
request.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
|
||||
request.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
request.o: ../notify/notifythread.h ../core/basethread.h synchro.h
|
||||
request.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h
|
||||
request.o: ugcontainer.h lastcontainer.h mounts.h mount.h mountparser.h
|
||||
request.o: users.h groups.h group.h loadavg.h thumb.h basethread.h
|
||||
request.o: sessionmanager.h sessioncontainer.h ../functions/functions.h
|
||||
request.o: ../functions/functionbase.h ../core/request.h ../core/system.h
|
||||
request.o: ../core/synchro.h ../functions/functionparser.h
|
||||
request.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
|
||||
request.o: ../functions/privchanger.h ../functions/chown.h
|
||||
request.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h
|
||||
request.o: ../functions/download.h ../functions/emacs.h ../functions/last.h
|
||||
request.o: ../functions/login.h ../functions/logout.h ../functions/ln.h
|
||||
request.o: ../functions/ls.h ../functions/mkdir.h ../functions/mv.h
|
||||
request.o: ../functions/node.h ../functions/priv.h ../functions/reload.h
|
||||
request.o: ../functions/rm.h ../functions/run.h ../functions/specialdefault.h
|
||||
rebus.o: log.h textstream.h rebus.h misc.h item.h cur.h request.h
|
||||
rebus.o: requesttypes.h error.h config.h confparser.h htmlfilter.h
|
||||
rebus.o: ../templates/htmltextstream.h ../core/textstream.h session.h user.h
|
||||
rebus.o: plugindata.h
|
||||
request.o: request.h requesttypes.h item.h error.h config.h confparser.h
|
||||
request.o: htmlfilter.h textstream.h ../templates/htmltextstream.h
|
||||
request.o: ../core/textstream.h misc.h log.h plugin.h pluginmsg.h
|
||||
request.o: plugindata.h system.h dirs.h dircontainer.h ../db/db.h
|
||||
request.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h ../core/error.h
|
||||
request.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h
|
||||
request.o: ../core/user.h ../core/group.h ../core/dircontainer.h
|
||||
request.o: ../core/ugcontainer.h ../notify/notify.h ../notify/notifypool.h
|
||||
request.o: ../templates/locale.h ../core/confparser.h ../templates/misc.h
|
||||
request.o: ../templates/localefilter.h ../templates/locale.h
|
||||
request.o: ../../ezc/src/ezc.h ../../ezc/src/utf8.h ../../ezc/src/generator.h
|
||||
request.o: ../../ezc/src/pattern.h ../../ezc/src/functions.h
|
||||
request.o: ../../ezc/src/funinfo.h ../../ezc/src/stringconv.h
|
||||
request.o: ../templates/htmltextstream.h ../notify/notifythread.h
|
||||
request.o: ../core/basethread.h synchro.h ../notify/templatesnotify.h
|
||||
request.o: ../core/config.h ../core/users.h user.h ugcontainer.h
|
||||
request.o: lastcontainer.h cur.h session.h rebus.h mounts.h mount.h
|
||||
request.o: mountparser.h users.h groups.h group.h loadavg.h thumb.h
|
||||
request.o: basethread.h sessionmanager.h sessioncontainer.h
|
||||
request.o: ../functions/functions.h ../functions/functionbase.h
|
||||
request.o: ../core/request.h ../core/system.h ../core/synchro.h
|
||||
request.o: ../functions/functionparser.h ../core/cur.h ../functions/adduser.h
|
||||
request.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h
|
||||
request.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h
|
||||
request.o: ../functions/default.h ../functions/download.h
|
||||
request.o: ../functions/emacs.h ../functions/last.h ../functions/login.h
|
||||
request.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
request.o: ../functions/mkdir.h ../functions/mv.h ../functions/node.h
|
||||
request.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h
|
||||
request.o: ../functions/run.h ../functions/specialdefault.h
|
||||
request.o: ../functions/stat.h ../functions/subject.h ../functions/template.h
|
||||
request.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
|
||||
request.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
@@ -293,15 +297,15 @@ request.o: ../core/httpsimpleparser.h ../core/log.h
|
||||
request.o: ../templates/indexpatterns.h ../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 request.h
|
||||
sessioncontainer.o: requesttypes.h config.h confparser.h htmlfilter.h
|
||||
sessioncontainer.o: textstream.h ../templates/htmltextstream.h
|
||||
sessioncontainer.o: ../core/textstream.h misc.h basethread.h log.h
|
||||
sessioncontainer.o: plugindata.h rebus.h cur.h request.h requesttypes.h
|
||||
sessioncontainer.o: config.h confparser.h htmlfilter.h textstream.h
|
||||
sessioncontainer.o: ../templates/htmltextstream.h ../core/textstream.h misc.h
|
||||
sessioncontainer.o: log.h
|
||||
sessionmanager.o: sessionmanager.h sessioncontainer.h session.h item.h
|
||||
sessionmanager.o: error.h user.h plugindata.h rebus.h lastcontainer.h
|
||||
sessionmanager.o: request.h requesttypes.h config.h confparser.h htmlfilter.h
|
||||
sessionmanager.o: error.h user.h plugindata.h rebus.h cur.h request.h
|
||||
sessionmanager.o: requesttypes.h config.h confparser.h htmlfilter.h
|
||||
sessionmanager.o: textstream.h ../templates/htmltextstream.h
|
||||
sessionmanager.o: ../core/textstream.h misc.h basethread.h system.h dirs.h
|
||||
sessionmanager.o: ../core/textstream.h misc.h lastcontainer.h system.h dirs.h
|
||||
sessionmanager.o: dircontainer.h ../db/db.h ../db/dbbase.h ../db/dbconn.h
|
||||
sessionmanager.o: ../db/dbtextstream.h ../core/error.h log.h
|
||||
sessionmanager.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h
|
||||
@@ -318,57 +322,58 @@ sessionmanager.o: ../notify/notifythread.h ../core/basethread.h synchro.h
|
||||
sessionmanager.o: ../notify/templatesnotify.h ../core/config.h
|
||||
sessionmanager.o: ../core/users.h ugcontainer.h mounts.h mount.h
|
||||
sessionmanager.o: mountparser.h users.h groups.h group.h loadavg.h thumb.h
|
||||
sessionmanager.o: sessionparser.h plugin.h pluginmsg.h
|
||||
sessionmanager.o: basethread.h sessionparser.h plugin.h pluginmsg.h
|
||||
sessionmanager.o: ../functions/functions.h ../functions/functionbase.h
|
||||
sessionmanager.o: ../core/request.h ../core/system.h ../core/synchro.h
|
||||
sessionmanager.o: ../functions/functionparser.h ../functions/adduser.h
|
||||
sessionmanager.o: ../functions/cat.h ../functions/chmod.h
|
||||
sessionmanager.o: ../functions/privchanger.h ../functions/chown.h
|
||||
sessionmanager.o: ../functions/ckeditor.h ../functions/cp.h
|
||||
sessionmanager.o: ../functions/default.h ../functions/download.h
|
||||
sessionmanager.o: ../functions/emacs.h ../functions/last.h
|
||||
sessionmanager.o: ../functions/login.h ../functions/logout.h
|
||||
sessionmanager.o: ../functions/ln.h ../functions/ls.h ../functions/mkdir.h
|
||||
sessionmanager.o: ../functions/mv.h ../functions/node.h ../functions/priv.h
|
||||
sessionmanager.o: ../functions/reload.h ../functions/rm.h ../functions/run.h
|
||||
sessionmanager.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
sessionmanager.o: ../functions/subject.h ../functions/template.h
|
||||
sessionmanager.o: ../functions/tinymce.h ../functions/uname.h
|
||||
sessionmanager.o: ../functions/upload.h ../functions/uptime.h
|
||||
sessionmanager.o: ../functions/who.h ../functions/vim.h ../core/htmlfilter.h
|
||||
sessionmanager.o: ../templates/templates.h ../templates/patterncacher.h
|
||||
sessionmanager.o: ../functions/functionparser.h ../core/cur.h
|
||||
sessionmanager.o: ../functions/adduser.h ../functions/cat.h
|
||||
sessionmanager.o: ../functions/chmod.h ../functions/privchanger.h
|
||||
sessionmanager.o: ../functions/chown.h ../functions/ckeditor.h
|
||||
sessionmanager.o: ../functions/cp.h ../functions/default.h
|
||||
sessionmanager.o: ../functions/download.h ../functions/emacs.h
|
||||
sessionmanager.o: ../functions/last.h ../functions/login.h
|
||||
sessionmanager.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
sessionmanager.o: ../functions/mkdir.h ../functions/mv.h ../functions/node.h
|
||||
sessionmanager.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h
|
||||
sessionmanager.o: ../functions/run.h ../functions/specialdefault.h
|
||||
sessionmanager.o: ../functions/stat.h ../functions/subject.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 ../functions/vim.h
|
||||
sessionmanager.o: ../core/htmlfilter.h ../templates/templates.h
|
||||
sessionmanager.o: ../templates/patterncacher.h
|
||||
sessionmanager.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
|
||||
sessionmanager.o: ../core/log.h ../templates/indexpatterns.h
|
||||
sessionmanager.o: ../core/sessionmanager.h
|
||||
sessionparser.o: sessionparser.h session.h item.h error.h user.h plugindata.h
|
||||
sessionparser.o: rebus.h sessioncontainer.h lastcontainer.h request.h
|
||||
sessionparser.o: requesttypes.h config.h confparser.h htmlfilter.h
|
||||
sessionparser.o: textstream.h ../templates/htmltextstream.h
|
||||
sessionparser.o: ../core/textstream.h misc.h basethread.h users.h log.h
|
||||
sessionparser.o: rebus.h sessioncontainer.h cur.h request.h requesttypes.h
|
||||
sessionparser.o: config.h confparser.h htmlfilter.h textstream.h
|
||||
sessionparser.o: ../templates/htmltextstream.h ../core/textstream.h misc.h
|
||||
sessionparser.o: users.h log.h
|
||||
synchro.o: synchro.h
|
||||
system.o: system.h dirs.h item.h dircontainer.h ../db/db.h ../db/dbbase.h
|
||||
system.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h misc.h
|
||||
system.o: ../core/error.h log.h textstream.h ../db/dbitemquery.h
|
||||
system.o: ../core/item.h ../db/dbitemcolumns.h ../core/user.h ../core/group.h
|
||||
system.o: ../core/dircontainer.h ../core/ugcontainer.h request.h
|
||||
system.o: requesttypes.h session.h error.h user.h plugindata.h rebus.h
|
||||
system.o: config.h confparser.h htmlfilter.h ../templates/htmltextstream.h
|
||||
system.o: ../notify/notify.h ../notify/notifypool.h ../templates/locale.h
|
||||
system.o: ../core/confparser.h ../templates/misc.h
|
||||
system.o: ../templates/localefilter.h ../templates/locale.h
|
||||
system.o: ../../ezc/src/ezc.h ../../ezc/src/utf8.h ../../ezc/src/generator.h
|
||||
system.o: ../../ezc/src/pattern.h ../../ezc/src/functions.h
|
||||
system.o: ../../ezc/src/funinfo.h ../../ezc/src/stringconv.h
|
||||
system.o: ../templates/htmltextstream.h ../notify/notifythread.h
|
||||
system.o: ../core/basethread.h synchro.h ../notify/templatesnotify.h
|
||||
system.o: ../core/config.h ../core/users.h ugcontainer.h lastcontainer.h
|
||||
system.o: requesttypes.h error.h config.h confparser.h htmlfilter.h
|
||||
system.o: ../templates/htmltextstream.h ../notify/notify.h
|
||||
system.o: ../notify/notifypool.h ../templates/locale.h ../core/confparser.h
|
||||
system.o: ../templates/misc.h ../templates/localefilter.h
|
||||
system.o: ../templates/locale.h ../../ezc/src/ezc.h ../../ezc/src/utf8.h
|
||||
system.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
|
||||
system.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
|
||||
system.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
system.o: ../notify/notifythread.h ../core/basethread.h synchro.h
|
||||
system.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h user.h
|
||||
system.o: ugcontainer.h lastcontainer.h cur.h session.h plugindata.h rebus.h
|
||||
system.o: mounts.h mount.h mountparser.h users.h groups.h group.h loadavg.h
|
||||
system.o: thumb.h basethread.h ../templates/templates.h
|
||||
system.o: ../templates/patterncacher.h ../templates/ckeditorgetparser.h
|
||||
system.o: ../core/httpsimpleparser.h ../core/log.h
|
||||
system.o: ../templates/indexpatterns.h ../core/request.h ../core/system.h
|
||||
system.o: ../templates/indexpatterns.h ../core/cur.h ../core/system.h
|
||||
system.o: ../core/sessionmanager.h ../functions/functionbase.h
|
||||
system.o: ../core/synchro.h
|
||||
system.o: ../core/request.h ../core/synchro.h
|
||||
textstream.o: textstream.h misc.h item.h
|
||||
thumb.o: thumb.h basethread.h textstream.h ../db/db.h ../db/dbbase.h
|
||||
thumb.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h misc.h
|
||||
@@ -376,15 +381,16 @@ thumb.o: item.h ../core/error.h log.h ../db/dbitemquery.h ../core/item.h
|
||||
thumb.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h
|
||||
thumb.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/config.h
|
||||
thumb.o: ../../ezc/src/utf8.h system.h dirs.h dircontainer.h request.h
|
||||
thumb.o: requesttypes.h session.h error.h user.h plugindata.h rebus.h
|
||||
thumb.o: config.h confparser.h htmlfilter.h ../templates/htmltextstream.h
|
||||
thumb.o: ../notify/notify.h ../notify/notifypool.h ../templates/locale.h
|
||||
thumb.o: ../core/confparser.h ../templates/misc.h ../templates/localefilter.h
|
||||
thumb.o: requesttypes.h error.h config.h confparser.h htmlfilter.h
|
||||
thumb.o: ../templates/htmltextstream.h ../notify/notify.h
|
||||
thumb.o: ../notify/notifypool.h ../templates/locale.h ../core/confparser.h
|
||||
thumb.o: ../templates/misc.h ../templates/localefilter.h
|
||||
thumb.o: ../templates/locale.h ../../ezc/src/ezc.h ../../ezc/src/generator.h
|
||||
thumb.o: ../../ezc/src/pattern.h ../../ezc/src/functions.h
|
||||
thumb.o: ../../ezc/src/funinfo.h ../../ezc/src/stringconv.h
|
||||
thumb.o: ../templates/htmltextstream.h ../notify/notifythread.h
|
||||
thumb.o: ../core/basethread.h synchro.h ../notify/templatesnotify.h
|
||||
thumb.o: ../core/users.h ugcontainer.h lastcontainer.h mounts.h mount.h
|
||||
thumb.o: mountparser.h users.h groups.h group.h loadavg.h
|
||||
thumb.o: ../core/users.h user.h ugcontainer.h lastcontainer.h cur.h session.h
|
||||
thumb.o: plugindata.h rebus.h mounts.h mount.h mountparser.h users.h groups.h
|
||||
thumb.o: group.h loadavg.h
|
||||
users.o: users.h
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoreacceptbaseparser
|
||||
#define headerfilecmslucoreacceptbaseparser
|
||||
#ifndef headerfile_winix_core_acceptbaseparser
|
||||
#define headerfile_winix_core_acceptbaseparser
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoreacceptencodingparser
|
||||
#define headerfilecmslucoreacceptencodingparser
|
||||
#ifndef headerfile_winix_core_acceptencodingparser
|
||||
#define headerfile_winix_core_acceptencodingparser
|
||||
|
||||
#include "acceptbaseparser.h"
|
||||
#include "log.h"
|
||||
|
||||
232
core/app.cpp
232
core/app.cpp
@@ -31,33 +31,37 @@ App::App()
|
||||
last_sessions_save = std::time(0);
|
||||
fcgi_socket = -1;
|
||||
|
||||
// temporary there is only one request
|
||||
cur.request = &req;
|
||||
cur.session = session_manager.GetTmpSession();
|
||||
|
||||
db.SetConn(db_conn);
|
||||
|
||||
plugin.SetDb(&db);
|
||||
plugin.SetConfig(&config);
|
||||
plugin.SetRequest(&request);
|
||||
plugin.SetCur(&cur);
|
||||
plugin.SetSystem(&system);
|
||||
plugin.SetFunctions(&functions);
|
||||
plugin.SetTemplates(&templates);
|
||||
plugin.SetSynchro(&synchro);
|
||||
plugin.SetSessionManager(&session_manager);
|
||||
|
||||
request.SetConfig(&config);
|
||||
req.SetConfig(&config);
|
||||
|
||||
functions.SetConfig(&config);
|
||||
functions.SetRequest(&request);
|
||||
functions.SetCur(&cur);
|
||||
functions.SetDb(&db);
|
||||
functions.SetSystem(&system);
|
||||
functions.SetTemplates(&templates);
|
||||
functions.SetSynchro(&synchro);
|
||||
|
||||
system.SetConfig(&config);
|
||||
system.SetRequest(&request);
|
||||
system.SetCur(&cur);
|
||||
system.SetDb(&db);
|
||||
system.SetSynchro(&synchro);
|
||||
|
||||
templates.SetConfig(&config);
|
||||
templates.SetRequest(&request);
|
||||
templates.SetCur(&cur);
|
||||
templates.SetDb(&db);
|
||||
templates.SetSystem(&system);
|
||||
templates.SetFunctions(&functions);
|
||||
@@ -65,7 +69,7 @@ App::App()
|
||||
|
||||
session_manager.SetLastContainer(&system.users.last);
|
||||
session_manager.SetConfig(&config);
|
||||
session_manager.SetRequest(&request);
|
||||
session_manager.SetCur(&cur);
|
||||
session_manager.SetSystem(&system);
|
||||
session_manager.SetSynchro(&synchro);
|
||||
|
||||
@@ -131,7 +135,7 @@ bool App::Init()
|
||||
db_conn.WaitForConnection();
|
||||
db.LogQueries(config.log_db_query);
|
||||
|
||||
request.Clear();
|
||||
cur.request->Clear();
|
||||
compress.Init();
|
||||
system.Init();
|
||||
functions.Init();
|
||||
@@ -143,6 +147,7 @@ bool App::Init()
|
||||
|
||||
// init notify after templates (it uses locales from templates)
|
||||
system.notify.ReadTemplates();
|
||||
session_manager.InitTmpSession();
|
||||
session_manager.LoadSessions();
|
||||
|
||||
CreateStaticTree();
|
||||
@@ -158,7 +163,8 @@ void App::Close()
|
||||
{
|
||||
session_manager.SaveSessions();
|
||||
session_manager.DeleteSessions();
|
||||
request.Clear();
|
||||
cur.request->Clear();
|
||||
session_manager.UninitTmpSession();
|
||||
}
|
||||
|
||||
|
||||
@@ -168,13 +174,13 @@ bool App::BaseUrlRedirect()
|
||||
if( config.base_url_http_host.empty() )
|
||||
return false;
|
||||
|
||||
if( Equal(config.base_url_http_host.c_str(), request.env_http_host) )
|
||||
if( Equal(config.base_url_http_host.c_str(), cur.request->env_http_host) )
|
||||
return false;
|
||||
|
||||
request.redirect_to = config.base_url;
|
||||
AssignString(request.env_request_uri, request.redirect_to, false);
|
||||
cur.request->redirect_to = config.base_url;
|
||||
AssignString(cur.request->env_request_uri, cur.request->redirect_to, false);
|
||||
|
||||
log << log3 << "RC: BaseUrlRedirect from: " << request.env_http_host << logend;
|
||||
log << log3 << "RC: BaseUrlRedirect from: " << cur.request->env_http_host << logend;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -184,19 +190,23 @@ void App::ProcessRequestThrow()
|
||||
{
|
||||
ReadRequest();
|
||||
|
||||
// when BaseUrlRedirect() return true we didn't have to set everything in request.Read()
|
||||
// in the future request.Read() can be split and at the beginning only environment variables will be read
|
||||
// when BaseUrlRedirect() return true we didn't have to set everything in cur.request->Read()
|
||||
// in the future cur.request->Read() can be split and at the beginning only environment variables will be read
|
||||
// and then BaseUrlRedirect() will be called (for performance)
|
||||
if( !BaseUrlRedirect() )
|
||||
{
|
||||
session_manager.SetSession(); // set request.session as well
|
||||
// !! dac zeby zwracalo wskaznik (zawsze prawidlowy) na sesje
|
||||
// i tutaj przypisanie do request.session
|
||||
session_manager.SetSession();
|
||||
cur.session = session_manager.GetCurSession();
|
||||
|
||||
// !! tutaj dodac to ustawianie request.session
|
||||
if( cur.session->new_session )
|
||||
{
|
||||
cur.session->plugin_data.Resize(plugin.Size());
|
||||
plugin.Call(WINIX_SESSION_CREATED);
|
||||
}
|
||||
|
||||
plugin.Call(WINIX_SESSION_CHANGED);
|
||||
|
||||
functions.Parse();
|
||||
|
||||
system.mounts.CalcCurMount();
|
||||
|
||||
Make();
|
||||
@@ -216,7 +226,6 @@ void App::ProcessRequest()
|
||||
ProcessRequestThrow();
|
||||
SaveSessionsIfNeeded(); // !! przerzucic to na watek sesji
|
||||
|
||||
request.Clear();
|
||||
system.load_avg.StopRequest();
|
||||
log << logendrequest;
|
||||
}
|
||||
@@ -232,6 +241,9 @@ void App::ProcessRequest()
|
||||
{
|
||||
log << log1 << "App: there was an unknown exception" << logend;
|
||||
}
|
||||
|
||||
cur.request->Clear();
|
||||
cur.session = session_manager.GetTmpSession();
|
||||
}
|
||||
|
||||
|
||||
@@ -270,20 +282,20 @@ void App::MakePage()
|
||||
bool sent = false;
|
||||
|
||||
|
||||
if( !request.redirect_to.empty() || !request.x_sendfile.empty() )
|
||||
if( !cur.request->redirect_to.empty() || !cur.request->x_sendfile.empty() )
|
||||
return;
|
||||
|
||||
|
||||
if( request.is_item && request.item.file_type == WINIX_ITEM_FILETYPE_NONE &&
|
||||
request.item.content_type == Item::ct_raw && request.status == WINIX_ERR_OK && request.function )
|
||||
if( cur.request->is_item && cur.request->item.file_type == WINIX_ITEM_FILETYPE_NONE &&
|
||||
cur.request->item.content_type == Item::ct_raw && cur.request->status == WINIX_ERR_OK && cur.request->function )
|
||||
{
|
||||
if( request.function == &functions.fun_cat )
|
||||
if( cur.request->function == &functions.fun_cat )
|
||||
{
|
||||
request.page << request.item.content;
|
||||
cur.request->page << cur.request->item.content;
|
||||
sent = true;
|
||||
}
|
||||
else
|
||||
if( request.function == &functions.fun_run )
|
||||
if( cur.request->function == &functions.fun_run )
|
||||
{
|
||||
templates.GenerateRunRaw();
|
||||
sent = true;
|
||||
@@ -301,35 +313,35 @@ bool sent = false;
|
||||
// !! ta nazwa chyba juz zajeta...
|
||||
void App::Make()
|
||||
{
|
||||
if( request.dir_tab.empty() )
|
||||
if( cur.request->dir_tab.empty() )
|
||||
{
|
||||
log << log1 << "Content: there is no a root dir (dir_tab is empty)" << logend;
|
||||
return;
|
||||
}
|
||||
|
||||
// request.status can be changed by function_parser
|
||||
if( request.status == WINIX_ERR_OK )
|
||||
// cur.request->status can be changed by function_parser
|
||||
if( cur.request->status == WINIX_ERR_OK )
|
||||
plugin.Call(WINIX_PREPARE_REQUEST);
|
||||
|
||||
if( request.status == WINIX_ERR_OK )
|
||||
if( cur.request->status == WINIX_ERR_OK )
|
||||
functions.CheckFunctionAndSymlink();
|
||||
|
||||
if( request.status == WINIX_ERR_OK )
|
||||
if( cur.request->status == WINIX_ERR_OK )
|
||||
functions.MakeFunction();
|
||||
|
||||
if( request.session->spam_score > 0 )
|
||||
log << log1 << "App: spam score: " << request.session->spam_score << logend;
|
||||
if( cur.session->spam_score > 0 )
|
||||
log << log1 << "App: spam score: " << cur.session->spam_score << logend;
|
||||
|
||||
if( request.IsParam(L"noredirect") )
|
||||
request.redirect_to.clear();
|
||||
if( cur.request->IsParam(L"noredirect") )
|
||||
cur.request->redirect_to.clear();
|
||||
|
||||
if( request.status == WINIX_ERR_OK )
|
||||
if( cur.request->status == WINIX_ERR_OK )
|
||||
plugin.Call(WINIX_PROCESS_REQUEST);
|
||||
|
||||
if( !request.redirect_to.empty() )
|
||||
if( !cur.request->redirect_to.empty() )
|
||||
return;
|
||||
|
||||
if( request.dir_tab.empty() )
|
||||
if( cur.request->dir_tab.empty() )
|
||||
{
|
||||
log << log1 << "App: there is no a root dir (dir_tab is empty -- after calling a function)" << logend;
|
||||
return;
|
||||
@@ -342,8 +354,8 @@ void App::Make()
|
||||
{
|
||||
// !! dodac inne informacje (get, post, itp)
|
||||
// jesli jest debug_info wlaczone to nie robic przekierowan
|
||||
request.PrintGetTab();
|
||||
//request.PrintEnv(); // !! PrintEnv() mozna przeniesc tutaj (do klasy App)
|
||||
cur.request->PrintGetTab();
|
||||
//cur.request->PrintEnv(); // !! PrintEnv() mozna przeniesc tutaj (do klasy App)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -361,13 +373,13 @@ void App::ReadRequest()
|
||||
LogAccess();
|
||||
|
||||
ReadGetPostVars();
|
||||
cookie_parser.Parse(request.env_http_cookie, request.cookie_tab);
|
||||
accept_encoding_parser.Parse(request.env_http_accept_encoding);
|
||||
cookie_parser.Parse(cur.request->env_http_cookie, cur.request->cookie_tab);
|
||||
accept_encoding_parser.Parse(cur.request->env_http_accept_encoding);
|
||||
|
||||
CheckIE();
|
||||
CheckKonqueror();
|
||||
|
||||
if( request.role == Request::authorizer )
|
||||
if( cur.request->role == Request::authorizer )
|
||||
log << log3 << "Request: fast cgi role: authorizer" << logend;
|
||||
}
|
||||
|
||||
@@ -380,7 +392,7 @@ const char * v = FCGX_GetParam(name, fcgi_request.envp);
|
||||
if( v )
|
||||
env = v;
|
||||
|
||||
// by default env is set to an empty string (in request.Clear() method)
|
||||
// by default env is set to an empty string (in cur.request->Clear() method)
|
||||
}
|
||||
|
||||
|
||||
@@ -390,41 +402,41 @@ void App::ReadEnvVariables()
|
||||
// we store that values because FCGX_GetParam has O(n) complexity
|
||||
// with this variables (env_*) we have O(1)
|
||||
|
||||
SetEnv(request.env_request_method, "REQUEST_METHOD"); // !! mozna nie uzywac tego, teraz mamy w strukturze fcgi_request
|
||||
SetEnv(request.env_request_uri, "REQUEST_URI");
|
||||
SetEnv(request.env_http_cookie, "HTTP_COOKIE");
|
||||
SetEnv(request.env_remote_addr, "REMOTE_ADDR");
|
||||
SetEnv(request.env_http_host, "HTTP_HOST");
|
||||
SetEnv(request.env_http_user_agent, "HTTP_USER_AGENT");
|
||||
SetEnv(request.env_fcgi_role, "FCGI_ROLE");
|
||||
SetEnv(request.env_content_type, "CONTENT_TYPE");
|
||||
SetEnv(request.env_http_accept_encoding,"HTTP_ACCEPT_ENCODING");
|
||||
SetEnv(cur.request->env_request_method, "REQUEST_METHOD"); // !! mozna nie uzywac tego, teraz mamy w strukturze fcgi_request
|
||||
SetEnv(cur.request->env_request_uri, "REQUEST_URI");
|
||||
SetEnv(cur.request->env_http_cookie, "HTTP_COOKIE");
|
||||
SetEnv(cur.request->env_remote_addr, "REMOTE_ADDR");
|
||||
SetEnv(cur.request->env_http_host, "HTTP_HOST");
|
||||
SetEnv(cur.request->env_http_user_agent, "HTTP_USER_AGENT");
|
||||
SetEnv(cur.request->env_fcgi_role, "FCGI_ROLE");
|
||||
SetEnv(cur.request->env_content_type, "CONTENT_TYPE");
|
||||
SetEnv(cur.request->env_http_accept_encoding,"HTTP_ACCEPT_ENCODING");
|
||||
}
|
||||
|
||||
|
||||
|
||||
void App::CheckRequestMethod()
|
||||
{
|
||||
request.method = Request::none;
|
||||
cur.request->method = Request::none;
|
||||
|
||||
if( ToSmall(request.env_request_method[0]) == 'g' )
|
||||
request.method = Request::get;
|
||||
if( ToSmall(cur.request->env_request_method[0]) == 'g' )
|
||||
cur.request->method = Request::get;
|
||||
else
|
||||
if( ToSmall(request.env_request_method[0]) == 'p' )
|
||||
request.method = Request::post;
|
||||
if( ToSmall(cur.request->env_request_method[0]) == 'p' )
|
||||
cur.request->method = Request::post;
|
||||
else
|
||||
if( ToSmall(request.env_request_method[0]) == 'h' )
|
||||
request.method = Request::head;
|
||||
if( ToSmall(cur.request->env_request_method[0]) == 'h' )
|
||||
cur.request->method = Request::head;
|
||||
}
|
||||
|
||||
|
||||
void App::CheckFCGIRole()
|
||||
{
|
||||
// default we assume 'responder'
|
||||
request.role = Request::responder;
|
||||
cur.request->role = Request::responder;
|
||||
|
||||
if( ToSmall(request.env_fcgi_role[0]) == 'a' )
|
||||
request.role = Request::authorizer;
|
||||
if( ToSmall(cur.request->env_fcgi_role[0]) == 'a' )
|
||||
cur.request->role = Request::authorizer;
|
||||
}
|
||||
|
||||
|
||||
@@ -433,11 +445,11 @@ void App::LogAccess()
|
||||
{
|
||||
log.PutDate(log1);
|
||||
|
||||
log << request.env_remote_addr << ' '
|
||||
<< request.env_request_method << ' '
|
||||
<< request.env_http_host
|
||||
<< request.env_request_uri << ' '
|
||||
<< request.env_http_user_agent << logend;
|
||||
log << cur.request->env_remote_addr << ' '
|
||||
<< cur.request->env_request_method << ' '
|
||||
<< cur.request->env_http_host
|
||||
<< cur.request->env_request_uri << ' '
|
||||
<< cur.request->env_http_user_agent << logend;
|
||||
}
|
||||
|
||||
|
||||
@@ -447,22 +459,22 @@ void App::ReadGetPostVars()
|
||||
{
|
||||
// get parameters we have always
|
||||
get_parser.UTF8(config.utf8);
|
||||
get_parser.Parse(request.env_request_uri, request.get_tab);
|
||||
get_parser.Parse(cur.request->env_request_uri, cur.request->get_tab);
|
||||
|
||||
if( request.method == Request::post )
|
||||
if( cur.request->method == Request::post )
|
||||
{
|
||||
if( IsSubStringNoCase("multipart/form-data", request.env_content_type) )
|
||||
if( IsSubStringNoCase("multipart/form-data", cur.request->env_content_type) )
|
||||
{
|
||||
log << log3 << "Request: post content type: multipart/form-data" << logend;
|
||||
// !! dodac metode UTF8 do post_multi_parsera
|
||||
// (narazie bierze bezposrednio z konfigu)
|
||||
// w ogole wywalic zaleznosc od konfiga
|
||||
post_multi_parser.Parse(fcgi_request.in, request.post_tab, request.post_file_tab);
|
||||
post_multi_parser.Parse(fcgi_request.in, cur.request->post_tab, cur.request->post_file_tab);
|
||||
}
|
||||
else
|
||||
{
|
||||
post_parser.UTF8(config.utf8);
|
||||
post_parser.Parse(fcgi_request.in, request.post_tab);
|
||||
post_parser.Parse(fcgi_request.in, cur.request->post_tab);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -472,24 +484,24 @@ void App::ReadGetPostVars()
|
||||
|
||||
void App::CheckIE()
|
||||
{
|
||||
char * msie = strstr(request.env_http_user_agent, "MSIE");
|
||||
char * msie = strstr(cur.request->env_http_user_agent, "MSIE");
|
||||
|
||||
if( msie )
|
||||
request.browser_msie = true;
|
||||
cur.request->browser_msie = true;
|
||||
else
|
||||
request.browser_msie = false;
|
||||
cur.request->browser_msie = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void App::CheckKonqueror()
|
||||
{
|
||||
char * kon = strstr(request.env_http_user_agent, "Konqueror");
|
||||
char * kon = strstr(cur.request->env_http_user_agent, "Konqueror");
|
||||
|
||||
if( kon )
|
||||
request.browser_konqueror = true;
|
||||
cur.request->browser_konqueror = true;
|
||||
else
|
||||
request.browser_konqueror = false;
|
||||
cur.request->browser_konqueror = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -499,18 +511,18 @@ void App::CheckKonqueror()
|
||||
|
||||
void App::PrepareSessionCookie()
|
||||
{
|
||||
if( !request.session || request.session->id==0 )
|
||||
if( !cur.session || cur.session->id==0 )
|
||||
return;
|
||||
|
||||
if( !request.session->puser || !request.session->remember_me )
|
||||
if( !cur.session->puser || !cur.session->remember_me )
|
||||
{
|
||||
request.SetCookie(config.http_session_id_name.c_str(), request.session->id);
|
||||
cur.request->SetCookie(config.http_session_id_name.c_str(), cur.session->id);
|
||||
}
|
||||
else
|
||||
{
|
||||
time_t t = std::time(0) + config.session_remember_max_idle;
|
||||
tm expires = Time(t);
|
||||
request.SetCookie(config.http_session_id_name.c_str(), request.session->id, &expires);
|
||||
cur.request->SetCookie(config.http_session_id_name.c_str(), cur.session->id, &expires);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -521,27 +533,27 @@ void App::SendHeaders(bool compressing, Header header)
|
||||
{
|
||||
PrepareSessionCookie();
|
||||
|
||||
if( request.send_as_attachment )
|
||||
if( cur.request->send_as_attachment )
|
||||
FCGX_PutS("Content-Disposition: attachment\r\n", fcgi_request.out);
|
||||
|
||||
if( !request.redirect_to.empty() )
|
||||
if( !cur.request->redirect_to.empty() )
|
||||
{
|
||||
FCGX_PutS("Status: 301 Moved Permanently\r\n", fcgi_request.out);
|
||||
UrlEncode(request.redirect_to, request.aredirect_to);
|
||||
FCGX_FPrintF(fcgi_request.out, "Location: %s\r\n", request.aredirect_to.c_str());
|
||||
log << log2 << "Redirect to: " << request.aredirect_to << logend;
|
||||
UrlEncode(cur.request->redirect_to, cur.request->aredirect_to);
|
||||
FCGX_FPrintF(fcgi_request.out, "Location: %s\r\n", cur.request->aredirect_to.c_str());
|
||||
log << log2 << "Redirect to: " << cur.request->aredirect_to << logend;
|
||||
}
|
||||
else
|
||||
if( !request.x_sendfile.empty() )
|
||||
if( !cur.request->x_sendfile.empty() )
|
||||
{
|
||||
static std::string temp, temp2; // !! wrzucic gdzies to
|
||||
|
||||
Ezc::WideToUTF8(config.http_header_send_file, temp);
|
||||
Ezc::WideToUTF8(request.x_sendfile, temp2);
|
||||
Ezc::WideToUTF8(cur.request->x_sendfile, temp2);
|
||||
FCGX_FPrintF(fcgi_request.out, "%s: %s\r\n", temp.c_str(), temp2.c_str());
|
||||
|
||||
FCGX_PutS("Status: 200 OK\r\n", fcgi_request.out);
|
||||
log << log2 << "Sending file: " << request.x_sendfile << logend;
|
||||
log << log2 << "Sending file: " << cur.request->x_sendfile << logend;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -562,7 +574,7 @@ void App::SendHeaders(bool compressing, Header header)
|
||||
default:
|
||||
FCGX_PutS("Status: 200 OK\r\n", fcgi_request.out);
|
||||
|
||||
if( request.role != Request::authorizer )
|
||||
if( cur.request->role != Request::authorizer )
|
||||
FCGX_PutS("Content-Type: text/html\r\n", fcgi_request.out);
|
||||
}
|
||||
}
|
||||
@@ -570,7 +582,7 @@ void App::SendHeaders(bool compressing, Header header)
|
||||
if( compressing )
|
||||
FCGX_PutS("Content-Encoding: deflate\r\n", fcgi_request.out);
|
||||
|
||||
FCGX_PutS(request.headers.CStr(), fcgi_request.out);
|
||||
FCGX_PutS(cur.request->headers.CStr(), fcgi_request.out);
|
||||
FCGX_PutS("\r\n", fcgi_request.out);
|
||||
}
|
||||
|
||||
@@ -593,8 +605,8 @@ void App::FilterCompressSend(bool compressing, const std::wstring & source_ref)
|
||||
{
|
||||
const std::wstring * source = &source_ref;
|
||||
|
||||
bool raw = request.is_item && request.item.content_type == Item::ct_raw && request.status == WINIX_ERR_OK &&
|
||||
request.function && (request.function == &functions.fun_cat || request.function == &functions.fun_run);
|
||||
bool raw = cur.request->is_item && cur.request->item.content_type == Item::ct_raw && cur.request->status == WINIX_ERR_OK &&
|
||||
cur.request->function && (cur.request->function == &functions.fun_cat || cur.request->function == &functions.fun_run);
|
||||
|
||||
if( config.html_filter && !raw )
|
||||
{
|
||||
@@ -626,11 +638,11 @@ void App::FilterCompressSend(bool compressing, const std::wstring & source_ref)
|
||||
bool App::IsCompressionAllowed(const std::wstring & source)
|
||||
{
|
||||
return( config.compression &&
|
||||
request.role == Request::responder &&
|
||||
request.redirect_to.empty() &&
|
||||
request.x_sendfile.empty() &&
|
||||
!request.browser_msie &&
|
||||
!request.browser_konqueror &&
|
||||
cur.request->role == Request::responder &&
|
||||
cur.request->redirect_to.empty() &&
|
||||
cur.request->x_sendfile.empty() &&
|
||||
!cur.request->browser_msie &&
|
||||
!cur.request->browser_konqueror &&
|
||||
accept_encoding_parser.AcceptDeflate() &&
|
||||
source.size() >= (size_t)config.compression_page_min_size );
|
||||
}
|
||||
@@ -638,11 +650,11 @@ bool App::IsCompressionAllowed(const std::wstring & source)
|
||||
|
||||
bool App::CanSendContent(Header header)
|
||||
{
|
||||
if( !request.redirect_to.empty() || !request.x_sendfile.empty() )
|
||||
if( !cur.request->redirect_to.empty() || !cur.request->x_sendfile.empty() )
|
||||
// if there is a redirect or a file to send then we do not send a content
|
||||
return false;
|
||||
|
||||
if( header == h_200 && request.role == Request::authorizer && request.is_item && request.item.file_type != WINIX_ITEM_FILETYPE_NONE )
|
||||
if( header == h_200 && cur.request->role == Request::authorizer && cur.request->is_item && cur.request->item.file_type != WINIX_ITEM_FILETYPE_NONE )
|
||||
// if there is an item and the item has 'file' storage we do not send a content
|
||||
return false;
|
||||
|
||||
@@ -650,7 +662,7 @@ bool App::CanSendContent(Header header)
|
||||
we don't have to check the HEAD method
|
||||
the server (lighttpd) doesn't send the body of its own
|
||||
*/
|
||||
if( request.method == Request::head )
|
||||
if( cur.request->method == Request::head )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -661,10 +673,10 @@ void App::AddDebugInfo(std::wstring & out)
|
||||
{
|
||||
if( config.debug_info )
|
||||
{
|
||||
if( !request.debug.Empty() )
|
||||
if( !cur.request->debug.Empty() )
|
||||
{
|
||||
out += L"\n<!--\n";
|
||||
out += request.debug.Str();
|
||||
out += cur.request->debug.Str();
|
||||
out += L"\n-->\n";
|
||||
}
|
||||
}
|
||||
@@ -674,10 +686,10 @@ void App::AddDebugInfo(std::wstring & out)
|
||||
|
||||
void App::SendAnswer()
|
||||
{
|
||||
const std::wstring & source = request.page.Str();
|
||||
const std::wstring & source = cur.request->page.Str();
|
||||
Header header = h_200;
|
||||
bool compressing = IsCompressionAllowed(source);
|
||||
Error status = request.status;
|
||||
Error status = cur.request->status;
|
||||
|
||||
if( status == WINIX_ERR_NO_ITEM || status == WINIX_ERR_NO_FUNCTION || status == WINIX_ERR_UNKNOWN_PARAM )
|
||||
header = h_404;
|
||||
@@ -964,7 +976,7 @@ void App::WaitForThreads()
|
||||
//pthread_join(signal_thread, 0);
|
||||
|
||||
system.notify.WaitForThread();
|
||||
session_manager.WaitForGC();
|
||||
session_manager.WaitForThread();
|
||||
system.thumb.WaitForThread();
|
||||
}
|
||||
|
||||
@@ -1000,7 +1012,7 @@ sigset_t set;
|
||||
FCGX_ShutdownPending();
|
||||
Ezc::WideToUTF8(app->config.base_url, app->url_to_fetch_on_exit);
|
||||
app->system.notify.PrepareToStopThread();
|
||||
app->session_manager.PrepareToStopGC();
|
||||
app->session_manager.WakeUpThread();
|
||||
app->system.thumb.WakeUpThread();
|
||||
app->Unlock();
|
||||
|
||||
@@ -1033,7 +1045,7 @@ sigset_t set;
|
||||
system.notify.StartThread();
|
||||
|
||||
// gc for sessions
|
||||
session_manager.StartGC();
|
||||
session_manager.StartThread();
|
||||
|
||||
// thumbnails
|
||||
system.thumb.StartThread();
|
||||
|
||||
11
core/app.h
11
core/app.h
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoreapp
|
||||
#define headerfilecmslucoreapp
|
||||
#ifndef headerfile_winix_core_app
|
||||
#define headerfile_winix_core_app
|
||||
|
||||
#include <iostream>
|
||||
#include <ctime>
|
||||
@@ -63,8 +63,12 @@ public:
|
||||
// configuration read from a config file
|
||||
Config config;
|
||||
|
||||
// pointers to the current request and a session
|
||||
Cur cur;
|
||||
|
||||
// temporary one request object
|
||||
// current request
|
||||
Request request;
|
||||
Request req;
|
||||
|
||||
// users sessions
|
||||
SessionManager session_manager;
|
||||
@@ -127,6 +131,7 @@ private:
|
||||
Synchro synchro;
|
||||
pthread_t signal_thread;
|
||||
std::string url_to_fetch_on_exit;
|
||||
|
||||
|
||||
void ProcessRequestThrow();
|
||||
void ProcessRequest();
|
||||
|
||||
@@ -145,6 +145,9 @@ bool BaseThread::WaitForSignalSleep(time_t second)
|
||||
timespec t;
|
||||
int res;
|
||||
|
||||
if( synchro->was_stop_signal )
|
||||
return true;
|
||||
|
||||
t.tv_sec = time(0) + second;
|
||||
t.tv_nsec = 0;
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucorebasethread
|
||||
#define headerfilecmslucorebasethread
|
||||
#ifndef headerfile_winix_core_basethread
|
||||
#define headerfile_winix_core_basethread
|
||||
|
||||
#include <pthread.h>
|
||||
#include "synchro.h"
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucorebbcodeparser
|
||||
#define headerfilecmslucorebbcodeparser
|
||||
#ifndef headerfile_winix_core_bbcodeparser
|
||||
#define headerfile_winix_core_bbcodeparser
|
||||
|
||||
#include "htmlfilter.h"
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucorecompress
|
||||
#define headerfilecmslucorecompress
|
||||
#ifndef headerfile_winix_core_compress
|
||||
#define headerfile_winix_core_compress
|
||||
|
||||
#include <cstring>
|
||||
#include <fcgiapp.h>
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoreconfig
|
||||
#define headerfilecmslucoreconfig
|
||||
#ifndef headerfile_winix_core_config
|
||||
#define headerfile_winix_core_config
|
||||
|
||||
#include <string>
|
||||
#include "confparser.h"
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucorecookieparser
|
||||
#define headerfilecmslucorecookieparser
|
||||
#ifndef headerfile_winix_core_cookieparser
|
||||
#define headerfile_winix_core_cookieparser
|
||||
|
||||
#include <fcgiapp.h>
|
||||
#include "httpsimpleparser.h"
|
||||
|
||||
34
core/cur.h
Executable file
34
core/cur.h
Executable file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfile_winix_core_cur
|
||||
#define headerfile_winix_core_cur
|
||||
|
||||
#include "request.h"
|
||||
#include "session.h"
|
||||
|
||||
|
||||
/*
|
||||
current request and session
|
||||
*/
|
||||
struct Cur
|
||||
{
|
||||
Request * request;
|
||||
Session * session;
|
||||
|
||||
// those pointers are never null, if there is no a session for the user
|
||||
// the 'session' pointer pointers at a special temporary session
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoredircontainer
|
||||
#define headerfilecmslucoredircontainer
|
||||
#ifndef headerfile_winix_core_dircontainer
|
||||
#define headerfile_winix_core_dircontainer
|
||||
|
||||
#include <list>
|
||||
#include <map>
|
||||
|
||||
@@ -19,9 +19,9 @@ void Dirs::SetDb(Db * pdb)
|
||||
}
|
||||
|
||||
|
||||
void Dirs::SetRequest(Request * prequest)
|
||||
void Dirs::SetCur(Cur * pcur)
|
||||
{
|
||||
request = prequest;
|
||||
cur = pcur;
|
||||
}
|
||||
|
||||
|
||||
@@ -603,8 +603,8 @@ Error Dirs::AddDirectory(Item & item, bool add_to_dir_tab, Item ** pdir, int not
|
||||
{
|
||||
Item * d = AddDir(item);
|
||||
|
||||
if( add_to_dir_tab && !request->dir_tab.empty() && request->dir_tab.back()->id == item.parent_id )
|
||||
request->dir_tab.push_back(d);
|
||||
if( add_to_dir_tab && !cur->request->dir_tab.empty() && cur->request->dir_tab.back()->id == item.parent_id )
|
||||
cur->request->dir_tab.push_back(d);
|
||||
|
||||
if( pdir )
|
||||
*pdir = d;
|
||||
|
||||
10
core/dirs.h
10
core/dirs.h
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoredirs
|
||||
#define headerfilecmslucoredirs
|
||||
#ifndef headerfile_winix_core_dirs
|
||||
#define headerfile_winix_core_dirs
|
||||
|
||||
|
||||
#include <vector>
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
void Clear();
|
||||
void ReadDirs();
|
||||
|
||||
void SetRequest(Request * prequest);
|
||||
void SetCur(Cur * pcur);
|
||||
void SetDb(Db * pdb);
|
||||
void SetNotify(Notify * pnotify);
|
||||
|
||||
@@ -79,8 +79,8 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
Request * request;
|
||||
Db * db;
|
||||
Cur * cur;
|
||||
Db * db;
|
||||
Notify * notify;
|
||||
|
||||
DirContainer dir_tab;
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoreerror
|
||||
#define headerfilecmslucoreerror
|
||||
#ifndef headerfile_winix_core_error
|
||||
#define headerfile_winix_core_error
|
||||
|
||||
#include <iostream>
|
||||
#include "log.h"
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoregetparser
|
||||
#define headerfilecmslucoregetparser
|
||||
#ifndef headerfile_winix_core_getparser
|
||||
#define headerfile_winix_core_getparser
|
||||
|
||||
#include "httpsimpleparser.h"
|
||||
#include "requesttypes.h"
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoregroup
|
||||
#define headerfilecmslucoregroup
|
||||
#ifndef headerfile_winix_core_group
|
||||
#define headerfile_winix_core_group
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoregroups
|
||||
#define headerfilecmslucoregroups
|
||||
#ifndef headerfile_winix_core_groups
|
||||
#define headerfile_winix_core_groups
|
||||
|
||||
#include <map>
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucorehtmlfilter
|
||||
#define headerfilecmslucorehtmlfilter
|
||||
#ifndef headerfile_winix_core_htmlfilter
|
||||
#define headerfile_winix_core_htmlfilter
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucorehttpsimpleparser
|
||||
#define headerfilecmslucorehttpsimpleparser
|
||||
#ifndef headerfile_winix_core_httpsimpleparser
|
||||
#define headerfile_winix_core_httpsimpleparser
|
||||
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoreitem
|
||||
#define headerfilecmslucoreitem
|
||||
#ifndef headerfile_winix_core_item
|
||||
#define headerfile_winix_core_item
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ LastTab::iterator i = FindNotLoggedOut(user_id, session_id);
|
||||
return;
|
||||
}
|
||||
|
||||
if( last_tab.size() >= LAST_TABLE_SIZE ) // last_tab has O(n) complexity
|
||||
if( last_tab.size() >= WINIX_LASTCONTAINER_TABLE_SIZE ) // last_tab has O(n) complexity
|
||||
last_tab.erase(last_tab.begin());
|
||||
|
||||
LastItem li;
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucorelastcontainer
|
||||
#define headerfilecmslucorelastcontainer
|
||||
#ifndef headerfile_winix_core_lastcontainer
|
||||
#define headerfile_winix_core_lastcontainer
|
||||
|
||||
#include <string>
|
||||
#include <list>
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
// how many items we store in the 'last' function
|
||||
#define LAST_TABLE_SIZE 100
|
||||
#define WINIX_LASTCONTAINER_TABLE_SIZE 100
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoreloadavg
|
||||
#define headerfilecmslucoreloadavg
|
||||
#ifndef headerfile_winix_core_loadavg
|
||||
#define headerfile_winix_core_loadavg
|
||||
|
||||
#include <ctime>
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucorelog
|
||||
#define headerfilecmslucorelog
|
||||
#ifndef headerfile_winix_core_log
|
||||
#define headerfile_winix_core_log
|
||||
|
||||
|
||||
#include <sstream>
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoremisc
|
||||
#define headerfilecmslucoremisc
|
||||
#ifndef headerfile_winix_core_misc
|
||||
#define headerfile_winix_core_misc
|
||||
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef headerfilecmslucoremount
|
||||
#define headerfilecmslucoremount
|
||||
#ifndef headerfile_winix_core_mount
|
||||
#define headerfile_winix_core_mount
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoremountparser
|
||||
#define headerfilecmslucoremountparser
|
||||
#ifndef headerfile_winix_core_mountparser
|
||||
#define headerfile_winix_core_mountparser
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
@@ -73,9 +73,9 @@ void Mounts::SetDb(Db * pdb)
|
||||
db = pdb;
|
||||
}
|
||||
|
||||
void Mounts::SetRequest(Request * prequest)
|
||||
void Mounts::SetCur(Cur * pcur)
|
||||
{
|
||||
request = prequest;
|
||||
cur = pcur;
|
||||
}
|
||||
|
||||
|
||||
@@ -252,10 +252,10 @@ std::vector<Item*>::reverse_iterator i;
|
||||
|
||||
// when the program starts (when the dir_tab is empty()
|
||||
// we don't want to call MountCmsForRoot()
|
||||
if( request->dir_tab.empty() )
|
||||
if( cur->request->dir_tab.empty() )
|
||||
return;
|
||||
|
||||
for(i = request->dir_tab.rbegin() ; i!=request->dir_tab.rend() ; ++i)
|
||||
for(i = cur->request->dir_tab.rbegin() ; i!=cur->request->dir_tab.rend() ; ++i)
|
||||
{
|
||||
std::map<long, Mount>::iterator m = mount_tab.find( (*i)->id );
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef headerfilecmslucorecoremounts
|
||||
#define headerfilecmslucorecoremounts
|
||||
#ifndef headerfile_winix_core_mounts
|
||||
#define headerfile_winix_core_mounts
|
||||
|
||||
|
||||
#include <map>
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
|
||||
void SetDirs(Dirs * pdirs);
|
||||
void SetDb(Db * pdb);
|
||||
void SetRequest(Request * prequest);
|
||||
void SetCur(Cur * pcur);
|
||||
|
||||
// dir_id, mount_point
|
||||
typedef std::map<long, Mount> MountTab;
|
||||
@@ -97,9 +97,9 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
Db * db;
|
||||
Db * db;
|
||||
Dirs * dirs;
|
||||
Request * request;
|
||||
Cur * cur;
|
||||
|
||||
Mount empty_mount;
|
||||
const std::wstring empty_str;
|
||||
|
||||
@@ -35,7 +35,7 @@ Plugin::Plugin()
|
||||
|
||||
db = 0;
|
||||
config = 0;
|
||||
request = 0;
|
||||
cur = 0;
|
||||
system = 0;
|
||||
functions = 0;
|
||||
templates = 0;
|
||||
@@ -64,9 +64,9 @@ void Plugin::SetConfig(Config * pconfig)
|
||||
}
|
||||
|
||||
|
||||
void Plugin::SetRequest(Request * prequest)
|
||||
void Plugin::SetCur(Cur * pcur)
|
||||
{
|
||||
request = prequest;
|
||||
cur = pcur;
|
||||
}
|
||||
|
||||
|
||||
@@ -105,14 +105,14 @@ void Plugin::SetSessionManager(SessionManager * psession_manager)
|
||||
bool Plugin::SetPointers(PluginInfo & info)
|
||||
{
|
||||
// for safety we call a plugin function only when all our pointers are not null
|
||||
bool res = (db && config && request && system && functions && templates && synchro && session_manager);
|
||||
bool res = (db && config && cur && system && functions && templates && synchro && session_manager);
|
||||
|
||||
if( !res )
|
||||
log << log1 << "Plugin: cannot call a function - some of the winix pointers are null" << logend;
|
||||
|
||||
info.db = db;
|
||||
info.config = config;
|
||||
info.request = request;
|
||||
info.cur = cur;
|
||||
info.system = system;
|
||||
info.functions = functions;
|
||||
info.templates = templates;
|
||||
@@ -252,8 +252,8 @@ void Plugin::Call(int message, Slots::iterator & slot)
|
||||
current_plugin = slot->second.index;
|
||||
info.plugin_id = current_plugin;
|
||||
|
||||
if( request && request->session && current_plugin != -1 )
|
||||
info.plugin_data_base = request->session->plugin_data.Get(current_plugin);
|
||||
if( current_plugin != -1 )
|
||||
info.plugin_data_base = cur->session->plugin_data.Get(current_plugin);
|
||||
else
|
||||
info.plugin_data_base = 0;
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ struct PluginInfo
|
||||
// objects from winix which are accessible from a plugin
|
||||
Db * db;
|
||||
Config * config;
|
||||
Request * request;
|
||||
Cur * cur;
|
||||
System * system;
|
||||
Functions * functions;
|
||||
Templates * templates;
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
|
||||
void SetDb(Db * pdb);
|
||||
void SetConfig(Config * pconfig);
|
||||
void SetRequest(Request * prequest);
|
||||
void SetCur(Cur * pcur);
|
||||
void SetSystem(System * psystem);
|
||||
void SetFunctions(Functions * pfunctions);
|
||||
void SetTemplates(Templates * ptemplates);
|
||||
@@ -178,7 +178,7 @@ private:
|
||||
|
||||
Db * db;
|
||||
Config * config;
|
||||
Request * request;
|
||||
Cur * cur;
|
||||
System * system;
|
||||
Functions * functions;
|
||||
Templates * templates;
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoreplugindata
|
||||
#define headerfilecmslucoreplugindata
|
||||
#ifndef headerfile_winix_core_plugindata
|
||||
#define headerfile_winix_core_plugindata
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
#define WINIX_SESSION_CHANGED 3002
|
||||
|
||||
// the winix is closing
|
||||
// the is not any session available (request->session is null)
|
||||
// the is not any session available (cur->session is null)
|
||||
#define WINIX_CLOSE 3004
|
||||
|
||||
// item was removed (rm function)
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucorepostmultiparser
|
||||
#define headerfilecmslucorepostmultiparser
|
||||
#ifndef headerfile_winix_core_postmultiparser
|
||||
#define headerfile_winix_core_postmultiparser
|
||||
|
||||
#include <string>
|
||||
#include <fcgiapp.h>
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucorepostparser
|
||||
#define headerfilecmslucorepostparser
|
||||
#ifndef headerfile_winix_core_postparser
|
||||
#define headerfile_winix_core_postparser
|
||||
|
||||
#include <fcgiapp.h>
|
||||
#include <string>
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
#include "log.h"
|
||||
#include "rebus.h"
|
||||
#include "misc.h"
|
||||
#include "request.h"
|
||||
#include "cur.h"
|
||||
|
||||
|
||||
|
||||
void Rebus::SetRequest(Request * prequest)
|
||||
void Rebus::SetCur(Cur * pcur)
|
||||
{
|
||||
request = prequest;
|
||||
cur = pcur;
|
||||
}
|
||||
|
||||
|
||||
@@ -128,29 +128,29 @@ return result;
|
||||
|
||||
bool Rebus::CheckRebus()
|
||||
{
|
||||
if( !request->session )
|
||||
if( !cur->session )
|
||||
return false;
|
||||
|
||||
if( request->session->puser )
|
||||
if( cur->session->puser )
|
||||
// logged users don't have to use the rebus
|
||||
return true;
|
||||
|
||||
if( request->session->rebus_checked )
|
||||
if( cur->session->rebus_checked )
|
||||
return true;
|
||||
|
||||
request->session->rebus_checked = true;
|
||||
cur->session->rebus_checked = true;
|
||||
|
||||
if( !request->session->rebus_item )
|
||||
if( !cur->session->rebus_item )
|
||||
{
|
||||
log << log1 << "Rebus: rebus not set" << logend;
|
||||
return false;
|
||||
}
|
||||
|
||||
if( IsAnswerOk(request->session->rebus_item, request->PostVar(L"rebus")) )
|
||||
if( IsAnswerOk(cur->session->rebus_item, cur->request->PostVar(L"rebus")) )
|
||||
return true;
|
||||
|
||||
log << log1 << "Rebus: rebus has an incorrect answer" << logend;
|
||||
// don't add request->session->spam_score when the rebus has incorrect answer
|
||||
// don't add cur->session->spam_score when the rebus has incorrect answer
|
||||
// a user could have made a mistake
|
||||
|
||||
return false;
|
||||
|
||||
10
core/rebus.h
10
core/rebus.h
@@ -7,15 +7,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucorerebus
|
||||
#define headerfilecmslucorerebus
|
||||
#ifndef headerfile_winix_core_rebus
|
||||
#define headerfile_winix_core_rebus
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
class Request;
|
||||
struct Cur;
|
||||
|
||||
|
||||
class Rebus
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
|
||||
|
||||
|
||||
void SetRequest(Request * prequest);
|
||||
void SetCur(Cur * pcur);
|
||||
void Init();
|
||||
Item * Rand();
|
||||
bool IsAnswerOk(Item * item, const std::wstring & answer);
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
Request * request;
|
||||
Cur * cur;
|
||||
|
||||
bool InitPair(int a, int b, Item & item);
|
||||
|
||||
|
||||
@@ -78,10 +78,6 @@ void Request::Clear()
|
||||
env_content_type = &char_empty;
|
||||
env_http_accept_encoding = &char_empty;
|
||||
|
||||
temporary_session.Clear();
|
||||
temporary_session.id = 0;
|
||||
session = &temporary_session;
|
||||
|
||||
item_tab.clear();
|
||||
item.Clear();
|
||||
dir_tab.clear();
|
||||
|
||||
@@ -7,14 +7,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucorerequest
|
||||
#define headerfilecmslucorerequest
|
||||
#ifndef headerfile_winix_core_request
|
||||
#define headerfile_winix_core_request
|
||||
|
||||
#include <fcgiapp.h>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include "requesttypes.h"
|
||||
#include "session.h"
|
||||
#include "item.h"
|
||||
#include "error.h"
|
||||
#include "config.h"
|
||||
@@ -69,9 +68,6 @@ struct Request
|
||||
// true if the browser is Konqueror
|
||||
bool browser_konqueror;
|
||||
|
||||
// current session
|
||||
Session * session;
|
||||
|
||||
// current directory
|
||||
std::vector<Item*> dir_tab;
|
||||
|
||||
@@ -138,9 +134,6 @@ private:
|
||||
|
||||
Config * config;
|
||||
|
||||
// session with id 0
|
||||
Session temporary_session;
|
||||
|
||||
void ClearPostFileTmp();
|
||||
|
||||
// contains '\0'
|
||||
|
||||
@@ -7,15 +7,17 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucorerequesttypes
|
||||
#define headerfilecmslucorerequesttypes
|
||||
#ifndef headerfile_winix_core_requesttypes
|
||||
#define headerfile_winix_core_requesttypes
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
|
||||
#define WINIX_POSTTABLE_MAXSIZE 20
|
||||
// !! narazie uzywane tylko w post multi parserze
|
||||
// dodac do zwyklego parsera post
|
||||
#define WINIX_POSTTABLE_MAXSIZE 50
|
||||
|
||||
|
||||
struct PostFile
|
||||
|
||||
@@ -30,14 +30,15 @@ Session::Session()
|
||||
|
||||
void Session::Clear()
|
||||
{
|
||||
id = 0;
|
||||
time = 0;
|
||||
puser = 0;
|
||||
rebus_item = 0;
|
||||
id = 0;
|
||||
time = 0;
|
||||
puser = 0;
|
||||
rebus_item = 0;
|
||||
rebus_checked = false;
|
||||
remember_me = false;
|
||||
new_session = true;
|
||||
spam_score = 0;
|
||||
remember_me = false;
|
||||
new_session = true;
|
||||
spam_score = 0;
|
||||
plugin_data.Resize(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoresession
|
||||
#define headerfilecmslucoresession
|
||||
#ifndef headerfile_winix_core_session
|
||||
#define headerfile_winix_core_session
|
||||
|
||||
#include <ctime>
|
||||
#include "item.h"
|
||||
|
||||
@@ -15,17 +15,13 @@
|
||||
|
||||
SessionContainer::SessionContainer()
|
||||
{
|
||||
request = 0;
|
||||
table_size = 0;
|
||||
work_mode = 1; // threading work mode
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void SessionContainer::SetRequest(Request * prequest)
|
||||
void SessionContainer::SetCur(Cur * pcur)
|
||||
{
|
||||
request = prequest;
|
||||
cur = pcur;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,32 +31,55 @@ void SessionContainer::SetConfig(Config * pconfig)
|
||||
}
|
||||
|
||||
|
||||
void SessionContainer::SetTmpSession(Session * psession)
|
||||
{
|
||||
tmp_session = psession;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SessionContainer::Clear()
|
||||
{
|
||||
Table::iterator i = table.begin();
|
||||
|
||||
log << log3 << "SC: deleting all sessions" << logend;
|
||||
|
||||
// don't use table.clear();
|
||||
// because plugins session data would not be erased
|
||||
// we must set cur->session for each session and then delete it
|
||||
while( i != table.end() )
|
||||
{
|
||||
request->session = &(*i);
|
||||
cur->session = &(*i);
|
||||
table.erase(i++);
|
||||
}
|
||||
|
||||
// erasing indexes
|
||||
index_id.clear();
|
||||
table_size = 0;
|
||||
request->session = 0;
|
||||
cur->session = tmp_session;
|
||||
}
|
||||
|
||||
|
||||
void SessionContainer::SetLastContainer(LastContainer * plast_container)
|
||||
|
||||
void SessionContainer::EraseById(IdIterator i)
|
||||
{
|
||||
last_container = plast_container;
|
||||
Session * old_session = tmp_session;
|
||||
|
||||
if( cur->session != &(*i->second) )
|
||||
old_session = cur->session;
|
||||
|
||||
cur->session = &(*i->second);
|
||||
|
||||
log << log4 << "SC: deleting session, id: " << i->second->id << logend;
|
||||
table.erase(i->second);
|
||||
index_id.erase(i);
|
||||
table_size -= 1;
|
||||
|
||||
cur->session = old_session;
|
||||
}
|
||||
|
||||
|
||||
|
||||
size_t SessionContainer::Size()
|
||||
{
|
||||
// don't use table.size() as it has O(n) complexity on FreeBSD
|
||||
@@ -86,6 +105,18 @@ Session & SessionContainer::Back()
|
||||
}
|
||||
|
||||
|
||||
SessionContainer::IdIterator SessionContainer::IdBegin()
|
||||
{
|
||||
return index_id.begin();
|
||||
}
|
||||
|
||||
|
||||
SessionContainer::IdIterator SessionContainer::IdEnd()
|
||||
{
|
||||
return index_id.end();
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool SessionContainer::PushBack(const Session & session)
|
||||
{
|
||||
@@ -128,93 +159,3 @@ return i->second;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
* sessions gc (another thread)
|
||||
*
|
||||
*
|
||||
*/
|
||||
void SessionContainer::Work()
|
||||
{
|
||||
bool exit = false;
|
||||
IndexId::iterator i;
|
||||
|
||||
Lock();
|
||||
i = index_id.begin();
|
||||
Unlock();
|
||||
|
||||
while( !exit )
|
||||
{
|
||||
Lock();
|
||||
|
||||
if( i == index_id.end() )
|
||||
{
|
||||
i = index_id.begin();
|
||||
WaitForSignalSleep(10);
|
||||
//WaitForSignalSleep(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if( IsSessionOutdated(*i->second) )
|
||||
DeleteSession(i++);
|
||||
else
|
||||
++i;
|
||||
}
|
||||
|
||||
exit = synchro->was_stop_signal;
|
||||
Unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// it's called from the other thread (with Lock and Unlock)
|
||||
bool SessionContainer::IsSessionOutdated(const Session & s) const
|
||||
{
|
||||
bool outdated;
|
||||
|
||||
if( s.remember_me )
|
||||
outdated = s.last_time < std::time(0) - config->session_remember_max_idle;
|
||||
else
|
||||
outdated = s.last_time < std::time(0) - config->session_max_idle;
|
||||
|
||||
return outdated;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// it's called from the other thread (with Lock and Unlock)
|
||||
void SessionContainer::DeleteSession(SessionContainer::IndexId::iterator i)
|
||||
{
|
||||
Session * old_session = 0;
|
||||
Session * del_session = &(*i->second);
|
||||
|
||||
if( del_session != request->session )
|
||||
old_session = request->session;
|
||||
|
||||
request->session = del_session;
|
||||
|
||||
log << log4 << "SessionContainer: deleting outdated session, id: " << del_session->id << logend;
|
||||
|
||||
if( del_session->puser )
|
||||
last_container->UserLogout(del_session->puser->id, del_session->id);
|
||||
|
||||
table.erase(i->second);
|
||||
index_id.erase(i);
|
||||
table_size -= 1;
|
||||
|
||||
// !! tu moze byc zero
|
||||
request->session = old_session;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
* end of sessions gc
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -7,22 +7,20 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoresessioncontainer
|
||||
#define headerfilecmslucoresessioncontainer
|
||||
#ifndef headerfile_winix_core_sessioncontainer
|
||||
#define headerfile_winix_core_sessioncontainer
|
||||
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <ctime>
|
||||
|
||||
#include "session.h"
|
||||
#include "lastcontainer.h"
|
||||
#include "request.h"
|
||||
#include "basethread.h"
|
||||
#include "cur.h"
|
||||
#include "config.h"
|
||||
|
||||
|
||||
|
||||
class SessionContainer : public BaseThread
|
||||
class SessionContainer
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -33,13 +31,14 @@ public:
|
||||
typedef std::list<Session> Table;
|
||||
typedef Table::iterator Iterator;
|
||||
typedef std::map<long, Iterator> IndexId;
|
||||
typedef IndexId::iterator IdIterator;
|
||||
|
||||
|
||||
SessionContainer();
|
||||
|
||||
void SetRequest(Request * prequest);
|
||||
void SetCur(Cur * pcur);
|
||||
void SetConfig(Config * pconfig);
|
||||
void SetLastContainer(LastContainer * plast_container);
|
||||
void SetTmpSession(Session * psession);
|
||||
|
||||
void Clear();
|
||||
|
||||
@@ -50,20 +49,19 @@ public:
|
||||
bool PushBack(const Session & session);
|
||||
Iterator FindById(long);
|
||||
|
||||
IdIterator IdBegin();
|
||||
IdIterator IdEnd();
|
||||
|
||||
void EraseById(IdIterator i);
|
||||
|
||||
private:
|
||||
|
||||
LastContainer * last_container;
|
||||
|
||||
Table table;
|
||||
IndexId index_id;
|
||||
|
||||
Request * request;
|
||||
Config * config;
|
||||
//void DelFromIdIndex(Iterator iter);
|
||||
virtual void Work();
|
||||
bool IsSessionOutdated(const Session & s) const;
|
||||
void DeleteSession(IndexId::iterator i);
|
||||
Cur * cur;
|
||||
Config * config;
|
||||
Session * tmp_session;
|
||||
|
||||
// in FreeBSD implementation (GCC) list::size() has linear complexity
|
||||
// so we use our own table_size with O(1)
|
||||
|
||||
@@ -22,13 +22,19 @@
|
||||
|
||||
SessionManager::SessionManager()
|
||||
{
|
||||
temporary_session.id = 0;
|
||||
session = &temporary_session;
|
||||
session_tab.SetTmpSession(&temporary_session);
|
||||
|
||||
// thread work mode
|
||||
work_mode = 1;
|
||||
}
|
||||
|
||||
|
||||
void SessionManager::SetRequest(Request * prequest)
|
||||
void SessionManager::SetCur(Cur * pcur)
|
||||
{
|
||||
request = prequest;
|
||||
session_tab.SetRequest(prequest);
|
||||
cur = pcur;
|
||||
session_tab.SetCur(pcur);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,17 +50,13 @@ void SessionManager::SetSystem(System * psystem)
|
||||
system = psystem;
|
||||
}
|
||||
|
||||
|
||||
void SessionManager::SetLastContainer(LastContainer * plast_container)
|
||||
{
|
||||
session_tab.SetLastContainer(plast_container);
|
||||
last_container = plast_container;
|
||||
}
|
||||
|
||||
|
||||
void SessionManager::SetSynchro(Synchro * psynchro)
|
||||
{
|
||||
session_tab.SetSynchro(psynchro);
|
||||
}
|
||||
|
||||
|
||||
size_t SessionManager::Size()
|
||||
{
|
||||
@@ -103,52 +105,20 @@ return id;
|
||||
|
||||
|
||||
|
||||
void SessionManager::CreateTemporarySession()
|
||||
{
|
||||
SessionContainer::Iterator i = session_tab.FindById( 0 );
|
||||
|
||||
if( i == session_tab.End() )
|
||||
{
|
||||
Session s;
|
||||
s.id = 0;
|
||||
s.new_session = true;
|
||||
|
||||
session_tab.PushBack(s);
|
||||
request->session = &session_tab.Back();
|
||||
}
|
||||
else
|
||||
{
|
||||
request->session = &(*i);
|
||||
request->session->Clear(); // !! what about session.plugin_data?
|
||||
request->session->id = 0;
|
||||
request->session->new_session = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SessionManager::CreateSession()
|
||||
{
|
||||
Session s;
|
||||
int attempts = 100;
|
||||
int attempts = 100;
|
||||
bool added = false;
|
||||
|
||||
if( config->session_max == 0 || session_tab.Size() < config->session_max - 1 ) // -1 for the temporary session
|
||||
new_session.Clear();
|
||||
|
||||
if( config->session_max == 0 || session_tab.Size() < config->session_max )
|
||||
{
|
||||
for( ; attempts > 0 ; --attempts )
|
||||
for( ; !added && attempts > 0 ; --attempts )
|
||||
{
|
||||
s.id = CreateSessionId();
|
||||
|
||||
bool added = session_tab.PushBack(s);
|
||||
|
||||
if( added )
|
||||
{
|
||||
request->session = &session_tab.Back();
|
||||
request->session->new_session = true;
|
||||
|
||||
log << log2 << "SM: created a new session: " << request->session->id << logend;
|
||||
|
||||
return;
|
||||
}
|
||||
new_session.id = CreateSessionId();
|
||||
added = session_tab.PushBack(new_session);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -156,10 +126,21 @@ int attempts = 100;
|
||||
log << log2 << "SM: sessions limit exceeded (" << config->session_max << ")" << logend;
|
||||
}
|
||||
|
||||
// there is a problem with generating a new session id
|
||||
// we do not set a session cookie
|
||||
CreateTemporarySession();
|
||||
log << log1 << "SM: cannot create a session id (temporary used: with id 0)" << logend;
|
||||
if( added )
|
||||
{
|
||||
session = &session_tab.Back();
|
||||
session->new_session = true;
|
||||
log << log2 << "SM: created a new session: " << session->id << logend;
|
||||
}
|
||||
else
|
||||
{
|
||||
// there is a problem with generating a new session id
|
||||
// we do not set a session cookie
|
||||
session = &temporary_session;
|
||||
session->Clear();
|
||||
session->new_session = false; // temporary session was initialized at the beginning
|
||||
log << log1 << "SM: cannot create a session id (temporary used: with id 0)" << logend;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -174,18 +155,18 @@ bool SessionManager::SetSessionFromCookie(const std::string & cookie)
|
||||
return false;
|
||||
|
||||
// that session is in the table
|
||||
request->session = &(*s);
|
||||
request->session->new_session = false;
|
||||
request->session->last_time = std::time(0);
|
||||
request->session->tm_last_time = Time(request->session->last_time);
|
||||
session = &(*s);
|
||||
session->new_session = false;
|
||||
session->last_time = std::time(0);
|
||||
session->tm_last_time = Time(session->last_time);
|
||||
|
||||
if( request->method == Request::get )
|
||||
request->session->last_time_get = request->session->last_time;
|
||||
if( cur->request->method == Request::get )
|
||||
session->last_time_get = session->last_time;
|
||||
|
||||
log << log2 << "SM: session: " << s->id;
|
||||
log << log2 << "SM: session: " << session->id;
|
||||
|
||||
if( request->session->puser )
|
||||
log << log2 << ", user: " << request->session->puser->name << ", id: " << request->session->puser->id;
|
||||
if( session->puser )
|
||||
log << log2 << ", user: " << session->puser->name << ", id: " << session->puser->id;
|
||||
|
||||
log << log2 << logend;
|
||||
|
||||
@@ -196,9 +177,9 @@ return true;
|
||||
|
||||
void SessionManager::SetSession()
|
||||
{
|
||||
CookieTab::iterator i = request->cookie_tab.find(config->http_session_id_name);
|
||||
CookieTab::iterator i = cur->request->cookie_tab.find(config->http_session_id_name);
|
||||
|
||||
if( i == request->cookie_tab.end() )
|
||||
if( i == cur->request->cookie_tab.end() )
|
||||
{
|
||||
CreateSession();
|
||||
}
|
||||
@@ -208,22 +189,12 @@ void SessionManager::SetSession()
|
||||
{
|
||||
// there is no such a session
|
||||
// deleting the old cookie
|
||||
request->cookie_tab.erase(i);
|
||||
cur->request->cookie_tab.erase(i);
|
||||
|
||||
// and creating a new one
|
||||
CreateSession();
|
||||
}
|
||||
}
|
||||
|
||||
// request->session is set now
|
||||
|
||||
if( request->session->new_session )
|
||||
{
|
||||
request->session->plugin_data.Resize(plugin.Size());
|
||||
plugin.Call(WINIX_SESSION_CREATED);
|
||||
}
|
||||
|
||||
plugin.Call(WINIX_SESSION_CHANGED);
|
||||
}
|
||||
|
||||
|
||||
@@ -252,6 +223,31 @@ void SessionManager::DeleteSessions()
|
||||
|
||||
|
||||
|
||||
void SessionManager::InitTmpSession()
|
||||
{
|
||||
Session * old_session = cur->session;
|
||||
|
||||
log << log4 << "SM: initializing temporary session" << logend;
|
||||
cur->session = &temporary_session;
|
||||
plugin.Call(WINIX_SESSION_CREATED);
|
||||
|
||||
cur->session = old_session;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SessionManager::UninitTmpSession()
|
||||
{
|
||||
Session * old_session = cur->session;
|
||||
|
||||
log << log4 << "SM: uninitializing temporary session" << logend;
|
||||
cur->session = &temporary_session;
|
||||
cur->session->plugin_data.DeleteAll(); // this will call plugin.Call(WINIX_SESSION_REMOVE);
|
||||
cur->session->plugin_data.Resize(0);
|
||||
|
||||
cur->session = old_session;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SessionManager::LoadSessions()
|
||||
@@ -259,20 +255,20 @@ void SessionManager::LoadSessions()
|
||||
SessionParser sp;
|
||||
SessionContainer::Iterator i;
|
||||
|
||||
// sessions will be overwritten (pointers are invalidated)
|
||||
cur->session = &temporary_session;
|
||||
|
||||
sp.SetUsers(&system->users);
|
||||
Session * old_session = request->session;
|
||||
|
||||
sp.Parse(config->session_file, session_tab);
|
||||
i = session_tab.Begin();
|
||||
|
||||
for( ; i!=session_tab.End() ; ++i )
|
||||
for(i=session_tab.Begin() ; i != session_tab.End() ; ++i)
|
||||
{
|
||||
i->plugin_data.Resize(plugin.Size());
|
||||
request->session = &(*i);
|
||||
cur->session = &(*i);
|
||||
plugin.Call(WINIX_SESSION_CREATED);
|
||||
}
|
||||
|
||||
request->session = old_session;
|
||||
cur->session = &temporary_session;
|
||||
}
|
||||
|
||||
|
||||
@@ -316,24 +312,125 @@ void SessionManager::SaveSessions()
|
||||
|
||||
|
||||
|
||||
void SessionManager::StartGC()
|
||||
|
||||
Session * SessionManager::GetTmpSession()
|
||||
{
|
||||
session_tab.StartThread();
|
||||
return &temporary_session;
|
||||
}
|
||||
|
||||
|
||||
// use it with Lock() and Unlock();
|
||||
void SessionManager::PrepareToStopGC()
|
||||
Session * SessionManager::GetCurSession()
|
||||
{
|
||||
session_tab.WakeUpThread();
|
||||
}
|
||||
|
||||
|
||||
void SessionManager::WaitForGC()
|
||||
{
|
||||
session_tab.WaitForThread();
|
||||
return session;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
* sessions gc (second thread)
|
||||
*
|
||||
*
|
||||
*/
|
||||
void SessionManager::Work()
|
||||
{
|
||||
bool exit = false;
|
||||
SessionContainer::IndexId::iterator i;
|
||||
|
||||
deleted = 0;
|
||||
|
||||
Lock();
|
||||
i = session_tab.IdBegin();
|
||||
Unlock();
|
||||
|
||||
while( !exit )
|
||||
{
|
||||
Lock();
|
||||
|
||||
CheckSession(i);
|
||||
exit = synchro->was_stop_signal;
|
||||
|
||||
Unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// it's called from the other thread (with Lock and Unlock)
|
||||
void SessionManager::CheckSession(SessionContainer::IndexId::iterator & i)
|
||||
{
|
||||
const int deleted_max_at_once = 10;
|
||||
|
||||
if( i == session_tab.IdEnd() )
|
||||
{
|
||||
if( deleted > 0 )
|
||||
{
|
||||
deleted = 0;
|
||||
log << logsave;
|
||||
}
|
||||
|
||||
i = session_tab.IdBegin();
|
||||
WaitForSignalSleep(10);
|
||||
}
|
||||
else
|
||||
{
|
||||
if( IsSessionOutdated(*i->second) )
|
||||
{
|
||||
DeleteSession(i++);
|
||||
++deleted;
|
||||
}
|
||||
else
|
||||
{
|
||||
++i;
|
||||
}
|
||||
|
||||
if( deleted >= deleted_max_at_once )
|
||||
{
|
||||
log << logsave;
|
||||
WaitForSignalSleep(1);
|
||||
deleted = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// it's called from the other thread (with Lock and Unlock)
|
||||
bool SessionManager::IsSessionOutdated(const Session & s) const
|
||||
{
|
||||
bool outdated;
|
||||
|
||||
if( s.remember_me )
|
||||
outdated = s.last_time < std::time(0) - config->session_remember_max_idle;
|
||||
else
|
||||
outdated = s.last_time < std::time(0) - config->session_max_idle;
|
||||
|
||||
return outdated;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// it's called from the other thread (with Lock and Unlock)
|
||||
void SessionManager::DeleteSession(SessionContainer::IdIterator i)
|
||||
{
|
||||
Session * del_session = &(*i->second);
|
||||
|
||||
if( del_session->puser )
|
||||
last_container->UserLogout(del_session->puser->id, del_session->id);
|
||||
|
||||
session_tab.EraseById(i);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
* end of sessions gc
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoresessionmanager
|
||||
#define headerfilecmslucoresessionmanager
|
||||
#ifndef headerfile_winix_core_sessionmanager
|
||||
#define headerfile_winix_core_sessionmanager
|
||||
|
||||
#include <set>
|
||||
#include <ctime>
|
||||
@@ -19,39 +19,29 @@
|
||||
#include "lastcontainer.h"
|
||||
#include "system.h"
|
||||
#include "synchro.h"
|
||||
#include "basethread.h"
|
||||
|
||||
|
||||
|
||||
class SessionManager
|
||||
class SessionManager : public BaseThread
|
||||
{
|
||||
Config * config;
|
||||
Request * request;
|
||||
System * system;
|
||||
|
||||
SessionContainer session_tab;
|
||||
|
||||
bool IsSession(long s);
|
||||
|
||||
long CreateSessionId();
|
||||
void CreateTemporarySession();
|
||||
void CreateSession();
|
||||
bool SetSessionFromCookie(const std::string & cookie);
|
||||
|
||||
public:
|
||||
|
||||
SessionManager();
|
||||
|
||||
void SetRequest(Request * prequest);
|
||||
void SetCur(Cur * pcur);
|
||||
void SetConfig(Config * pconfig);
|
||||
void SetSystem(System * psystem);
|
||||
void SetLastContainer(LastContainer * plast_container);
|
||||
void SetSynchro(Synchro * psynchro);
|
||||
|
||||
void SetSession();
|
||||
void DeleteSessions(); // deleting all sessions
|
||||
void StartGC();
|
||||
void PrepareToStopGC();
|
||||
void WaitForGC();
|
||||
|
||||
void InitTmpSession();
|
||||
void UninitTmpSession();
|
||||
|
||||
Session * GetTmpSession();
|
||||
Session * GetCurSession();
|
||||
|
||||
void LoadSessions();
|
||||
void SaveSessions();
|
||||
@@ -60,6 +50,40 @@ public:
|
||||
SessionContainer::Iterator SessionEnd();
|
||||
|
||||
size_t Size();
|
||||
|
||||
private:
|
||||
|
||||
Config * config;
|
||||
Cur * cur;
|
||||
System * system;
|
||||
|
||||
LastContainer * last_container;
|
||||
|
||||
// current session - set by SetSession()
|
||||
Session * session;
|
||||
|
||||
SessionContainer session_tab;
|
||||
|
||||
// session with id 0
|
||||
Session temporary_session;
|
||||
|
||||
// for adding a new session to the container
|
||||
Session new_session;
|
||||
|
||||
bool IsSession(long s);
|
||||
|
||||
long CreateSessionId();
|
||||
void CreateSession();
|
||||
bool SetSessionFromCookie(const std::string & cookie);
|
||||
|
||||
|
||||
// second thread
|
||||
int deleted;
|
||||
virtual void Work();
|
||||
void CheckSession(SessionContainer::IndexId::iterator & i);
|
||||
bool IsSessionOutdated(const Session & s) const;
|
||||
void DeleteSession(SessionContainer::IdIterator i);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoresessionparser
|
||||
#define headerfilecmslucoresessionparser
|
||||
#ifndef headerfile_winix_core_sessionparser
|
||||
#define headerfile_winix_core_sessionparser
|
||||
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoresynchro
|
||||
#define headerfilecmslucoresynchro
|
||||
#ifndef headerfile_winix_core_synchro
|
||||
#define headerfile_winix_core_synchro
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
|
||||
138
core/system.cpp
138
core/system.cpp
@@ -15,9 +15,9 @@
|
||||
|
||||
|
||||
|
||||
void System::SetRequest(Request * prequest)
|
||||
void System::SetCur(Cur * pcur)
|
||||
{
|
||||
request = prequest;
|
||||
cur = pcur;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,26 +44,26 @@ void System::SetSynchro(Synchro * psynchro)
|
||||
void System::Init()
|
||||
{
|
||||
dirs.SetDb(db);
|
||||
dirs.SetRequest(request);
|
||||
dirs.SetCur(cur);
|
||||
dirs.SetNotify(¬ify);
|
||||
dirs.ReadDirs();
|
||||
|
||||
mounts.SetDirs(&dirs);
|
||||
mounts.SetDb(db);
|
||||
mounts.SetRequest(request);
|
||||
mounts.SetCur(cur);
|
||||
mounts.CreateMounts();
|
||||
mounts.ReadMounts();
|
||||
|
||||
users.SetRequest(request);
|
||||
users.SetCur(cur);
|
||||
users.ReadUsers(db);
|
||||
users.SetTimeZoneOffset(config->time_zone_offset);
|
||||
groups.ReadGroups(db); // !! chwilowe przekazanie argumentu, db bedzie zmienione
|
||||
|
||||
rebus.SetRequest(request);
|
||||
rebus.SetCur(cur);
|
||||
rebus.Init();
|
||||
|
||||
notify.SetSynchro(synchro);
|
||||
notify.SetRequest(request);
|
||||
notify.SetCur(cur);
|
||||
notify.SetConfig(config);
|
||||
notify.SetUsers(&users);
|
||||
notify.SetDirs(&dirs);
|
||||
@@ -80,35 +80,35 @@ void System::Init()
|
||||
// !! moze zwracac jakas wartosc?
|
||||
void System::RedirectTo(const Item & item, const wchar_t * postfix)
|
||||
{
|
||||
request->redirect_to = config->base_url;
|
||||
cur->request->redirect_to = config->base_url;
|
||||
|
||||
if( item.type == Item::dir )
|
||||
{
|
||||
// item_id is pointing to a directory
|
||||
dirs.MakePath(item.id, request->redirect_to, false);
|
||||
dirs.MakePath(item.id, cur->request->redirect_to, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// item_id is pointing to a file or a symlink
|
||||
if( dirs.MakePath(item.parent_id, request->redirect_to, false) )
|
||||
request->redirect_to += item.url;
|
||||
if( dirs.MakePath(item.parent_id, cur->request->redirect_to, false) )
|
||||
cur->request->redirect_to += item.url;
|
||||
}
|
||||
|
||||
if( postfix )
|
||||
request->redirect_to += postfix;
|
||||
cur->request->redirect_to += postfix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void System::RedirectTo(long item_id, const wchar_t * postfix)
|
||||
{
|
||||
request->redirect_to = config->base_url;
|
||||
cur->request->redirect_to = config->base_url;
|
||||
Item * pdir = dirs.GetDir(item_id);
|
||||
|
||||
if( pdir )
|
||||
{
|
||||
// item_id is pointing to a directory
|
||||
dirs.MakePath(pdir->id, request->redirect_to, false);
|
||||
dirs.MakePath(pdir->id, cur->request->redirect_to, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -122,8 +122,8 @@ void System::RedirectTo(long item_id, const wchar_t * postfix)
|
||||
|
||||
if( db->GetItem(item_temp, iq) == WINIX_ERR_OK )
|
||||
{
|
||||
if( dirs.MakePath(item_temp.parent_id, request->redirect_to, false) )
|
||||
request->redirect_to += item_temp.url;
|
||||
if( dirs.MakePath(item_temp.parent_id, cur->request->redirect_to, false) )
|
||||
cur->request->redirect_to += item_temp.url;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -132,31 +132,31 @@ void System::RedirectTo(long item_id, const wchar_t * postfix)
|
||||
}
|
||||
|
||||
if( postfix )
|
||||
request->redirect_to += postfix;
|
||||
cur->request->redirect_to += postfix;
|
||||
}
|
||||
|
||||
|
||||
void System::RedirectTo(const std::wstring & url)
|
||||
{
|
||||
request->redirect_to = config->base_url;
|
||||
cur->request->redirect_to = config->base_url;
|
||||
|
||||
if( !url.empty() && url[0] == '/' )
|
||||
{
|
||||
// absolute path
|
||||
request->redirect_to += url;
|
||||
cur->request->redirect_to += url;
|
||||
}
|
||||
else
|
||||
{
|
||||
// relative path
|
||||
if( !request->dir_tab.empty() )
|
||||
if( !cur->request->dir_tab.empty() )
|
||||
{
|
||||
if( dirs.MakePath(request->dir_tab.back()->id, request->redirect_to, false) )
|
||||
request->redirect_to += url;
|
||||
if( dirs.MakePath(cur->request->dir_tab.back()->id, cur->request->redirect_to, false) )
|
||||
cur->request->redirect_to += url;
|
||||
}
|
||||
else
|
||||
{
|
||||
request->redirect_to += '/';
|
||||
request->redirect_to += url;
|
||||
cur->request->redirect_to += '/';
|
||||
cur->request->redirect_to += url;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -186,38 +186,38 @@ void System::RedirectWithFunctionAndParamsTo(const std::wstring & url)
|
||||
{
|
||||
RedirectTo(url);
|
||||
|
||||
if( !request->function )
|
||||
if( !cur->request->function )
|
||||
return;
|
||||
|
||||
request->redirect_to += '/';
|
||||
request->redirect_to += request->function->fun.url;
|
||||
cur->request->redirect_to += '/';
|
||||
cur->request->redirect_to += cur->request->function->fun.url;
|
||||
|
||||
AddParams(request->param_tab, request->redirect_to, false);
|
||||
AddParams(cur->request->param_tab, cur->request->redirect_to, false);
|
||||
}
|
||||
|
||||
|
||||
void System::RedirectToLastDir()
|
||||
{
|
||||
if( !request->dir_tab.empty() )
|
||||
RedirectTo( *request->dir_tab.back() );
|
||||
if( !cur->request->dir_tab.empty() )
|
||||
RedirectTo( *cur->request->dir_tab.back() );
|
||||
}
|
||||
|
||||
|
||||
void System::RedirectToLastItem()
|
||||
{
|
||||
if( request->last_item )
|
||||
RedirectTo( *request->last_item );
|
||||
if( cur->request->last_item )
|
||||
RedirectTo( *cur->request->last_item );
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool System::CanChangeUser(const Item & item, long new_user_id)
|
||||
{
|
||||
if( !request->session )
|
||||
if( !cur->session )
|
||||
// session must be set
|
||||
return false;
|
||||
|
||||
if( request->session->puser && request->session->puser->super_user )
|
||||
if( cur->session->puser && cur->session->puser->super_user )
|
||||
// super user is allowed everything
|
||||
return true;
|
||||
|
||||
@@ -233,11 +233,11 @@ return true;
|
||||
|
||||
bool System::CanChangeGroup(const Item & item, long new_group_id)
|
||||
{
|
||||
if( !request->session )
|
||||
if( !cur->session )
|
||||
// session must be set
|
||||
return false;
|
||||
|
||||
if( request->session->puser && request->session->puser->super_user )
|
||||
if( cur->session->puser && cur->session->puser->super_user )
|
||||
// super user is allowed everything
|
||||
return true;
|
||||
|
||||
@@ -246,16 +246,16 @@ bool System::CanChangeGroup(const Item & item, long new_group_id)
|
||||
// user is allowed to change the group only if he is an owner of the item
|
||||
// he can change only into a group in which he is a member of, or into a 'no_group'
|
||||
|
||||
if( !request->session->puser )
|
||||
if( !cur->session->puser )
|
||||
return false;
|
||||
|
||||
if( request->session->puser->id != item.user_id )
|
||||
if( cur->session->puser->id != item.user_id )
|
||||
return false;
|
||||
|
||||
if( new_group_id == -1 )
|
||||
return true;
|
||||
|
||||
if( !request->session->puser->IsMemberOf(new_group_id) )
|
||||
if( !cur->session->puser->IsMemberOf(new_group_id) )
|
||||
return false;
|
||||
|
||||
// is logged, is the owner of the item, is the member of the new group
|
||||
@@ -267,11 +267,11 @@ return true;
|
||||
|
||||
bool System::CanChangePrivileges(const Item & item, int new_priv)
|
||||
{
|
||||
if( !request->session )
|
||||
if( !cur->session )
|
||||
// session must be set
|
||||
return false;
|
||||
|
||||
if( request->session->puser && request->session->puser->super_user )
|
||||
if( cur->session->puser && cur->session->puser->super_user )
|
||||
// super user is allowed everything
|
||||
return true;
|
||||
|
||||
@@ -279,10 +279,10 @@ bool System::CanChangePrivileges(const Item & item, int new_priv)
|
||||
{
|
||||
// the owner of an item is allowed to change the privileges
|
||||
|
||||
if( !request->session->puser )
|
||||
if( !cur->session->puser )
|
||||
return false;
|
||||
|
||||
if( request->session->puser->id != item.user_id )
|
||||
if( cur->session->puser->id != item.user_id )
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -293,21 +293,21 @@ return true;
|
||||
|
||||
bool System::HasAccess(const Item & item, int mask)
|
||||
{
|
||||
if( !request->session )
|
||||
if( !cur->session )
|
||||
// session must be set
|
||||
return false;
|
||||
|
||||
if( request->session->puser && request->session->puser->super_user )
|
||||
if( cur->session->puser && cur->session->puser->super_user )
|
||||
// super user is allowed everything
|
||||
return true;
|
||||
|
||||
if( request->session->puser && request->session->puser->id == item.user_id )
|
||||
if( cur->session->puser && cur->session->puser->id == item.user_id )
|
||||
{
|
||||
// the owner
|
||||
return ((item.privileges >> 6) & mask) == mask;
|
||||
}
|
||||
|
||||
if( request->session->puser && request->session->puser->IsMemberOf(item.group_id) )
|
||||
if( cur->session->puser && cur->session->puser->IsMemberOf(item.group_id) )
|
||||
{
|
||||
// group
|
||||
return ((item.privileges >> 3) & mask) == mask;
|
||||
@@ -339,7 +339,7 @@ bool System::HasReadWriteAccess(const Item & item)
|
||||
|
||||
bool System::HasReadExecAccess(const Item & item)
|
||||
{
|
||||
if( request->session && request->session->puser && request->session->puser->super_user )
|
||||
if( cur->session && cur->session->puser && cur->session->puser->super_user )
|
||||
{
|
||||
// there must be at least one 'x' (for the root)
|
||||
|
||||
@@ -387,7 +387,7 @@ return true;
|
||||
|
||||
bool System::DirsHaveReadExecPerm()
|
||||
{
|
||||
return HasReadExecAccessToPath(request->dir_tab);
|
||||
return HasReadExecAccessToPath(cur->request->dir_tab);
|
||||
}
|
||||
|
||||
|
||||
@@ -642,10 +642,10 @@ Error System::EditFile(Item & item, bool with_url, int notify_code)
|
||||
if( item.type != Item::file )
|
||||
return WINIX_ERR_FILE_EXPECTED;
|
||||
|
||||
if( request->session && request->session->puser )
|
||||
request->item.modification_user_id = request->session->puser->id;
|
||||
if( cur->session && cur->session->puser )
|
||||
cur->request->item.modification_user_id = cur->session->puser->id;
|
||||
else
|
||||
request->item.modification_user_id = -1;
|
||||
cur->request->item.modification_user_id = -1;
|
||||
|
||||
item.SetDateModifyToNow();
|
||||
Error status = db->EditItemById(item, with_url);
|
||||
@@ -669,8 +669,8 @@ time_t System::LocalTime(time_t gmt_time)
|
||||
{
|
||||
int time_offset;
|
||||
|
||||
if( request->session && request->session->puser )
|
||||
time_offset = request->session->puser->time_zone_offset;
|
||||
if( cur->session && cur->session->puser )
|
||||
time_offset = cur->session->puser->time_zone_offset;
|
||||
else
|
||||
time_offset = config->time_zone_offset_guest;
|
||||
|
||||
@@ -909,40 +909,40 @@ int System::FollowAllLinks(const std::wstring & link_to,
|
||||
|
||||
|
||||
|
||||
// the same as FollowAllLinks but operates on request->dir_tab and request->item
|
||||
// the same as FollowAllLinks but operates on cur->request->dir_tab and cur->request->item
|
||||
// and returns bool
|
||||
// the method is making a redirection if needed
|
||||
bool System::FollowAllLinks(const std::wstring & link_to,
|
||||
bool follow_dir_default, bool stop_on_link_redirect, bool check_access)
|
||||
{
|
||||
int res = FollowAllLinks(request->dir_tab, link_to, temp_follow_dir_tab, temp_follow_item,
|
||||
int res = FollowAllLinks(cur->request->dir_tab, link_to, temp_follow_dir_tab, temp_follow_item,
|
||||
follow_dir_default, stop_on_link_redirect, check_access);
|
||||
|
||||
bool ok = (res == 0 || res == 1);
|
||||
|
||||
if( ok )
|
||||
{
|
||||
request->dir_tab = temp_follow_dir_tab;
|
||||
cur->request->dir_tab = temp_follow_dir_tab;
|
||||
|
||||
if( res == 0 )
|
||||
{
|
||||
request->is_item = false;
|
||||
request->item.Clear();
|
||||
request->last_item = request->dir_tab.back();
|
||||
cur->request->is_item = false;
|
||||
cur->request->item.Clear();
|
||||
cur->request->last_item = cur->request->dir_tab.back();
|
||||
|
||||
if( !request->dir_tab.back()->link_to.empty() )
|
||||
RedirectTo(request->dir_tab.back()->link_to);
|
||||
if( !cur->request->dir_tab.back()->link_to.empty() )
|
||||
RedirectTo(cur->request->dir_tab.back()->link_to);
|
||||
|
||||
log << log3 << "System: current directory changed" << logend;
|
||||
}
|
||||
else
|
||||
{
|
||||
request->is_item = true;
|
||||
request->item = temp_follow_item;
|
||||
request->last_item = &request->item;
|
||||
cur->request->is_item = true;
|
||||
cur->request->item = temp_follow_item;
|
||||
cur->request->last_item = &cur->request->item;
|
||||
|
||||
if( request->item.type == Item::symlink )
|
||||
RedirectTo(request->item.link_to); // request->item.link_to is not empty
|
||||
if( cur->request->item.type == Item::symlink )
|
||||
RedirectTo(cur->request->item.link_to); // cur->request->item.link_to is not empty
|
||||
|
||||
log << log3 << "System: current directory changed and the new file loaded" << logend;
|
||||
}
|
||||
@@ -952,9 +952,9 @@ bool System::FollowAllLinks(const std::wstring & link_to,
|
||||
else
|
||||
{
|
||||
if( res == 5 || res == 6 )
|
||||
request->status = WINIX_ERR_PERMISSION_DENIED;
|
||||
cur->request->status = WINIX_ERR_PERMISSION_DENIED;
|
||||
else
|
||||
request->status = WINIX_ERR_NO_ITEM;
|
||||
cur->request->status = WINIX_ERR_NO_ITEM;
|
||||
}
|
||||
|
||||
return ok;
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoresystem
|
||||
#define headerfilecmslucoresystem
|
||||
#ifndef headerfile_winix_core_system
|
||||
#define headerfile_winix_core_system
|
||||
|
||||
#include <ctime>
|
||||
#include "dirs.h"
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
time_t system_start;
|
||||
|
||||
|
||||
void SetRequest(Request * prequest);
|
||||
void SetCur(Cur * pcur);
|
||||
void SetConfig(Config * pconfig);
|
||||
void SetDb(Db * pdb);
|
||||
void SetSynchro(Synchro * psynchro);
|
||||
@@ -120,15 +120,16 @@ public:
|
||||
std::vector<Item*> & out_dir_tab, Item & out_item,
|
||||
bool follow_dir_default = false, bool stop_on_link_redirect = false, bool check_access = true);
|
||||
|
||||
// using request->dir_tab and request->item
|
||||
// using cur->request->dir_tab and cur->request->item
|
||||
bool FollowAllLinks(const std::wstring & link_to,
|
||||
bool follow_dir_default = false, bool stop_on_link_redirect = false, bool check_access = true);
|
||||
|
||||
private:
|
||||
Request * request;
|
||||
Config * config;
|
||||
Db * db;
|
||||
Synchro * synchro;
|
||||
|
||||
Cur * cur;
|
||||
Db * db;
|
||||
Config * config;
|
||||
Synchro * synchro;
|
||||
|
||||
Item item_temp;
|
||||
std::wstring link_to_temp, name_temp;
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucorethumb
|
||||
#define headerfilecmslucorethumb
|
||||
#ifndef headerfile_winix_core_thumb
|
||||
#define headerfile_winix_core_thumb
|
||||
|
||||
#include <string>
|
||||
#include <list>
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoreugcontainer
|
||||
#define headerfilecmslucoreugcontainer
|
||||
#ifndef headerfile_winix_core_ugcontainer
|
||||
#define headerfile_winix_core_ugcontainer
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoreuser
|
||||
#define headerfilecmslucoreuser
|
||||
#ifndef headerfile_winix_core_user
|
||||
#define headerfile_winix_core_user
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -19,9 +19,9 @@ Users::Users()
|
||||
}
|
||||
|
||||
|
||||
void Users::SetRequest(Request * prequest)
|
||||
void Users::SetCur(Cur * pcur)
|
||||
{
|
||||
request = prequest;
|
||||
cur = pcur;
|
||||
}
|
||||
|
||||
|
||||
@@ -128,30 +128,30 @@ User & Users::operator[](Users::SizeType pos)
|
||||
|
||||
void Users::LoginUser(long user_id, bool remember_me)
|
||||
{
|
||||
if( !request->session )
|
||||
if( !cur->session )
|
||||
return;
|
||||
|
||||
if( request->session->id == 0 )
|
||||
if( cur->session->id == 0 )
|
||||
{
|
||||
log << log1 << "Users: cannot login a user on a temporary session" << logend;
|
||||
return;
|
||||
}
|
||||
|
||||
request->session->puser = GetUser(user_id);
|
||||
request->session->spam_score = 0;
|
||||
cur->session->puser = GetUser(user_id);
|
||||
cur->session->spam_score = 0;
|
||||
|
||||
if( !request->session->puser )
|
||||
if( !cur->session->puser )
|
||||
{
|
||||
log << log1 << "Users: user id: " << user_id << " is not in system.users table" << logend;
|
||||
return;
|
||||
}
|
||||
|
||||
request->session->remember_me = remember_me;
|
||||
cur->session->remember_me = remember_me;
|
||||
|
||||
last.UserLogin(user_id, request->session->puser->name, inet_addr(request->env_remote_addr), request->session->id);
|
||||
last.UserLogin(user_id, cur->session->puser->name, inet_addr(cur->request->env_remote_addr), cur->session->id);
|
||||
how_many_logged += 1;
|
||||
|
||||
log << log2 << "User " << request->session->puser->name << " (id: " << user_id << ") logged" << logend;
|
||||
log << log2 << "User " << cur->session->puser->name << " (id: " << user_id << ") logged" << logend;
|
||||
}
|
||||
|
||||
|
||||
@@ -159,19 +159,19 @@ void Users::LoginUser(long user_id, bool remember_me)
|
||||
|
||||
void Users::LogoutCurrentUser()
|
||||
{
|
||||
if( !request->session || !request->session->puser )
|
||||
if( !cur->session || !cur->session->puser )
|
||||
return;
|
||||
|
||||
log << log2 << "Users: user " << request->session->puser->name << ", id: "
|
||||
<< request->session->puser->id << " logged out" << logend;
|
||||
log << log2 << "Users: user " << cur->session->puser->name << ", id: "
|
||||
<< cur->session->puser->id << " logged out" << logend;
|
||||
|
||||
last.UserLogout(request->session->puser->id, request->session->id);
|
||||
last.UserLogout(cur->session->puser->id, cur->session->id);
|
||||
|
||||
if( how_many_logged > 0 ) // for safety
|
||||
how_many_logged -= 1;
|
||||
|
||||
request->session->puser = 0;
|
||||
request->session->remember_me = 0;
|
||||
cur->session->puser = 0;
|
||||
cur->session->remember_me = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
10
core/users.h
10
core/users.h
@@ -7,14 +7,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoreusers
|
||||
#define headerfilecmslucoreusers
|
||||
#ifndef headerfile_winix_core_users
|
||||
#define headerfile_winix_core_users
|
||||
|
||||
#include <map>
|
||||
#include "user.h"
|
||||
#include "ugcontainer.h"
|
||||
#include "lastcontainer.h"
|
||||
#include "request.h"
|
||||
#include "cur.h"
|
||||
#include "db/db.h"
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class Users
|
||||
typedef UGContainer<User> Table;
|
||||
Table table;
|
||||
|
||||
Request * request;
|
||||
Cur * cur;
|
||||
long how_many_logged;
|
||||
|
||||
public:
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
|
||||
Users();
|
||||
|
||||
void SetRequest(Request * request);
|
||||
void SetCur(Cur * pcur);
|
||||
|
||||
void Clear();
|
||||
void ReadUsers(Db * db);
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucoreversion
|
||||
#define headerfilecmslucoreversion
|
||||
#ifndef headerfile_winix_core_version
|
||||
#define headerfile_winix_core_version
|
||||
|
||||
|
||||
#define WINIX_VER_MAJOR 0
|
||||
|
||||
Reference in New Issue
Block a user