From a589e5a09077039a8639d0a3c91864929108dff1 Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Sat, 18 Sep 2010 00:51:12 +0000 Subject: [PATCH] added: TextStream a class similar to std::ostringstream but with a Clear() method the dynamic allocated buffer can be easily reused added: DbTextStream a special version of a stream used to create a database string query everything is escaped by default added: DbBase a base class with some basic methods for communicating with the database added: DbConn a class for managing connection to the database changed: some refactoring in Db class git-svn-id: svn://ttmath.org/publicrep/winix/trunk@655 e52654a7-88a9-db11-a3e9-0013d4bc506e --- Makefile | 5 +- core/Makefile.dep | 308 ++++---- core/Makefile.o.dep | 2 +- core/app.cpp | 7 +- core/app.h | 4 +- core/config.cpp | 1 + core/config.h | 4 + core/dirs.h | 2 +- core/groups.h | 2 +- core/mounts.cpp | 2 +- core/mounts.h | 2 +- core/system.h | 2 +- core/textstream.cpp | 126 +++ core/textstream.h | 47 ++ core/users.h | 2 +- db/Makefile | 22 + db/Makefile.dep | 15 + db/Makefile.o.dep | 1 + db/db.cpp | 1424 ++++++++++++++-------------------- db/db.h | 169 +--- db/db_itemcolumns.cpp | 99 --- db/dbbase.cpp | 301 +++++++ db/dbbase.h | 75 ++ db/dbconn.cpp | 153 ++++ db/dbconn.h | 55 ++ db/dbitemcolumns.cpp | 66 ++ db/dbitemcolumns.h | 50 ++ db/dbitemquery.cpp | 97 +++ db/dbitemquery.h | 67 ++ db/dbtextstream.cpp | 364 +++++++++ db/dbtextstream.h | 144 ++++ functions/Makefile.dep | 1014 +++++++++++++----------- functions/cp.h | 2 +- functions/functionbase.h | 2 +- functions/functionparser.h | 2 +- functions/funthread.cpp | 2 +- functions/funticket.cpp | 2 +- functions/ls.cpp | 2 +- functions/mv.cpp | 2 +- functions/mv.h | 2 +- functions/privchanger.cpp | 2 +- functions/privchanger.h | 2 +- functions/rm.h | 2 +- main/Makefile.dep | 47 +- main/main.cpp | 5 +- plugins/stats/Makefile.dep | 77 +- plugins/stats/init.cpp | 4 +- templates/Makefile.dep | 359 +++++---- templates/templates.cpp | 1 + templates/templates.h | 3 +- templates/user.cpp | 11 + templatesnotify/Makefile.dep | 13 +- 52 files changed, 3261 insertions(+), 1913 deletions(-) create mode 100755 core/textstream.cpp create mode 100755 core/textstream.h create mode 100755 db/Makefile create mode 100755 db/Makefile.dep create mode 100755 db/Makefile.o.dep delete mode 100755 db/db_itemcolumns.cpp create mode 100755 db/dbbase.cpp create mode 100755 db/dbbase.h create mode 100755 db/dbconn.cpp create mode 100755 db/dbconn.h create mode 100755 db/dbitemcolumns.cpp create mode 100755 db/dbitemcolumns.h create mode 100755 db/dbitemquery.cpp create mode 100755 db/dbitemquery.h create mode 100755 db/dbtextstream.cpp create mode 100755 db/dbtextstream.h diff --git a/Makefile b/Makefile index 9f1842c..161c221 100755 --- a/Makefile +++ b/Makefile @@ -19,12 +19,13 @@ all: winix winix: FORCE @cd core ; $(MAKE) -e + @cd db ; $(MAKE) -e @cd functions ; $(MAKE) -e @cd templates ; $(MAKE) -e @cd templatesnotify ; $(MAKE) -e @cd plugins/stats ; $(MAKE) -e @cd ../ezc/src ; $(MAKE) -e - $(CXX) -shared -o winix.so $(CXXFLAGS) core/*.o functions/*.o templates/*.o templatesnotify/*.o ../ezc/src/ezc.a -lfcgi -lpq -lz -lpthread + $(CXX) -shared -o winix.so $(CXXFLAGS) core/*.o db/*.o functions/*.o templates/*.o templatesnotify/*.o ../ezc/src/ezc.a -lfcgi -lpq -lz -lpthread @cd main ; $(MAKE) -e # use the full path with winix.so $(CXX) -o winix $(CXXFLAGS) main/*.o /home/tomek/roboczy/winix/winix.so @@ -33,6 +34,7 @@ winix: FORCE clean: @cd core ; $(MAKE) -e clean + @cd db ; $(MAKE) -e clean @cd functions ; $(MAKE) -e clean @cd templates ; $(MAKE) -e clean @cd templatesnotify ; $(MAKE) -e clean @@ -48,6 +50,7 @@ FORCE: depend: @cd core ; $(MAKE) -e depend + @cd db ; $(MAKE) -e depend @cd functions ; $(MAKE) -e depend @cd templates ; $(MAKE) -e depend @cd templatesnotify ; $(MAKE) -e depend diff --git a/core/Makefile.dep b/core/Makefile.dep index e9764ab..bbe419c 100755 --- a/core/Makefile.dep +++ b/core/Makefile.dep @@ -2,16 +2,19 @@ acceptbaseparser.o: acceptbaseparser.h app.o: app.h config.h confparser.h htmlfilter.h system.h dirs.h item.h -app.o: dircontainer.h db.h user.h group.h thread.h error.h log.h -app.o: ugcontainer.h ticket.h request.h requesttypes.h session.h plugindata.h -app.o: rebus.h mounts.h mount.h mountparser.h users.h lastcontainer.h -app.o: groups.h loadavg.h sessionmanager.h sessioncontainer.h notify.h +app.o: dircontainer.h ../db/db.h ../db/dbbase.h ../db/dbconn.h +app.o: ../db/dbtextstream.h ../core/textstream.h ../db/dbitemquery.h +app.o: ../core/item.h ../db/dbitemcolumns.h ../core/user.h ../core/group.h +app.o: ../core/thread.h ../core/error.h log.h ../core/dircontainer.h +app.o: ../core/ugcontainer.h ../core/ticket.h request.h requesttypes.h +app.o: session.h error.h user.h plugindata.h rebus.h mounts.h mount.h +app.o: mountparser.h users.h ugcontainer.h lastcontainer.h groups.h group.h +app.o: loadavg.h sessionmanager.h sessioncontainer.h notify.h app.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h app.o: ../core/mount.h ../core/locale.h ../core/config.h ../templates/misc.h app.o: ../templates/localefilter.h ../core/locale.h ../functions/functions.h -app.o: ../functions/functionbase.h ../core/item.h ../core/db.h -app.o: ../core/request.h ../core/system.h ../core/notify.h -app.o: ../functions/functionparser.h ../functions/adduser.h +app.o: ../functions/functionbase.h ../core/request.h ../core/system.h +app.o: ../core/notify.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/createthread.h ../functions/createticket.h @@ -21,12 +24,11 @@ app.o: ../functions/login.h ../functions/logout.h ../functions/ls.h app.o: ../functions/mkdir.h ../functions/mv.h ../functions/node.h app.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h app.o: ../functions/run.h ../functions/subject.h ../functions/funthread.h -app.o: ../core/thread.h ../functions/funticket.h ../core/ticket.h -app.o: ../functions/template.h ../functions/tinymce.h ../functions/uname.h -app.o: ../functions/upload.h ../functions/uptime.h ../functions/who.h -app.o: ../core/htmlfilter.h ../templates/templates.h -app.o: ../templates/patterncacher.h ../core/item.h misc.h -app.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h +app.o: ../functions/funticket.h ../functions/template.h +app.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h +app.o: ../functions/uptime.h ../functions/who.h ../core/htmlfilter.h +app.o: ../templates/templates.h ../templates/patterncacher.h ../core/item.h +app.o: misc.h ../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 @@ -35,11 +37,15 @@ bbcodeparser.o: bbcodeparser.h htmlfilter.h compress.o: compress.h log.h config.o: config.h confparser.h htmlfilter.h log.h plugin.h pluginmsg.h config.o: plugindata.h request.h requesttypes.h session.h item.h error.h -config.o: user.h rebus.h system.h dirs.h dircontainer.h db.h group.h thread.h -config.o: ugcontainer.h ticket.h mounts.h mount.h mountparser.h users.h -config.o: lastcontainer.h groups.h loadavg.h sessionmanager.h -config.o: sessioncontainer.h ../functions/functions.h -config.o: ../functions/functionbase.h ../core/item.h ../core/db.h +config.o: user.h rebus.h system.h dirs.h dircontainer.h ../db/db.h +config.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +config.o: ../core/textstream.h ../db/dbitemquery.h ../core/item.h +config.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h +config.o: ../core/thread.h ../core/error.h ../core/dircontainer.h +config.o: ../core/ugcontainer.h ../core/ticket.h mounts.h mount.h +config.o: mountparser.h users.h ugcontainer.h lastcontainer.h groups.h +config.o: group.h loadavg.h sessionmanager.h sessioncontainer.h +config.o: ../functions/functions.h ../functions/functionbase.h config.o: ../core/request.h ../core/config.h ../core/system.h config.o: ../core/notify.h ../../ezc/src/ezc.h ../functions/functionparser.h config.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h @@ -52,30 +58,32 @@ config.o: ../functions/login.h ../functions/logout.h ../functions/ls.h config.o: ../functions/mkdir.h ../functions/mv.h ../functions/node.h config.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h config.o: ../functions/run.h ../functions/subject.h ../functions/funthread.h -config.o: ../core/thread.h ../functions/funticket.h ../core/ticket.h -config.o: ../functions/template.h ../functions/tinymce.h ../functions/uname.h -config.o: ../functions/upload.h ../functions/uptime.h ../functions/who.h -config.o: ../core/htmlfilter.h ../templates/templates.h -config.o: ../templates/patterncacher.h ../core/item.h misc.h -config.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h -config.o: ../core/log.h ../templates/indexpatterns.h -config.o: ../templates/localefilter.h ../core/locale.h ../core/locale.h -config.o: ../core/sessionmanager.h +config.o: ../functions/funticket.h ../functions/template.h +config.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h +config.o: ../functions/uptime.h ../functions/who.h ../core/htmlfilter.h +config.o: ../templates/templates.h ../templates/patterncacher.h +config.o: ../core/item.h misc.h ../templates/ckeditorgetparser.h +config.o: ../core/httpsimpleparser.h ../core/log.h +config.o: ../templates/indexpatterns.h ../templates/localefilter.h +config.o: ../core/locale.h ../core/locale.h ../core/sessionmanager.h confparser.o: confparser.h misc.h item.h -db.o: db.h item.h user.h group.h thread.h error.h log.h dircontainer.h -db.o: ugcontainer.h ticket.h misc.h -db_itemcolumns.o: db.h item.h user.h group.h thread.h error.h log.h -db_itemcolumns.o: dircontainer.h ugcontainer.h ticket.h dircontainer.o: dircontainer.h item.h log.h -dirs.o: dirs.h item.h dircontainer.h db.h user.h group.h thread.h error.h -dirs.o: log.h ugcontainer.h ticket.h request.h requesttypes.h session.h -dirs.o: plugindata.h rebus.h config.h confparser.h htmlfilter.h notify.h -dirs.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h -dirs.o: ../core/mount.h ../core/locale.h ../core/config.h ../templates/misc.h -dirs.o: ../templates/localefilter.h ../core/locale.h system.h mounts.h -dirs.o: mount.h mountparser.h users.h lastcontainer.h groups.h loadavg.h -groups.o: groups.h group.h ugcontainer.h log.h db.h item.h user.h thread.h -groups.o: error.h dircontainer.h ticket.h +dirs.o: dirs.h item.h dircontainer.h ../db/db.h ../db/dbbase.h ../db/dbconn.h +dirs.o: ../db/dbtextstream.h ../core/textstream.h ../db/dbitemquery.h +dirs.o: ../core/item.h ../db/dbitemcolumns.h ../core/user.h ../core/group.h +dirs.o: ../core/thread.h ../core/error.h log.h ../core/dircontainer.h +dirs.o: ../core/ugcontainer.h ../core/ticket.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 notify.h ../templatesnotify/templatesnotify.h +dirs.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h ../core/config.h +dirs.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h +dirs.o: system.h mounts.h mount.h mountparser.h users.h ugcontainer.h +dirs.o: lastcontainer.h groups.h group.h loadavg.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 +groups.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h +groups.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h +groups.o: log.h ../core/dircontainer.h ../core/ugcontainer.h ../core/ticket.h htmlfilter.o: htmlfilter.h httpsimpleparser.o: httpsimpleparser.h lastcontainer.o: lastcontainer.h log.h @@ -84,22 +92,29 @@ locale.o: locale.h confparser.h log.h log.o: log.h misc.o: misc.h item.h log.h mount.o: mount.h -mountparser.o: mountparser.h mount.h item.h error.h log.h dirs.h -mountparser.o: dircontainer.h db.h user.h group.h thread.h ugcontainer.h -mountparser.o: ticket.h request.h requesttypes.h session.h plugindata.h -mountparser.o: rebus.h config.h confparser.h htmlfilter.h misc.h -mounts.o: mounts.h mount.h error.h log.h dirs.h item.h dircontainer.h db.h -mounts.o: user.h group.h thread.h ugcontainer.h ticket.h request.h -mounts.o: requesttypes.h session.h plugindata.h rebus.h config.h confparser.h +mountparser.o: mountparser.h mount.h item.h error.h dirs.h dircontainer.h +mountparser.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +mountparser.o: ../core/textstream.h ../db/dbitemquery.h ../core/item.h +mountparser.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h +mountparser.o: ../core/thread.h ../core/error.h log.h ../core/dircontainer.h +mountparser.o: ../core/ugcontainer.h ../core/ticket.h request.h +mountparser.o: requesttypes.h session.h user.h plugindata.h rebus.h config.h +mountparser.o: confparser.h htmlfilter.h misc.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 ../db/dbitemquery.h ../core/item.h +mounts.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h +mounts.o: ../core/thread.h ../core/error.h log.h ../core/dircontainer.h +mounts.o: ../core/ugcontainer.h ../core/ticket.h request.h requesttypes.h +mounts.o: session.h user.h plugindata.h rebus.h config.h confparser.h mounts.o: htmlfilter.h mountparser.h plugin.h pluginmsg.h system.h users.h -mounts.o: lastcontainer.h groups.h loadavg.h sessionmanager.h -mounts.o: sessioncontainer.h ../functions/functions.h -mounts.o: ../functions/functionbase.h ../core/item.h ../core/db.h -mounts.o: ../core/request.h ../core/config.h ../core/system.h -mounts.o: ../core/notify.h ../../ezc/src/ezc.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 +mounts.o: ugcontainer.h lastcontainer.h groups.h group.h loadavg.h +mounts.o: sessionmanager.h sessioncontainer.h ../functions/functions.h +mounts.o: ../functions/functionbase.h ../core/request.h ../core/config.h +mounts.o: ../core/system.h ../core/notify.h ../../ezc/src/ezc.h +mounts.o: ../functions/functionparser.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/createthread.h ../functions/createticket.h mounts.o: ../functions/default.h ../functions/download.h mounts.o: ../functions/editticket.h ../functions/emacs.h ../functions/last.h @@ -107,30 +122,37 @@ mounts.o: ../functions/login.h ../functions/logout.h ../functions/ls.h mounts.o: ../functions/mkdir.h ../functions/mv.h ../functions/node.h mounts.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h mounts.o: ../functions/run.h ../functions/subject.h ../functions/funthread.h -mounts.o: ../core/thread.h ../functions/funticket.h ../core/ticket.h -mounts.o: ../functions/template.h ../functions/tinymce.h ../functions/uname.h -mounts.o: ../functions/upload.h ../functions/uptime.h ../functions/who.h -mounts.o: ../core/htmlfilter.h ../templates/templates.h -mounts.o: ../templates/patterncacher.h ../core/item.h misc.h -mounts.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h -mounts.o: ../core/log.h ../templates/indexpatterns.h -mounts.o: ../templates/localefilter.h ../core/locale.h ../core/locale.h -mounts.o: ../core/sessionmanager.h +mounts.o: ../functions/funticket.h ../functions/template.h +mounts.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h +mounts.o: ../functions/uptime.h ../functions/who.h ../core/htmlfilter.h +mounts.o: ../templates/templates.h ../templates/patterncacher.h +mounts.o: ../core/item.h misc.h ../templates/ckeditorgetparser.h +mounts.o: ../core/httpsimpleparser.h ../core/log.h +mounts.o: ../templates/indexpatterns.h ../templates/localefilter.h +mounts.o: ../core/locale.h ../core/locale.h ../core/sessionmanager.h notify.o: log.h notify.h ../templatesnotify/templatesnotify.h notify.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h confparser.h notify.o: ../core/config.h ../templates/misc.h ../templates/localefilter.h notify.o: ../core/locale.h request.h requesttypes.h session.h item.h error.h notify.o: user.h plugindata.h rebus.h config.h htmlfilter.h system.h dirs.h -notify.o: dircontainer.h db.h group.h thread.h ugcontainer.h ticket.h -notify.o: mounts.h mount.h mountparser.h users.h lastcontainer.h groups.h -notify.o: loadavg.h misc.h +notify.o: dircontainer.h ../db/db.h ../db/dbbase.h ../db/dbconn.h +notify.o: ../db/dbtextstream.h ../core/textstream.h ../db/dbitemquery.h +notify.o: ../core/item.h ../db/dbitemcolumns.h ../core/user.h ../core/group.h +notify.o: ../core/thread.h ../core/error.h ../core/dircontainer.h +notify.o: ../core/ugcontainer.h ../core/ticket.h mounts.h mount.h +notify.o: mountparser.h users.h ugcontainer.h lastcontainer.h groups.h +notify.o: group.h loadavg.h misc.h plugin.o: plugin.h pluginmsg.h log.h plugindata.h config.h confparser.h plugin.o: htmlfilter.h request.h requesttypes.h session.h item.h error.h -plugin.o: user.h rebus.h system.h dirs.h dircontainer.h db.h group.h thread.h -plugin.o: ugcontainer.h ticket.h mounts.h mount.h mountparser.h users.h -plugin.o: lastcontainer.h groups.h loadavg.h sessionmanager.h -plugin.o: sessioncontainer.h ../functions/functions.h -plugin.o: ../functions/functionbase.h ../core/item.h ../core/db.h +plugin.o: user.h rebus.h system.h dirs.h dircontainer.h ../db/db.h +plugin.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +plugin.o: ../core/textstream.h ../db/dbitemquery.h ../core/item.h +plugin.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h +plugin.o: ../core/thread.h ../core/error.h ../core/dircontainer.h +plugin.o: ../core/ugcontainer.h ../core/ticket.h mounts.h mount.h +plugin.o: mountparser.h users.h ugcontainer.h lastcontainer.h groups.h +plugin.o: group.h loadavg.h sessionmanager.h sessioncontainer.h +plugin.o: ../functions/functions.h ../functions/functionbase.h plugin.o: ../core/request.h ../core/config.h ../core/system.h plugin.o: ../core/notify.h ../../ezc/src/ezc.h ../functions/functionparser.h plugin.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h @@ -143,22 +165,25 @@ plugin.o: ../functions/login.h ../functions/logout.h ../functions/ls.h plugin.o: ../functions/mkdir.h ../functions/mv.h ../functions/node.h plugin.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h plugin.o: ../functions/run.h ../functions/subject.h ../functions/funthread.h -plugin.o: ../core/thread.h ../functions/funticket.h ../core/ticket.h -plugin.o: ../functions/template.h ../functions/tinymce.h ../functions/uname.h -plugin.o: ../functions/upload.h ../functions/uptime.h ../functions/who.h -plugin.o: ../core/htmlfilter.h ../templates/templates.h -plugin.o: ../templates/patterncacher.h ../core/item.h misc.h -plugin.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h -plugin.o: ../core/log.h ../templates/indexpatterns.h -plugin.o: ../templates/localefilter.h ../core/locale.h ../core/locale.h -plugin.o: ../core/sessionmanager.h +plugin.o: ../functions/funticket.h ../functions/template.h +plugin.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h +plugin.o: ../functions/uptime.h ../functions/who.h ../core/htmlfilter.h +plugin.o: ../templates/templates.h ../templates/patterncacher.h +plugin.o: ../core/item.h misc.h ../templates/ckeditorgetparser.h +plugin.o: ../core/httpsimpleparser.h ../core/log.h +plugin.o: ../templates/indexpatterns.h ../templates/localefilter.h +plugin.o: ../core/locale.h ../core/locale.h ../core/sessionmanager.h plugindata.o: plugindata.h plugin.h pluginmsg.h log.h config.h confparser.h plugindata.o: htmlfilter.h request.h requesttypes.h session.h item.h error.h -plugindata.o: user.h rebus.h system.h dirs.h dircontainer.h db.h group.h -plugindata.o: thread.h ugcontainer.h ticket.h mounts.h mount.h mountparser.h -plugindata.o: users.h lastcontainer.h groups.h loadavg.h sessionmanager.h -plugindata.o: sessioncontainer.h ../functions/functions.h -plugindata.o: ../functions/functionbase.h ../core/item.h ../core/db.h +plugindata.o: user.h rebus.h system.h dirs.h dircontainer.h ../db/db.h +plugindata.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +plugindata.o: ../core/textstream.h ../db/dbitemquery.h ../core/item.h +plugindata.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h +plugindata.o: ../core/thread.h ../core/error.h ../core/dircontainer.h +plugindata.o: ../core/ugcontainer.h ../core/ticket.h mounts.h mount.h +plugindata.o: mountparser.h users.h ugcontainer.h lastcontainer.h groups.h +plugindata.o: group.h loadavg.h sessionmanager.h sessioncontainer.h +plugindata.o: ../functions/functions.h ../functions/functionbase.h plugindata.o: ../core/request.h ../core/config.h ../core/system.h plugindata.o: ../core/notify.h ../../ezc/src/ezc.h plugindata.o: ../functions/functionparser.h ../functions/adduser.h @@ -172,8 +197,7 @@ plugindata.o: ../functions/last.h ../functions/login.h ../functions/logout.h plugindata.o: ../functions/ls.h ../functions/mkdir.h ../functions/mv.h plugindata.o: ../functions/node.h ../functions/priv.h ../functions/reload.h plugindata.o: ../functions/rm.h ../functions/run.h ../functions/subject.h -plugindata.o: ../functions/funthread.h ../core/thread.h -plugindata.o: ../functions/funticket.h ../core/ticket.h +plugindata.o: ../functions/funthread.h ../functions/funticket.h plugindata.o: ../functions/template.h ../functions/tinymce.h plugindata.o: ../functions/uname.h ../functions/upload.h plugindata.o: ../functions/uptime.h ../functions/who.h ../core/htmlfilter.h @@ -182,17 +206,21 @@ plugindata.o: ../core/item.h misc.h ../templates/ckeditorgetparser.h plugindata.o: ../core/httpsimpleparser.h ../core/log.h plugindata.o: ../templates/indexpatterns.h ../templates/localefilter.h plugindata.o: ../core/locale.h ../core/locale.h ../core/sessionmanager.h -postmultiparser.o: postmultiparser.h error.h log.h requesttypes.h config.h -postmultiparser.o: confparser.h htmlfilter.h +postmultiparser.o: postmultiparser.h error.h requesttypes.h config.h +postmultiparser.o: confparser.h htmlfilter.h log.h rebus.o: log.h rebus.h misc.h item.h request.h requesttypes.h session.h rebus.o: error.h user.h plugindata.h config.h confparser.h htmlfilter.h -request.o: request.h requesttypes.h session.h item.h error.h log.h user.h -request.o: plugindata.h rebus.h config.h confparser.h htmlfilter.h plugin.h -request.o: pluginmsg.h system.h dirs.h dircontainer.h db.h group.h thread.h -request.o: ugcontainer.h ticket.h mounts.h mount.h mountparser.h users.h -request.o: lastcontainer.h groups.h loadavg.h sessionmanager.h -request.o: sessioncontainer.h ../functions/functions.h -request.o: ../functions/functionbase.h ../core/item.h ../core/db.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 log.h +request.o: plugin.h pluginmsg.h system.h dirs.h dircontainer.h ../db/db.h +request.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +request.o: ../core/textstream.h ../db/dbitemquery.h ../core/item.h +request.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h +request.o: ../core/thread.h ../core/error.h ../core/dircontainer.h +request.o: ../core/ugcontainer.h ../core/ticket.h mounts.h mount.h +request.o: mountparser.h users.h ugcontainer.h lastcontainer.h groups.h +request.o: group.h loadavg.h sessionmanager.h sessioncontainer.h +request.o: ../functions/functions.h ../functions/functionbase.h request.o: ../core/request.h ../core/config.h ../core/system.h request.o: ../core/notify.h ../../ezc/src/ezc.h ../functions/functionparser.h request.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h @@ -205,26 +233,29 @@ request.o: ../functions/login.h ../functions/logout.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/subject.h ../functions/funthread.h -request.o: ../core/thread.h ../functions/funticket.h ../core/ticket.h -request.o: ../functions/template.h ../functions/tinymce.h -request.o: ../functions/uname.h ../functions/upload.h ../functions/uptime.h -request.o: ../functions/who.h ../core/htmlfilter.h ../templates/templates.h -request.o: ../templates/patterncacher.h ../core/item.h misc.h -request.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h -request.o: ../core/log.h ../templates/indexpatterns.h -request.o: ../templates/localefilter.h ../core/locale.h ../core/locale.h -request.o: ../core/sessionmanager.h -session.o: session.h item.h error.h log.h user.h plugindata.h rebus.h -sessioncontainer.o: sessioncontainer.h session.h item.h error.h log.h user.h -sessioncontainer.o: plugindata.h rebus.h lastcontainer.h +request.o: ../functions/funticket.h ../functions/template.h +request.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h +request.o: ../functions/uptime.h ../functions/who.h ../core/htmlfilter.h +request.o: ../templates/templates.h ../templates/patterncacher.h +request.o: ../core/item.h misc.h ../templates/ckeditorgetparser.h +request.o: ../core/httpsimpleparser.h ../core/log.h +request.o: ../templates/indexpatterns.h ../templates/localefilter.h +request.o: ../core/locale.h ../core/locale.h ../core/sessionmanager.h +session.o: session.h item.h error.h user.h plugindata.h rebus.h +sessioncontainer.o: sessioncontainer.h session.h item.h error.h user.h +sessioncontainer.o: plugindata.h rebus.h lastcontainer.h log.h sessionmanager.o: sessionmanager.h sessioncontainer.h session.h item.h -sessionmanager.o: error.h log.h user.h plugindata.h rebus.h lastcontainer.h +sessionmanager.o: error.h user.h plugindata.h rebus.h lastcontainer.h sessionmanager.o: config.h confparser.h htmlfilter.h request.h requesttypes.h -sessionmanager.o: system.h dirs.h dircontainer.h db.h group.h thread.h -sessionmanager.o: ugcontainer.h ticket.h mounts.h mount.h mountparser.h -sessionmanager.o: users.h groups.h loadavg.h sessionparser.h plugin.h -sessionmanager.o: pluginmsg.h ../functions/functions.h -sessionmanager.o: ../functions/functionbase.h ../core/item.h ../core/db.h +sessionmanager.o: system.h dirs.h dircontainer.h ../db/db.h ../db/dbbase.h +sessionmanager.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +sessionmanager.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h +sessionmanager.o: ../core/user.h ../core/group.h ../core/thread.h +sessionmanager.o: ../core/error.h log.h ../core/dircontainer.h +sessionmanager.o: ../core/ugcontainer.h ../core/ticket.h mounts.h mount.h +sessionmanager.o: mountparser.h users.h ugcontainer.h groups.h group.h +sessionmanager.o: loadavg.h sessionparser.h plugin.h pluginmsg.h +sessionmanager.o: ../functions/functions.h ../functions/functionbase.h sessionmanager.o: ../core/request.h ../core/config.h ../core/system.h sessionmanager.o: ../core/notify.h ../../ezc/src/ezc.h sessionmanager.o: ../functions/functionparser.h ../functions/adduser.h @@ -239,8 +270,7 @@ sessionmanager.o: ../functions/logout.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/subject.h -sessionmanager.o: ../functions/funthread.h ../core/thread.h -sessionmanager.o: ../functions/funticket.h ../core/ticket.h +sessionmanager.o: ../functions/funthread.h ../functions/funticket.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 @@ -250,20 +280,32 @@ sessionmanager.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h sessionmanager.o: ../core/log.h ../templates/indexpatterns.h sessionmanager.o: ../templates/localefilter.h ../core/locale.h sessionmanager.o: ../core/locale.h ../core/sessionmanager.h -sessionparser.o: sessionparser.h session.h item.h error.h log.h user.h -sessionparser.o: plugindata.h rebus.h sessioncontainer.h lastcontainer.h -sessionparser.o: users.h ugcontainer.h request.h requesttypes.h config.h -sessionparser.o: confparser.h htmlfilter.h db.h group.h thread.h -sessionparser.o: dircontainer.h ticket.h -system.o: system.h dirs.h item.h dircontainer.h db.h user.h group.h thread.h -system.o: error.h log.h ugcontainer.h ticket.h request.h requesttypes.h -system.o: session.h plugindata.h rebus.h config.h confparser.h htmlfilter.h -system.o: mounts.h mount.h mountparser.h users.h lastcontainer.h groups.h -system.o: loadavg.h misc.h notify.h ../templatesnotify/templatesnotify.h -system.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h -system.o: ../core/config.h ../templates/misc.h ../templates/localefilter.h -system.o: ../core/locale.h -users.o: users.h user.h ugcontainer.h log.h lastcontainer.h request.h +sessionparser.o: sessionparser.h session.h item.h error.h user.h plugindata.h +sessionparser.o: rebus.h sessioncontainer.h lastcontainer.h users.h +sessionparser.o: ugcontainer.h request.h requesttypes.h config.h confparser.h +sessionparser.o: htmlfilter.h ../db/db.h ../db/dbbase.h ../db/dbconn.h +sessionparser.o: ../db/dbtextstream.h ../core/textstream.h +sessionparser.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h +sessionparser.o: ../core/user.h ../core/group.h ../core/thread.h +sessionparser.o: ../core/error.h log.h ../core/dircontainer.h +sessionparser.o: ../core/ugcontainer.h ../core/ticket.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 +system.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h +system.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h +system.o: log.h ../core/dircontainer.h ../core/ugcontainer.h ../core/ticket.h +system.o: request.h requesttypes.h session.h error.h user.h plugindata.h +system.o: rebus.h config.h confparser.h htmlfilter.h mounts.h mount.h +system.o: mountparser.h users.h ugcontainer.h lastcontainer.h groups.h +system.o: group.h loadavg.h misc.h notify.h +system.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h +system.o: ../core/mount.h ../core/locale.h ../core/config.h +system.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h +textstream.o: textstream.h +users.o: users.h user.h ugcontainer.h lastcontainer.h request.h users.o: requesttypes.h session.h item.h error.h plugindata.h rebus.h -users.o: config.h confparser.h htmlfilter.h db.h group.h thread.h -users.o: dircontainer.h ticket.h +users.o: config.h confparser.h htmlfilter.h ../db/db.h ../db/dbbase.h +users.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +users.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h +users.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h +users.o: log.h ../core/dircontainer.h ../core/ugcontainer.h ../core/ticket.h diff --git a/core/Makefile.o.dep b/core/Makefile.o.dep index 1d9ae3d..1931ac7 100755 --- a/core/Makefile.o.dep +++ b/core/Makefile.o.dep @@ -1 +1 @@ -o = acceptbaseparser.o app.o bbcodeparser.o compress.o config.o confparser.o db.o db_itemcolumns.o dircontainer.o dirs.o groups.o htmlfilter.o httpsimpleparser.o lastcontainer.o loadavg.o locale.o log.o misc.o mount.o mountparser.o mounts.o notify.o plugin.o plugindata.o postmultiparser.o rebus.o request.o session.o sessioncontainer.o sessionmanager.o sessionparser.o system.o users.o +o = acceptbaseparser.o app.o bbcodeparser.o compress.o config.o confparser.o dircontainer.o dirs.o groups.o htmlfilter.o httpsimpleparser.o lastcontainer.o loadavg.o locale.o log.o misc.o mount.o mountparser.o mounts.o notify.o plugin.o plugindata.o postmultiparser.o rebus.o request.o session.o sessioncontainer.o sessionmanager.o sessionparser.o system.o textstream.o users.o diff --git a/core/app.cpp b/core/app.cpp index 7c7c0b0..2e52d4f 100755 --- a/core/app.cpp +++ b/core/app.cpp @@ -21,6 +21,8 @@ App::App() stdout_is_closed = false; last_sessions_save = time(0); + db.SetConn(db_conn); + plugin.SetDb(&db); plugin.SetConfig(&config); plugin.SetRequest(&request); @@ -131,8 +133,9 @@ return true; bool App::Init() { - db.Init(config.db_database, config.db_user, config.db_pass); - db.WaitForConnection(); + db_conn.SetConnParam(config.db_database, config.db_user, config.db_pass); + db_conn.WaitForConnection(); + db.LogQueries(config.log_db_query); if( !CreateFCGISocket() ) return false; diff --git a/core/app.h b/core/app.h index 48c10a3..0074b51 100755 --- a/core/app.h +++ b/core/app.h @@ -25,7 +25,7 @@ #include "request.h" #include "sessionmanager.h" #include "notify.h" -#include "db.h" +#include "db/db.h" #include "functions/functions.h" #include "templates/templates.h" #include "templatesnotify/templatesnotify.h" @@ -67,7 +67,7 @@ public: // database Db db; - + DbConn db_conn; diff --git a/core/config.cpp b/core/config.cpp index e2ea44a..7c8e22a 100755 --- a/core/config.cpp +++ b/core/config.cpp @@ -99,6 +99,7 @@ void Config::AssignValues(bool stdout_is_closed) log_level = Int("log_level", 1); log_request = Int("log_request", 1); log_stdout = Bool("log_stdout", false); + log_db_query = Bool("log_db_query", false); post_file_max = Int("post_file_max", 8388608); // 8 MB auth_simplefs_dir = Text("auth_simplefs_dir"); diff --git a/core/config.h b/core/config.h index 3a5924f..3a73cdc 100755 --- a/core/config.h +++ b/core/config.h @@ -39,6 +39,10 @@ public: // default: 1 int log_request; + // logging db queries + // default: false + bool log_db_query; + // request delimiter in the log file, default "---------" std::string log_delimiter; diff --git a/core/dirs.h b/core/dirs.h index 7ef3741..b44d8bc 100755 --- a/core/dirs.h +++ b/core/dirs.h @@ -17,7 +17,7 @@ #include "item.h" #include "dircontainer.h" -#include "db.h" +#include "db/db.h" #include "request.h" diff --git a/core/groups.h b/core/groups.h index a269a67..6f4d957 100755 --- a/core/groups.h +++ b/core/groups.h @@ -14,7 +14,7 @@ #include "group.h" #include "ugcontainer.h" -#include "db.h" +#include "db/db.h" diff --git a/core/mounts.cpp b/core/mounts.cpp index a875052..bbedd51 100755 --- a/core/mounts.cpp +++ b/core/mounts.cpp @@ -10,7 +10,7 @@ #include "mounts.h" #include "request.h" #include "log.h" -#include "db.h" +#include "db/db.h" #include "plugin.h" diff --git a/core/mounts.h b/core/mounts.h index 8d9e604..a2aa3c9 100755 --- a/core/mounts.h +++ b/core/mounts.h @@ -18,7 +18,7 @@ #include "mount.h" #include "error.h" #include "dirs.h" -#include "db.h" +#include "db/db.h" #include "request.h" #include "mountparser.h" diff --git a/core/system.h b/core/system.h index 95eb398..0ee0bc9 100755 --- a/core/system.h +++ b/core/system.h @@ -13,7 +13,7 @@ #include "dirs.h" #include "mounts.h" -#include "db.h" +#include "db/db.h" #include "request.h" #include "config.h" #include "users.h" diff --git a/core/textstream.cpp b/core/textstream.cpp new file mode 100755 index 0000000..10c7bfc --- /dev/null +++ b/core/textstream.cpp @@ -0,0 +1,126 @@ +/* + * This file is a part of Winix + * and is not publicly distributed + * + * Copyright (c) 2010, Tomasz Sowa + * All rights reserved. + * + */ + +#include "textstream.h" + + + + +void TextStream::Clear() +{ + buffer.clear(); +} + +const std::string & TextStream::Str() const +{ + return buffer; +} + + +const char * TextStream::CStr() const +{ + return buffer.c_str(); +} + + + +TextStream & TextStream::operator<<(const char * str) +{ + buffer += str; + +return *this; +} + +TextStream & TextStream::operator<<(const std::string * str) +{ + buffer += *str; + +return *this; +} + +TextStream & TextStream::operator<<(const std::string & str) +{ + buffer += str; + +return *this; +} + +TextStream & TextStream::operator<<(char v) +{ + buffer += v; + +return *this; +} + + +TextStream & TextStream::operator<<(int v) +{ +char buf[50]; + + sprintf(buf, "%d", v); + buffer += buf; + +return *this; +} + + +TextStream & TextStream::operator<<(long v) +{ +char buf[50]; + + sprintf(buf, "%ld", v); + buffer += buf; + +return *this; +} + + +TextStream & TextStream::operator<<(unsigned int v) +{ +char buf[50]; + + sprintf(buf, "%u", v); + buffer += buf; + +return *this; +} + + +TextStream & TextStream::operator<<(unsigned long v) +{ +char buf[50]; + + sprintf(buf, "%lu", v); + buffer += buf; + +return *this; +} + + +TextStream & TextStream::operator<<(double v) +{ +char buf[50]; + + sprintf(buf, "%f", v); + buffer += buf; + +return *this; +} + + +TextStream & TextStream::operator<<(const void * v) +{ +char buf[50]; + + sprintf(buf, "%p", v); + buffer += buf; + +return *this; +} + diff --git a/core/textstream.h b/core/textstream.h new file mode 100755 index 0000000..98bd47e --- /dev/null +++ b/core/textstream.h @@ -0,0 +1,47 @@ +/* + * This file is a part of Winix + * and is not publicly distributed + * + * Copyright (c) 2010, Tomasz Sowa + * All rights reserved. + * + */ + +#ifndef headerfile_winix_core_textstream +#define headerfile_winix_core_textstream + +#include + + + +class TextStream +{ +public: + + void Clear(); + const std::string & Str() const; + const char * CStr() const; + + TextStream & operator<<(const char * str); + TextStream & operator<<(const std::string * str); + TextStream & operator<<(const std::string & str); + + TextStream & operator<<(char); + TextStream & operator<<(int); + TextStream & operator<<(long); + TextStream & operator<<(unsigned int); + TextStream & operator<<(unsigned long); + TextStream & operator<<(double); + TextStream & operator<<(const void *);// printing a pointer + +protected: + + std::string buffer; + +}; + + + + +#endif + diff --git a/core/users.h b/core/users.h index 3a82fad..fb18f1b 100755 --- a/core/users.h +++ b/core/users.h @@ -15,7 +15,7 @@ #include "ugcontainer.h" #include "lastcontainer.h" #include "request.h" -#include "db.h" +#include "db/db.h" class Users diff --git a/db/Makefile b/db/Makefile new file mode 100755 index 0000000..98f1f52 --- /dev/null +++ b/db/Makefile @@ -0,0 +1,22 @@ +include Makefile.o.dep + + +all: $(o) + + +.SUFFIXES: .cpp .o + +.cpp.o: + $(CXX) -c $(CXXFLAGS) $< + + + +depend: + makedepend -Y. -I.. -I../../ezc/src -f- *.cpp > Makefile.dep + echo -n "o = " > Makefile.o.dep + ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep + +clean: + rm -f *.o + +include Makefile.dep diff --git a/db/Makefile.dep b/db/Makefile.dep new file mode 100755 index 0000000..c3302a3 --- /dev/null +++ b/db/Makefile.dep @@ -0,0 +1,15 @@ +# DO NOT DELETE + +db.o: db.h dbbase.h dbconn.h dbtextstream.h ../core/textstream.h +db.o: dbitemquery.h ../core/item.h dbitemcolumns.h ../core/user.h +db.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +db.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h +db.o: ../core/ticket.h ../core/log.h ../core/misc.h +dbbase.o: dbbase.h dbconn.h dbtextstream.h ../core/textstream.h ../core/log.h +dbbase.o: ../core/error.h ../core/log.h +dbconn.o: dbconn.h dbtextstream.h ../core/textstream.h ../core/log.h +dbconn.o: ../core/error.h ../core/log.h +dbitemcolumns.o: dbitemcolumns.h ../core/item.h dbbase.h dbconn.h +dbitemcolumns.o: dbtextstream.h ../core/textstream.h +dbitemquery.o: dbitemquery.h ../core/item.h +dbtextstream.o: dbtextstream.h ../core/textstream.h diff --git a/db/Makefile.o.dep b/db/Makefile.o.dep new file mode 100755 index 0000000..87b7eac --- /dev/null +++ b/db/Makefile.o.dep @@ -0,0 +1 @@ +o = db.o dbbase.o dbconn.o dbitemcolumns.o dbitemquery.o dbtextstream.o diff --git a/db/db.cpp b/db/db.cpp index a86899d..076809d 100755 --- a/db/db.cpp +++ b/db/db.cpp @@ -8,238 +8,11 @@ */ #include "db.h" -#include "log.h" -#include "misc.h" - - -Db::Db(bool close_at_end_) -{ - pg_conn = 0; - close_at_end = close_at_end_; -} - - -Db::~Db() -{ - if( close_at_end ) - Close(); -} - - -PGconn * Db::GetPGconn() -{ - return pg_conn; -} - - -void Db::Init(const std::string & d, const std::string & u, const std::string & p) -{ - db_database = d; - db_user = u; - db_pass = p; - - Connect(); -} - - -void Db::Connect() -{ - Close(); - - std::ostringstream buf; - buf << "dbname=" << db_database << " user=" << db_user << " password=" << db_pass; - - pg_conn = PQconnectdb(buf.str().c_str()); - - // warning! pg_conn can be not null but there cannnot be a connection established - // use PQstatus(pg_conn) to check whether the connection works fine -} +#include "core/log.h" +#include "core/misc.h" -void Db::SetDbParameters() -{ - if( PQsetClientEncoding(pg_conn, "LATIN2") == -1 ) - log << log1 << "Db: Can't set the proper client encoding" << logend; -} - - - - -void Db::Close() -{ - if( pg_conn ) - { - PQfinish(pg_conn); - pg_conn = 0; - } -} - - - -bool Db::AssertConnection(bool put_log, bool throw_if_no_connection) -{ -bool was_connection = true; - - - if( !pg_conn ) - { - was_connection = false; - Connect(); - } - else - if( PQstatus(pg_conn) != CONNECTION_OK ) - { - if( put_log ) - log << log2 << "Db: connection to the database is lost, trying to recover" << logend; - - was_connection = false; - PQreset(pg_conn); - } - - - if( pg_conn && PQstatus(pg_conn) == CONNECTION_OK ) - { - if( put_log && was_connection == false ) - { - log << log2 << "Db: Connection to the database works fine" << logend; - log << log3 << "Db: Socket: " << PQsocket(pg_conn) << logend; - } - - SetDbParameters(); - return true; - } - else - { - if( put_log ) - log << log1 << "Db: Connection to db server cannot be established" << logend; - - if( throw_if_no_connection ) - throw Error(WINIX_ERR_DB_FATAL_ERROR_DURING_CONNECTING); - - return false; - } -} - - -void Db::WaitForConnection() -{ - if( !pg_conn || PQstatus(pg_conn) != CONNECTION_OK ) - { - log << log3 << "Db: waiting for the db to be ready...." << logend; - - while( !AssertConnection(false, false) ) - sleep(5); - - log << log3 << "Db: connection to the db works fine" << logend; - log << log3 << "Db: Socket: " << PQsocket(pg_conn) << logend; - } -} - - - - - - -std::string Db::Escape(const std::string & s) -{ -std::string result; - - result.resize(s.length() * 2 + 1); - - size_t len = PQescapeStringConn(pg_conn, const_cast( result.c_str() ), s.c_str(), s.length(), 0); - result.resize(len); - -return result; -} - - -std::string Db::Escape(const char * s) -{ -std::string result; -int len; - - for(len=0 ; s[len] != 0 ; ++len); - - result.resize(len * 2 + 1); - - size_t len_new = PQescapeStringConn(pg_conn, const_cast( result.c_str() ), s, len, 0); - result.resize(len_new); - -return result; -} - - - -// ------------------ - - - -PGresult * Db::AssertQuery(const std::string & q) -{ - PGresult * r = PQexec(pg_conn, q.c_str()); - - if( !r ) - { - log << log1 << "Db: Problem with query: \"" << q << '\"' << logend; - log << log1 << "Db: " << PQerrorMessage(pg_conn) << logend; - - throw Error(WINIX_ERR_DB_INCORRECT_QUERY); - } - -return r; -} - - - -void Db::AssertResultStatus(PGresult * r, ExecStatusType t) -{ - if( PQresultStatus(r) != t ) - { - log << "Db: Incorrect result status: " << PQerrorMessage(pg_conn) << logend; - - throw Error(WINIX_ERR_DB_INCORRENT_RESULT_STATUS); - } -} - - - -int Db::AssertColumn(PGresult * r, const char * column_name) -{ - int c = PQfnumber(r, column_name); - - if( c == -1 ) - { - log << log1 << "Db: there is no column: " << column_name << logend; - - throw Error(WINIX_ERR_DB_NO_COLUMN); - } - -return c; -} - - -const char * Db::AssertValue(PGresult * r, int row, int col) -{ - const char * res = PQgetvalue(r, row, col); - - if( !res ) - { - log << log1 << "Db: there is no such an item in the result, row:" << row << ", col:" << col << logend; - - throw Error(WINIX_ERR_NO_ITEM); - } - -return res; -} - - - -void Db::ClearResult(PGresult * r) -{ - if( r ) - PQclear(r); -} bool Db::CheckUser(const std::string & login, const std::string & password, long & user_id) @@ -249,16 +22,17 @@ bool Db::CheckUser(const std::string & login, const std::string & password, long try { - AssertConnection(); + query.Clear(); + query << R("select id from core.user where login=") + << login + << R(" and password=") + << password + << R(";"); - std::ostringstream query; - query << "select id from core.user where login='" << Escape(login) << "' and password='" << Escape(password) << "';"; - - r = AssertQuery( query.str() ); + r = AssertQuery(query); + AssertResult(r, PGRES_TUPLES_OK); - AssertResultStatus(r, PGRES_TUPLES_OK); - - int rows = PQntuples(r); + int rows = Rows(r); if( rows == 0 ) throw Error(WINIX_ERR_DB_INCORRECT_LOGIN); @@ -270,9 +44,7 @@ bool Db::CheckUser(const std::string & login, const std::string & password, long } int cuser_id = AssertColumn(r, "id"); - const char * fuser_id = AssertValue(r, 0, cuser_id); - user_id = atol( fuser_id ); - + user_id = AssertValueLong(r, 0, cuser_id); user_ok = true; } catch(const Error &) @@ -280,8 +52,7 @@ bool Db::CheckUser(const std::string & login, const std::string & password, long } ClearResult(r); - - + return user_ok; } @@ -296,18 +67,18 @@ Error Db::AddUser(User & user, const std::string & password) try { - AssertConnection(); - std::ostringstream query; - query << "insert into core.user (login, password, super_user, email, cms_notify, thread_notify) values ("; - query << '\'' << Escape(user.name) << "', "; - query << '\'' << Escape(password) << "', "; - query << '\'' << static_cast(user.super_user) << "', "; - query << '\'' << Escape(user.email) << "', "; - query << '\'' << user.cms_notify << "', "; - query << '\'' << user.thread_notify << "');"; + query.Clear(); + query << R("insert into core.user (login, password, super_user, email, cms_notify, thread_notify) values (") + << user.name + << password + << static_cast(user.super_user) + << user.email + << user.cms_notify + << user.thread_notify + << R(");"); - r = AssertQuery(query.str()); - AssertResultStatus(r, PGRES_COMMAND_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_COMMAND_OK); user.id = AssertCurrval("core.user_id_seq"); } @@ -335,30 +106,37 @@ bool Db::AddItemCreateUrlSubject(Item & item) bool is_that_url; PGresult * r = 0; int index = 1; -const int max_index = 100; +const int max_index = 99; char appendix[20]; appendix[0] = 0; - try { do { - std::ostringstream query; + query_create_url.Clear(); - // this Escape can be put at the beginning (performance) - query << "select id from core.item where url='" << Escape(item.url) << appendix << "' and parent_id='" << item.parent_id << "';"; - r = AssertQuery(query.str()); - AssertResultStatus(r, PGRES_TUPLES_OK); + temp_url = item.url; + temp_url += appendix; + + query_create_url + << R("select id from core.item where url=") + << temp_url + << R(" and parent_id=") + << item.parent_id + << R(";"); + + r = AssertQuery(query_create_url); + AssertResult(r, PGRES_TUPLES_OK); - if( PQntuples(r) != 0 ) + if( Rows(r) != 0 ) { sprintf(appendix, "_(%d)", ++index); is_that_url = true; } else { - item.url += appendix; + item.url = temp_url; is_that_url = false; } @@ -369,40 +147,40 @@ appendix[0] = 0; } catch(const Error &) { - is_that_url = true; // for return false + is_that_url = true; // for returning false } - - + ClearResult(r); - return !is_that_url; } + // for testing consistency +// !! obecnie nie potrzebne? skasowac? void Db::CheckAllUrlSubjectModifyItem(Item & item) { PGresult * r = 0; try { - std::ostringstream query; - query << "update core.item set url="; + query.Clear(); + query << R("update core.item set url="); // url if( AddItemCreateUrlSubject(item) ) - query << '\'' << Escape(item.url) << '\''; + query << item.url; else { - query << '\'' << item.id << '\''; + query << item.id; item.url.clear(); } - query << " where id='" << item.id << "';"; + query << R(" where id=") << item.id << R(";"); - r = AssertQuery(query.str()); - AssertResultStatus(r, PGRES_COMMAND_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_COMMAND_OK); } catch(const Error &) { @@ -414,6 +192,7 @@ void Db::CheckAllUrlSubjectModifyItem(Item & item) // for checking consistency +// !! skasowac? nie potrzebne? void Db::CheckAllUrlSubject() { PGresult * r = 0; @@ -421,15 +200,14 @@ void Db::CheckAllUrlSubject() try { - AssertConnection(); - std::ostringstream query, query2; // !! subject zostal wrzucony do tabeli item - query << "select item.id, subject from core.item left join core.content on item.content_id = content.id where url is null or url=''"; + query << R("select item.id, subject from core.item left join core.content" + " on item.content_id = content.id where url is null or url=''"); - r = AssertQuery(query.str()); - AssertResultStatus(r, PGRES_TUPLES_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_TUPLES_OK); - int rows = PQntuples(r); + int rows = Rows(r); int cid = AssertColumn(r, "id"); int csubject = AssertColumn(r, "subject"); @@ -450,27 +228,6 @@ void Db::CheckAllUrlSubject() -long Db::AssertCurrval(const char * table) -{ - PGresult * r; - std::ostringstream query; - - query << "select currval('" << table << "');"; - - r = AssertQuery(query.str()); - AssertResultStatus(r, PGRES_TUPLES_OK); - - if( PQntuples(r) != 1 ) - { - log << log1 << "Db: error (currval) for table: " << table << ", " << PQerrorMessage(pg_conn) << logend; - throw Error(WINIX_ERR_DB_ERR_CURRVAL); - } - - long res = strtol( AssertValue(r, 0, 0), 0, 10 ); - -return res; -} - Error Db::AddItemIntoItem(Item & item) { @@ -480,43 +237,42 @@ Error Db::AddItemIntoItem(Item & item) try { - AssertConnection(); - std::ostringstream query; - query << "insert into core.item (user_id, modification_user_id, group_id, privileges, date_creation, date_modification, type, " - "parent_id, content_id, auth, auth_path, default_item, subject, guest_name, template, url) values ("; - query << '\'' << item.user_id << "', "; - query << '\'' << item.modification_user_id << "', "; - query << '\'' << item.group_id << "', "; - query << '\'' << item.privileges << "', "; - query << '\'' << ConvertTime(item.date_creation) << "', "; - query << '\'' << ConvertTime(item.date_modification) << "', "; - query << '\'' << static_cast(item.type) << "', "; - query << '\'' << item.parent_id << "', "; - query << '\'' << item.content_id << "', "; - query << '\'' << static_cast(item.auth) << "', "; - query << '\'' << Escape(item.auth_path) << "', "; - query << '\'' << item.default_item << "', "; - query << '\'' << Escape(item.subject) << "', "; - query << '\'' << Escape(item.guest_name) << "', "; - query << '\'' << Escape(item.html_template) << "', "; + query.Clear(); + query << R("insert into core.item (user_id, modification_user_id, group_id, privileges, " + "date_creation, date_modification, type, parent_id, content_id, auth, auth_path, " + "default_item, subject, guest_name, template, url) values (") + << item.user_id + << item.modification_user_id + << item.group_id + << item.privileges + << ConvertTime(item.date_creation) + << ConvertTime(item.date_modification) + << static_cast(item.type) + << item.parent_id + << item.content_id + << static_cast(item.auth) + << item.auth_path + << item.default_item + << item.subject + << item.guest_name + << item.html_template; - url_without_id = AddItemCreateUrlSubject(item); if( url_without_id ) - query << '\'' << Escape(item.url) << "');"; + query << item.url; else - query << "currval('core.item_id_seq')" << ");"; + query << R(", currval('core.item_id_seq')"); // !! zrobic test czy to obecnie dziala dobrze + query << R(");"); - r = AssertQuery(query.str()); - AssertResultStatus(r, PGRES_COMMAND_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_COMMAND_OK); item.id = AssertCurrval("core.item_id_seq"); if( !url_without_id ) ToString(item.url, item.id); - } catch(const Error & e) { @@ -529,7 +285,6 @@ return result; } - Error Db::AddItemIntoContent(Item & item) { PGresult * r = 0; @@ -537,14 +292,14 @@ Error Db::AddItemIntoContent(Item & item) try { - AssertConnection(); - std::ostringstream query; - query << "insert into core.content (content, content_type) values ("; - query << '\'' << Escape(item.content) << "', "; - query << '\'' << static_cast(item.content_type) << "');"; + query.Clear(); + query << R("insert into core.content (content, content_type) values (") + << item.content + << static_cast(item.content_type) + << R(");"); - r = AssertQuery(query.str()); - AssertResultStatus(r, PGRES_COMMAND_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_COMMAND_OK); item.content_id = AssertCurrval("core.content_id_seq"); } @@ -555,7 +310,6 @@ Error Db::AddItemIntoContent(Item & item) ClearResult(r); - return result; } @@ -589,44 +343,44 @@ Error Db::EditItemInItem(Item & item, bool with_url) try { - AssertConnection(); - std::ostringstream query; - query << "update core.item set (user_id, modification_user_id, group_id, privileges, date_creation, date_modification, type, " - "default_item, parent_id, subject, guest_name, auth, auth_path, template"; + query.Clear(); + query << R("update core.item set (user_id, modification_user_id, group_id, privileges, " + "date_creation, date_modification, type, default_item, parent_id, subject, " + "guest_name, auth, auth_path, template"); if( with_url ) - query << ", url"; + query << R(", url"); - query << ") = ("; - query << '\'' << item.user_id << "', "; - query << '\'' << item.modification_user_id << "', "; - query << '\'' << item.group_id << "', "; - query << '\'' << item.privileges << "', "; - query << '\'' << ConvertTime(item.date_creation) << "', "; - query << '\'' << ConvertTime(item.date_modification) << "', "; - query << '\'' << static_cast(item.type) << "', "; - query << '\'' << item.default_item << "', "; - query << '\'' << item.parent_id << "', "; - query << '\'' << Escape(item.subject) << "', "; - query << '\'' << Escape(item.guest_name) << "', "; - query << '\'' << static_cast(item.auth) << "', "; - query << '\'' << Escape(item.auth_path) << "', "; - query << '\'' << Escape(item.html_template) << "' "; + query << R(") = (") + << item.user_id + << item.modification_user_id + << item.group_id + << item.privileges + << ConvertTime(item.date_creation) + << ConvertTime(item.date_modification) + << static_cast(item.type) + << item.default_item + << item.parent_id + << item.subject + << item.guest_name + << static_cast(item.auth) + << item.auth_path + << item.html_template; if( with_url ) { url_without_id = AddItemCreateUrlSubject(item); if( url_without_id ) - query << ", '" << Escape(item.url) << "'"; + query << item.url; else - query << ", '" << item.id << "'"; + query << item.id; } - query << ") where id='" << item.id << "';"; + query << R(") where id=") << item.id << R(";"); - r = AssertQuery(query.str()); - AssertResultStatus(r, PGRES_COMMAND_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_COMMAND_OK); if( with_url && !url_without_id ) ToString(item.url, item.id); @@ -650,16 +404,16 @@ Error Db::EditItemInContent(Item & item) try { - AssertConnection(); - std::ostringstream query; - query << "update core.content set (content, content_type) = ("; + query.Clear(); + query << R("update core.content set (content, content_type) = (") + << item.content + << static_cast(item.content_type) + << R(") where id=") + << item.content_id + << R(";"); - query << '\'' << Escape(item.content) << "', "; - query << '\'' << static_cast(item.content_type) << "' "; - query << ") where id='" << item.content_id << "';"; - - r = AssertQuery(query.str()); - AssertResultStatus(r, PGRES_COMMAND_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_COMMAND_OK); } catch(const Error & e) { @@ -679,20 +433,23 @@ Error Db::EditItemGetId(Item & item) try { - AssertConnection(); - std::ostringstream query; - query << "select item.id, content.id from core.item left join core.content on item.content_id = content.id where item.parent_id='"; - query << item.parent_id << "' and item.url='" << Escape(item.url) << "';"; + query.Clear(); + query << R("select item.id, content.id from core.item left join core.content" + " on item.content_id = content.id where item.parent_id=") + << item.parent_id + << R(" and item.url=") + << item.url + << R(";"); - r = AssertQuery(query.str()); - AssertResultStatus(r, PGRES_TUPLES_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_TUPLES_OK); - if( PQntuples(r) != 1 || PQnfields(r) != 2 ) + if( Rows(r) != 1 || Cols(r) != 2 ) throw Error(WINIX_ERR_NO_ITEM); // we cannot use AssertColumn() with a name because both columns are called 'id' - item.id = atol( AssertValue(r, 0, 0) ); - item.content_id = atol( AssertValue(r, 0, 1) ); + item.id = AssertValueLong(r, 0, 0); + item.content_id = AssertValueLong(r, 0, 1); } catch(const Error & e) { @@ -712,19 +469,20 @@ Error Db::EditItemGetContentId(Item & item) try { - AssertConnection(); - std::ostringstream query; + query.Clear(); // !! tutaj chyba nie ma potrzeby robic left join z core.content (nie uzywamy nic z tamtej tabeli) - query << "select content_id from core.item left join core.content on item.content_id = content.id where item.id='"; - query << item.id << "';"; + query << R("select content_id from core.item left join core.content" + " on item.content_id = content.id where item.id=") + << item.id + << R(";"); - r = AssertQuery(query.str()); - AssertResultStatus(r, PGRES_TUPLES_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_TUPLES_OK); - if( PQntuples(r) != 1 || PQnfields(r) != 1 ) + if( Rows(r) != 1 || Cols(r) != 1 ) throw Error(WINIX_ERR_NO_ITEM); - item.content_id = atol( AssertValue(r, 0, 0) ); + item.content_id = AssertValueLong(r, 0, 0); } catch(const Error & e) { @@ -788,23 +546,20 @@ Error Db::EditDefaultItem(long id, long new_default_item) try { - AssertConnection(); - std::ostringstream query; - query << "update core.item set (default_item) = ('" << new_default_item << "') where id='" << id << "';"; + query.Clear(); + query << R("update core.item set (default_item) = (") + << new_default_item + << R(") where id=") + << id + << R(";"); - r = AssertQuery(query.str()); - AssertResultStatus(r, PGRES_COMMAND_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_COMMAND_OK); - char * rows_str = PQcmdTuples(r); - long rows = 0; - - if( rows_str ) - rows = atol(rows_str); - - if( rows == 0 ) + if( AffectedRows(r) == 0 ) { result = WINIX_ERR_NO_ITEM; - log << log1 << "Db: EditDefaultItem: no such item, id: " << id << logend; + log << log1 << "Db: EditDefaultItem: no such an item, id: " << id << logend; } } catch(const Error & e) @@ -825,23 +580,20 @@ Error Db::EditTemplateItemById(long id, const std::string & new_html_template) try { - AssertConnection(); - std::ostringstream query; - query << "update core.item set (template) = ('" << Escape(new_html_template) << "') where id='" << id << "';"; + query.Clear(); + query << R("update core.item set (template) = (") + << new_html_template + << R(") where id=") + << id + << R(";"); - r = AssertQuery(query.str()); - AssertResultStatus(r, PGRES_COMMAND_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_COMMAND_OK); - char * rows_str = PQcmdTuples(r); - long rows = 0; - - if( rows_str ) - rows = atol(rows_str); - - if( rows == 0 ) + if( AffectedRows(r) == 0 ) { result = WINIX_ERR_NO_ITEM; - log << log1 << "Db: EditTemplateItemById: no such item, id: " << id << logend; + log << log1 << "Db: EditTemplateItemById: no such an item, id: " << id << logend; } } catch(const Error & e) @@ -856,87 +608,85 @@ return result; -PGresult * Db::GetItemsQuery(const ItemQuery & iq, bool skip_other_sel) +PGresult * Db::GetItemsQuery(const DbItemQuery & iq, bool skip_other_sel) { - std::ostringstream query; - query << "select item.id"; + query.Clear(); + query << R("select item.id"); if( !skip_other_sel ) { - if( iq.sel_parent_id ) query << " ,parent_id"; - if( iq.sel_user_id ) query << " ,user_id, modification_user_id"; - if( iq.sel_group_id ) query << " ,group_id"; - if( iq.sel_guest_name) query << " ,guest_name"; - if( iq.sel_privileges ) query << " ,privileges"; - if( iq.sel_date ) query << " ,date_creation, date_modification"; - if( iq.sel_subject ) query << " ,subject"; - if( iq.sel_content ) query << " ,content, content_type, content_id"; - if( iq.sel_url ) query << " ,url"; - if( iq.sel_type ) query << " ,type"; - if( iq.sel_default_item ) query << " ,default_item"; - if( iq.sel_auth ) query << " ,auth, auth_path"; - if( iq.sel_html_template ) query << " ,template"; + if( iq.sel_parent_id ) query << R(" ,parent_id"); + if( iq.sel_user_id ) query << R(" ,user_id, modification_user_id"); + if( iq.sel_group_id ) query << R(" ,group_id"); + if( iq.sel_guest_name) query << R(" ,guest_name"); + if( iq.sel_privileges ) query << R(" ,privileges"); + if( iq.sel_date ) query << R(" ,date_creation, date_modification"); + if( iq.sel_subject ) query << R(" ,subject"); + if( iq.sel_content ) query << R(" ,content, content_type, content_id"); + if( iq.sel_url ) query << R(" ,url"); + if( iq.sel_type ) query << R(" ,type"); + if( iq.sel_default_item ) query << R(" ,default_item"); + if( iq.sel_auth ) query << R(" ,auth, auth_path"); + if( iq.sel_html_template ) query << R(" ,template"); } - query << " from core.item"; + query << R(" from core.item"); - if( iq.sel_content ) query << " left join core.content on item.content_id = content.id"; - + if( iq.sel_content ) + query << R(" left join core.content on item.content_id = content.id"); if( iq.where_id || iq.where_parent_id || iq.where_type || iq.where_auth ) { - query << " where "; + query << R(" where "); const char * add_and = " and "; const char * if_and = ""; - if( iq.where_id ) { query << if_and << "id='" << iq.id << "'" ; if_and = add_and; } - if( iq.where_parent_id ) { query << if_and << "parent_id='" << iq.parent_id << "'" ; if_and = add_and; } - if( iq.where_type ) { query << if_and << "type='" << static_cast(iq.type) << "'" ; if_and = add_and; } + if( iq.where_id ) { query << R(if_and) << R("id=") << iq.id ; if_and = add_and; } + if( iq.where_parent_id ){ query << R(if_and) << R("parent_id=") << iq.parent_id ; if_and = add_and; } + if( iq.where_type ) { query << R(if_and) << R("type=") << int(iq.type) ; if_and = add_and; } if( iq.where_auth ) { - query << if_and << "auth"; + query << R(if_and) << R("auth"); - if(iq.auth_equal ) - query << "="; + if( iq.auth_equal ) + query << R("="); else - query << "!="; + query << R("!="); - query << "'" << static_cast(iq.auth) << "'"; + query << static_cast(iq.auth); if_and = add_and; } } - query << " order by item.date_creation"; + query << R(" order by item.date_creation"); if( iq.sort_asc ) - query << " asc;"; + query << R(" asc;"); else - query << " desc;"; + query << R(" desc;"); -return AssertQuery(query.str()); +return AssertQuery(query); } -void Db::GetItems(std::vector & item_tab, const ItemQuery & item_query) +void Db::GetItems(std::vector & item_tab, const DbItemQuery & item_query) { item_tab.clear(); PGresult * r = 0; try { - AssertConnection(); - r = GetItemsQuery(item_query); - AssertResultStatus(r, PGRES_TUPLES_OK); + AssertResult(r, PGRES_TUPLES_OK); Item item; - int rows = PQntuples(r); + int rows = Rows(r); - ItemColumns col; + DbItemColumns col; col.SetColumns(r); for(int i = 0 ; i & item_tab, const ItemQuery & item_query) -void Db::GetItems(std::vector & item_tab, const ItemQuery & item_query) +void Db::GetItems(std::vector & item_tab, const DbItemQuery & item_query) { item_tab.clear(); PGresult * r = 0; try { - AssertConnection(); - r = GetItemsQuery(item_query, true); - AssertResultStatus(r, PGRES_TUPLES_OK); + AssertResult(r, PGRES_TUPLES_OK); - int rows = PQntuples(r); + int rows = Rows(r); for(int i = 0 ; i & item_tab, const ItemQuery & item_query) long Db::Size(long parent_id, Item::Type type) { PGresult * r = 0; - int res = 0; + long res = 0; try { - AssertConnection(); - - std::ostringstream query; - query << "select count(id) from core.item where "; + query.Clear(); + query << R("select count(id) from core.item where "); if( type != Item::none ) - query << "type='" << (int)type << "' and "; + query << R("type=") << (int)type << R(" and "); - query << "parent_id='" << parent_id << "';"; + query << R("parent_id=") << parent_id << R(";"); - r = AssertQuery( query.str() ); - AssertResultStatus(r, PGRES_TUPLES_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_TUPLES_OK); - res = atol(AssertValue(r, 0, 0)); + res = AssertValueLong(r, 0, 0); } catch(const Error &) { @@ -1025,21 +771,20 @@ void Db::GetItem(std::vector & item_tab, long id) try { - AssertConnection(); - - std::ostringstream query; - query << "select * from core.item left join core.content on item.content_id = content.id where type='1' and item.id='" << id << "';"; + query.Clear(); + query << R("select * from core.item left join core.content on item.content_id = content.id" + " where type=1 and item.id=") << id << R(";"); - r = AssertQuery( query.str() ); - AssertResultStatus(r, PGRES_TUPLES_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_TUPLES_OK); Item item; - int rows = PQntuples(r); + int rows = Rows(r); if( rows > 1 ) log << log1 << "Db: we have more than one item with id: " << id << logend; - ItemColumns col; + DbItemColumns col; col.SetColumns(r); for(int i = 0 ; i(item.auth) << "', "; - query << '\'' << Escape(item.auth_path) << "') "; - query << " where id='" << id << "';"; + query.Clear(); + query << R("update core.item set (auth, auth_path) = (") + << static_cast(item.auth) + << item.auth_path + << R(") where id=") + << id + << R(";"); - r = AssertQuery(query.str()); - AssertResultStatus(r, PGRES_COMMAND_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_COMMAND_OK); } catch(const Error & e) { @@ -1321,29 +1064,31 @@ Error Db::DelDirById(long id) { Error result = WINIX_ERR_OK; PGresult * r = 0; - const char * crows; - + try { - AssertConnection(); - std::ostringstream query, query2; - + query.Clear(); // !! trzeba poprawic to usuwanie gdy beda hard linki - query << "delete from core.content where content.id in (select content_id from core.item where parent_id='" << id << "');"; - r = AssertQuery( query.str() ); - AssertResultStatus(r, PGRES_COMMAND_OK); + query << R("delete from core.content where content.id in (select content_id from core.item where parent_id=") + << id + << R(");"); - crows = PQcmdTuples(r); - if( crows ) - log << log2 << "Db: deleted " << atol(crows) << " rows from core.content" << logend; + r = AssertQuery(query); + AssertResult(r, PGRES_COMMAND_OK); + log << log2 << "Db: deleted " << AffectedRows(r) << " rows from core.content" << logend; - query2 << "delete from core.item where id='" << id << "' or parent_id='" << id << "';"; - r = AssertQuery( query2.str() ); - AssertResultStatus(r, PGRES_COMMAND_OK); - - crows = PQcmdTuples(r); - if( crows ) - log << log1 << "Db: deleted dir: " << id << " (deleted: " << atol(crows) << " rows)" << logend; + // !! ClearResult(r) tutaj? + + query.Clear(); + query << R("delete from core.item where id=") + << id + << R(" or parent_id=") + << id + << R(";"); + + r = AssertQuery(query); + AssertResult(r, PGRES_COMMAND_OK); + log << log1 << "Db: deleted dir: " << id << " (deleted: " << AffectedRows(r) << " rows)" << logend; } catch(const Error & e) { @@ -1365,14 +1110,15 @@ Error Db::EditSubjectById(Item & item, long id) try { - AssertConnection(); - std::ostringstream query; - query << "update core.item set (subject) = ("; - query << '\'' << Escape(item.subject) << "') "; - query << " where id='" << id << "';"; + query.Clear(); + query << R("update core.item set (subject) = (") + << item.subject + << R(") where id=") + << id + << R(";"); - r = AssertQuery(query.str()); - AssertResultStatus(r, PGRES_COMMAND_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_COMMAND_OK); } catch(const Error & e) { @@ -1393,25 +1139,21 @@ bool Db::DelItemDelItem(const Item & item) try { - AssertConnection(); - - std::ostringstream query; - query << "delete from core.item where id='" << item.id << "';"; + query.Clear(); + query << R("delete from core.item where id=") + << item.id + << R(";"); - r = AssertQuery( query.str() ); - AssertResultStatus(r, PGRES_COMMAND_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_COMMAND_OK); - const char * crows = PQcmdTuples(r); - if( crows ) - { - rows = atol(crows); - - if( rows > 1 ) - log << log1 << "Db: more than one item were deleted" << logend; - else - if( rows == 0 ) - log << log1 << "Db: no item has been deleted" << logend; - } + long affected = AffectedRows(r); + + if( affected > 1 ) + log << log1 << "Db: more than one item were deleted" << logend; + else + if( affected == 0 ) + log << log1 << "Db: no item has been deleted" << logend; } catch(const Error &) { @@ -1431,26 +1173,22 @@ void Db::DelItemDelContent(const Item & item) try { - AssertConnection(); + query.Clear(); + query << R("delete from core.content where id=") + << item.content_id + << R(";"); + + r = AssertQuery(query); + AssertResult(r, PGRES_COMMAND_OK); + + long rows = AffectedRows(r); + + if( rows > 1 ) + log << log1 << "Db: more than one content were deleted" << logend; + else + if( rows == 0 ) + log << log1 << "Db: no content has been deleted" << logend; - std::ostringstream query; - query << "delete from core.content where id='" << item.content_id << "';"; - - r = AssertQuery( query.str() ); - AssertResultStatus(r, PGRES_COMMAND_OK); - - const char * crows = PQcmdTuples(r); - if( crows ) - { - long rows = atol(crows); - - if( rows > 1 ) - log << log1 << "Db: more than one content were deleted" << logend; - else - if( rows == 0 ) - log << log1 << "Db: no content has been deleted" << logend; - - } } catch(const Error &) { @@ -1469,15 +1207,15 @@ Error Db::DelItemCountContents(const Item & item, long & contents) try { - AssertConnection(); - - std::ostringstream query; - query << "select count('id') from core.item where content_id='" << item.content_id << "';"; + query.Clear(); + query << R("select count('id') from core.item where content_id=") + << item.content_id + << R(";"); - r = AssertQuery( query.str() ); - AssertResultStatus(r, PGRES_TUPLES_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_TUPLES_OK); - contents = atol( AssertValue(r, 0, 0) ); + contents = AssertValueLong(r, 0, 0); } catch(const Error & e) { @@ -1514,24 +1252,22 @@ void Db::GetDirs(DirContainer & dir_tab) try { - AssertConnection(); - - std::ostringstream query; - query << "select * from core.item where type='0';"; + query.Clear(); + query << R("select * from core.item where type=0;"); - r = AssertQuery( query.str() ); - AssertResultStatus(r, PGRES_TUPLES_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_TUPLES_OK); - Item item; - int rows = PQntuples(r); + Item item; // !! wrzucic jako skladowa klasy? a tutaj tylko dac item.clear()? + int rows = Rows(r); - ItemColumns col; + DbItemColumns col; col.SetColumns(r); for(int i = 0 ; i & user_tab) try { - AssertConnection(); - - std::ostringstream query; - query << "select id, login, super_user, group_id, email, cms_notify, thread_notify from core.user left outer join core.group_mem on core.user.id = core.group_mem.user_id order by id asc;"; + query.Clear(); + query << R("select id, login, super_user, group_id, email, cms_notify, thread_notify" + " from core.user left outer join core.group_mem on" + " core.user.id = core.group_mem.user_id order by id asc;"); - r = AssertQuery( query.str() ); - AssertResultStatus(r, PGRES_TUPLES_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_TUPLES_OK); - int rows = PQntuples(r); + int rows = Rows(r); int cid = AssertColumn(r, "id"); int cname = AssertColumn(r, "login"); @@ -1573,15 +1309,15 @@ void Db::GetUsers(UGContainer & user_tab) for(int i = 0 ; i( atoi( AssertValue(r, i, csuper_user) ) ); u.email = AssertValue(r, i, cemail); - u.cms_notify = atoi( AssertValue(r, i, ccms_notify) ); - u.thread_notify = atoi( AssertValue(r, i, cthread_notify) ); + u.cms_notify = AssertValueInt(r, i, ccms_notify); + u.thread_notify = AssertValueInt(r, i, cthread_notify); log << log1 << "Db: get user: id:" << u.id << ", name:" << u.name << ", super_user:" << u.super_user << logend; @@ -1593,9 +1329,9 @@ void Db::GetUsers(UGContainer & user_tab) last_id = u.id; } - long group_id = atol( AssertValue(r, i, cgroup_id) ); + long group_id = AssertValueLong(r, i, cgroup_id); - if( !PQgetisnull(r, i, cgroup_id) && group_id!=-1 && iter!=user_tab.End() ) + if( !IsNull(r, i, cgroup_id) && group_id!=-1 && iter!=user_tab.End() ) { iter->groups.push_back(group_id); log << log3 << "Db: user:" << iter->name << " is a member of group_id:" << group_id << logend; @@ -1617,15 +1353,14 @@ void Db::GetGroups(UGContainer & group_tab) try { - AssertConnection(); - - std::ostringstream query; - query << "select id, core.group.group, user_id from core.group left outer join core.group_mem on core.group.id = core.group_mem.group_id order by id asc;"; + query.Clear(); + query << R("select id, core.group.group, user_id from core.group left outer join" + " core.group_mem on core.group.id = core.group_mem.group_id order by id asc;"); - r = AssertQuery( query.str() ); - AssertResultStatus(r, PGRES_TUPLES_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_TUPLES_OK); - int rows = PQntuples(r); + int rows = Rows(r); int cid = AssertColumn(r, "id"); int cname = AssertColumn(r, "group"); @@ -1637,7 +1372,7 @@ void Db::GetGroups(UGContainer & group_tab) for(int i = 0 ; i & group_tab) last_id = g.id; } - long user_id = atol( AssertValue(r, i, cuser_id) ); + long user_id = AssertValueLong(r, i, cuser_id); - if( !PQgetisnull(r, i, cuser_id) && user_id!=-1 && !group_tab.Empty() ) + if( !IsNull(r, i, cuser_id) && user_id!=-1 && !group_tab.Empty() ) { iter->members.push_back(user_id); log << log3 << "Db: get group member: user_id:" << user_id << logend; @@ -1667,61 +1402,9 @@ void Db::GetGroups(UGContainer & group_tab) - - - - -tm Db::ConvertTime(const char * str) -{ -tm t; - - memset(&t, 0, sizeof(t)); - - if( !str ) - return t; - - size_t len = strlen(str); - - if( len != 19 ) - { - // unknown format - // the format must be like this: 2008-12-31 22:30:00 - return t; - } - - - t.tm_year = atoi(str + 0) - 1900; /* year - 1900 */ - t.tm_mon = atoi(str + 5) - 1; /* month of year (0 - 11) */ - t.tm_mday = atoi(str + 8); /* day of month (1 - 31) */ - t.tm_hour = atoi(str + 11); /* hours (0 - 23) */ - t.tm_min = atoi(str + 14); /* minutes (0 - 59) */ - t.tm_sec = atoi(str + 17); /* seconds (0 - 60) */ - - -// t.tm_wday = 0; /* day of week (Sunday = 0) */ -// t.tm_yday = 0; /* day of year (0 - 365) */ -// t.tm_isdst = 0; /* is summer time in effect? */ -// t.tm_zone = 0; // const_cast(""); /* abbreviation of timezone name */ - - -//return mktime(&t); -return t; -} - - -const char * Db::ConvertTime(const tm & t) -{ -// not thread safe -static char buffer[100]; - - sprintf(buffer, "%04d-%02d-%02d %02d:%02d:%02d", t.tm_year + 1900, t.tm_mon + 1, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec); - -return buffer; -} - - - - +/* + threads +*/ Error Db::GetThreadByDirId(long dir_id, Thread & thread) @@ -1731,18 +1414,16 @@ Error Db::GetThreadByDirId(long dir_id, Thread & thread) try { - AssertConnection(); - - std::ostringstream query; - query << "select thread.id, thread.parent_id, thread.dir_id, thread.closed, thread.items, " - "thread.last_item, item.date_modification, item.user_id " - "from core.thread left join core.item on thread.last_item = item.id " - "where thread.dir_id = '" << dir_id << "';"; + query.Clear(); + query << R("select thread.id, thread.parent_id, thread.dir_id, thread.closed, thread.items, " + "thread.last_item, item.date_modification, item.user_id " + "from core.thread left join core.item on thread.last_item = item.id " + "where thread.dir_id = ") << dir_id << R(";"); - r = AssertQuery( query.str() ); - AssertResultStatus(r, PGRES_TUPLES_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_TUPLES_OK); - int rows = PQntuples(r); + int rows = Rows(r); if( rows > 1 ) log << log1 << "Db: there is more than one thread with dir_id: " << dir_id << logend; @@ -1756,17 +1437,18 @@ Error Db::GetThreadByDirId(long dir_id, Thread & thread) int cclosed = AssertColumn(r, "closed"); int citems = AssertColumn(r, "items"); int clast_item = AssertColumn(r, "last_item"); - int cdate_modification = PQfnumber(r, "date_modification"); + + int cdate_modification = PQfnumber(r, "date_modification"); // !! tych kolumn mo¿e nie byæ? czemu PQfnumber a nie AssertColumn? int cuser_id = PQfnumber(r, "user_id"); - thread.id = atol( AssertValue(r, 0, cid) ); - thread.parent_id = atol( AssertValue(r, 0, cparent_id) ); - thread.dir_id = atol( AssertValue(r, 0, cdir_id) ); - thread.closed = atol( AssertValue(r, 0, cclosed) ) == 0 ? false : true; - thread.items = atol( AssertValue(r, 0, citems) ); - thread.last_item.id = atol( AssertValue(r, 0, clast_item) ); - thread.last_item.date_modification = ConvertTime( Db::AssertValue(r, 0, cdate_modification) ); - thread.last_item.user_id = atol( Db::AssertValue(r, 0, cuser_id) ); + thread.id = AssertValueLong(r, 0, cid); + thread.parent_id = AssertValueLong(r, 0, cparent_id); + thread.dir_id = AssertValueLong(r, 0, cdir_id); + thread.closed = AssertValueLong(r, 0, cclosed) == 0 ? false : true; + thread.items = AssertValueLong(r, 0, citems); + thread.last_item.id = AssertValueLong(r, 0, clast_item); + thread.last_item.date_modification = ConvertTime( AssertValue(r, 0, cdate_modification) ); + thread.last_item.user_id = AssertValueLong(r, 0, cuser_id); } catch(const Error & e) { @@ -1775,7 +1457,6 @@ Error Db::GetThreadByDirId(long dir_id, Thread & thread) ClearResult(r); - return status; } @@ -1788,17 +1469,16 @@ Error Db::GetThreads(long parent_id, std::vector & thread_tab) try { - AssertConnection(); - - std::ostringstream query; - query << "select thread.id, thread.parent_id, thread.dir_id, thread.closed, thread.items, thread.last_item, item.date_modification, item.user_id, item.guest_name " - "from core.thread left join core.item on thread.last_item = item.id " - "where thread.parent_id = '" << parent_id << "' order by date_modification asc;"; + query.Clear(); + query << R("select thread.id, thread.parent_id, thread.dir_id, thread.closed, " + "thread.items, thread.last_item, item.date_modification, item.user_id, item.guest_name " + "from core.thread left join core.item on thread.last_item = item.id " + "where thread.parent_id = ") << parent_id << R(" order by date_modification asc;"); - r = AssertQuery( query.str() ); - AssertResultStatus(r, PGRES_TUPLES_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_TUPLES_OK); - int rows = PQntuples(r); + int rows = Rows(r); Thread thread; int cid = AssertColumn(r, "id"); @@ -1812,18 +1492,17 @@ Error Db::GetThreads(long parent_id, std::vector & thread_tab) int cguest_name = PQfnumber(r, "guest_name"); - for(int i=0 ; i & thread_tab) ClearResult(r); - return status; } @@ -1850,17 +1528,17 @@ Error Db::AddThread(Thread & thread) try { - AssertConnection(); - std::ostringstream query; - query << "insert into core.thread (parent_id, dir_id, closed, items, last_item) values ("; - query << '\'' << thread.parent_id << "', "; - query << '\'' << thread.dir_id << "', "; - query << '\'' << (thread.closed ? 1 : 0 ) << "', "; - query << '\'' << thread.items << "', "; - query << '\'' << thread.last_item.id << "'); "; + query.Clear(); + query << R("insert into core.thread (parent_id, dir_id, closed, items, last_item) values (") + << thread.parent_id + << thread.dir_id + << (thread.closed ? 1 : 0 ) + << thread.items + << thread.last_item.id + << R(");"); - r = AssertQuery(query.str()); - AssertResultStatus(r, PGRES_COMMAND_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_COMMAND_OK); thread.id = AssertCurrval("core.thread_id_seq"); } @@ -1871,7 +1549,6 @@ Error Db::AddThread(Thread & thread) ClearResult(r); - return status; } @@ -1884,12 +1561,15 @@ Error Db::EditThreadAddItem(long dir_id, long item_id) try { - AssertConnection(); - std::ostringstream query; - query << "update core.thread set (last_item, items) = ('" << item_id << "', items+1) where dir_id='" << dir_id << "';"; + query.Clear(); + query << R("update core.thread set (last_item, items) = (") + << item_id + << R(", items+1) where dir_id=") + << dir_id + << R(";"); - r = AssertQuery(query.str()); - AssertResultStatus(r, PGRES_COMMAND_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_COMMAND_OK); } catch(const Error & e) { @@ -1910,25 +1590,30 @@ Error Db::EditThreadRemoveItem(long dir_id) try { - AssertConnection(); - std::ostringstream query, query2; - long last_item_id = -1; - - query << "select id from core.item where parent_id='" << dir_id << "' order by date_creation desc limit 1;"; - r = AssertQuery( query.str() ); - AssertResultStatus(r, PGRES_TUPLES_OK); - if( PQntuples(r) == 1 ) - last_item_id = atol( AssertValue(r, 0, 0) ); + query.Clear(); + query << R("select id from core.item where parent_id=") + << dir_id + << R(" order by date_creation desc limit 1;"); + + r = AssertQuery(query); + AssertResult(r, PGRES_TUPLES_OK); + + if( Rows(r) == 1 ) + last_item_id = AssertValueLong(r, 0, 0); ClearResult(r); - query2 << "update core.thread set (items, last_item) = (items-1,'" << last_item_id - << "') where dir_id='" << dir_id << "';"; + query.Clear(); + query << R("update core.thread set (items, last_item) = (items-1,") + << last_item_id + << R(") where dir_id=") + << dir_id + << R(";"); - r = AssertQuery(query2.str()); - AssertResultStatus(r, PGRES_COMMAND_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_COMMAND_OK); } catch(const Error & e) { @@ -1937,11 +1622,12 @@ Error Db::EditThreadRemoveItem(long dir_id) ClearResult(r); - return status; } + + Error Db::RemoveThread(long dir_id) { PGresult * r = 0; @@ -1949,21 +1635,16 @@ Error Db::RemoveThread(long dir_id) try { - AssertConnection(); - std::ostringstream query; - query << "delete from core.thread where dir_id='" << dir_id << "';"; + query.Clear(); + query << R("delete from core.thread where dir_id=") << dir_id << R(";"); - const char * crows = PQcmdTuples(r); - long rows = 0; + r = AssertQuery(query); + AssertResult(r, PGRES_COMMAND_OK); - if( crows ) - rows = atol(crows); + long rows = AffectedRows(r); if( rows > 0 ) log << log2 << "Db: deleted " << rows << " rows from core.thread" << logend; - - r = AssertQuery(query.str()); - AssertResultStatus(r, PGRES_COMMAND_OK); } catch(const Error & e) { @@ -1988,18 +1669,16 @@ Error Db::GetTicketByDirId(long dir_id, Ticket & ticket) try { - AssertConnection(); - - std::ostringstream query; - query << "select ticket.id, ticket.dir_id, ticket.parent_id, ticket.type, ticket.status, ticket.priority, " - "ticket.category, ticket.expected, ticket.progress, ticket.item_id " - "from core.ticket " - "where ticket.dir_id = '" << dir_id << "';"; + query.Clear(); + query << R("select ticket.id, ticket.dir_id, ticket.parent_id, ticket.type, ticket.status, ticket.priority, " + "ticket.category, ticket.expected, ticket.progress, ticket.item_id " + "from core.ticket " + "where ticket.dir_id=") << dir_id << R(";"); - r = AssertQuery( query.str() ); - AssertResultStatus(r, PGRES_TUPLES_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_TUPLES_OK); - int rows = PQntuples(r); + int rows = Rows(r); if( rows > 1 ) log << log1 << "Db: there is more than one ticket with dir_id: " << dir_id << logend; @@ -2033,18 +1712,16 @@ Error Db::GetTickets(long parent_id, std::vector & ticket_tab) try { - AssertConnection(); + query.Clear(); + query << R("select ticket.id, ticket.dir_id, ticket.parent_id, ticket.type, ticket.status, ticket.priority, " + "ticket.category, ticket.expected, ticket.progress, ticket.item_id " + "from core.ticket " + "where ticket.parent_id = ") << parent_id << R(";"); - std::ostringstream query; - query << "select ticket.id, ticket.dir_id, ticket.parent_id, ticket.type, ticket.status, ticket.priority, " - "ticket.category, ticket.expected, ticket.progress, ticket.item_id " - "from core.ticket " - "where ticket.parent_id = '" << parent_id << "';"; + r = AssertQuery(query); + AssertResult(r, PGRES_TUPLES_OK); - r = AssertQuery( query.str() ); - AssertResultStatus(r, PGRES_TUPLES_OK); - - int rows = PQntuples(r); + int rows = Rows(r); Ticket ticket; TicketColumns tc; @@ -2077,16 +1754,14 @@ bool Db::IsTicket(long dir_id) try { - AssertConnection(); - - std::ostringstream query; + query.Clear(); query << "select ticket.id from core.ticket " "where ticket.dir_id = '" << dir_id << "';"; - r = AssertQuery( query.str() ); - AssertResultStatus(r, PGRES_TUPLES_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_TUPLES_OK); - is_ticket = (PQntuples(r) == 1); + is_ticket = (Rows(r) == 1); } catch(const Error &) { @@ -2107,21 +1782,22 @@ Error Db::AddTicket(Ticket & ticket) try { - AssertConnection(); - std::ostringstream query; - query << "insert into core.ticket (dir_id, parent_id, type, status, priority, category, expected, progress, item_id) values ("; - query << '\'' << ticket.dir_id << "', "; - query << '\'' << ticket.parent_id << "', "; - query << '\'' << ticket.type << "', "; - query << '\'' << ticket.status << "', "; - query << '\'' << ticket.priority << "', "; - query << '\'' << ticket.category << "', "; - query << '\'' << ticket.expected << "', "; - query << '\'' << ticket.progress << "', "; - query << '\'' << ticket.item_id << "');"; + query.Clear(); + query << R("insert into core.ticket (dir_id, parent_id, type, status, priority, " + "category, expected, progress, item_id) values (") + << ticket.dir_id + << ticket.parent_id + << ticket.type + << ticket.status + << ticket.priority + << ticket.category + << ticket.expected + << ticket.progress + << ticket.item_id + << R(");"); - r = AssertQuery(query.str()); - AssertResultStatus(r, PGRES_COMMAND_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_COMMAND_OK); ticket.id = AssertCurrval("core.ticket_id_seq"); } @@ -2136,6 +1812,8 @@ return status; } + + Error Db::EditTicketById(Ticket & ticket) { PGresult * r = 0; @@ -2143,22 +1821,24 @@ Error Db::EditTicketById(Ticket & ticket) try { - AssertConnection(); - std::ostringstream query; - query << "update core.ticket set (dir_id, parent_id, type, status, priority, category, expected, progress, item_id) = ("; - query << '\'' << ticket.dir_id << "', "; - query << '\'' << ticket.parent_id << "', "; - query << '\'' << ticket.type << "', "; - query << '\'' << ticket.status << "', "; - query << '\'' << ticket.priority << "', "; - query << '\'' << ticket.category << "', "; - query << '\'' << ticket.expected << "', "; - query << '\'' << ticket.progress << "', "; - query << '\'' << ticket.item_id << "') "; - query << "where id='" << ticket.id << "';"; - - r = AssertQuery(query.str()); - AssertResultStatus(r, PGRES_COMMAND_OK); + query.Clear(); + query << R("update core.ticket set (dir_id, parent_id, type, status, " + "priority, category, expected, progress, item_id) = (") + << ticket.dir_id + << ticket.parent_id + << ticket.type + << ticket.status + << ticket.priority + << ticket.category + << ticket.expected + << ticket.progress + << ticket.item_id + << R(") where id=") + << ticket.id + << R(";"); + + r = AssertQuery(query); + AssertResult(r, PGRES_COMMAND_OK); } catch(const Error & e) { @@ -2171,6 +1851,7 @@ return status; } + Error Db::EditTicketRemoveItem(long item_id) { PGresult * r = 0; @@ -2178,13 +1859,11 @@ Error Db::EditTicketRemoveItem(long item_id) try { - AssertConnection(); - std::ostringstream query; + query.Clear(); + query << R("update core.ticket set item_id = -1 where item_id=") << item_id << R(";"); - query << "update core.ticket set item_id = '-1' where item_id='" << item_id << "';"; - - r = AssertQuery(query.str()); - AssertResultStatus(r, PGRES_COMMAND_OK); + r = AssertQuery(query); + AssertResult(r, PGRES_COMMAND_OK); } catch(const Error & e) { @@ -2193,11 +1872,11 @@ Error Db::EditTicketRemoveItem(long item_id) ClearResult(r); - return status; } + Error Db::RemoveTicket(long dir_id) { PGresult * r = 0; @@ -2205,21 +1884,17 @@ Error Db::RemoveTicket(long dir_id) try { - AssertConnection(); - std::ostringstream query; - query << "delete from core.ticket where dir_id='" << dir_id << "';"; + query.Clear(); + query << R("delete from core.ticket where dir_id=") << dir_id << R(";"); - const char * crows = PQcmdTuples(r); - long rows = 0; + r = AssertQuery(query); + AssertResult(r, PGRES_COMMAND_OK); - if( crows ) - rows = atol(crows); + long rows = AffectedRows(r); if( rows > 0 ) log << log2 << "Db: deleted " << rows << " rows from core.ticket" << logend; - r = AssertQuery(query.str()); - AssertResultStatus(r, PGRES_COMMAND_OK); } catch(const Error & e) { @@ -2232,3 +1907,36 @@ return status; } + + + +void Db::TicketColumns::SetColumns(PGresult * r) +{ + // PQfnumber returns -1 if there is no such a column + id = PQfnumber(r, "id"); + dir_id = PQfnumber(r, "dir_id"); + parent_id = PQfnumber(r, "parent_id"); + type = PQfnumber(r, "type"); + status = PQfnumber(r, "status"); + priority = PQfnumber(r, "priority"); + category = PQfnumber(r, "category"); + expected = PQfnumber(r, "expected"); + progress = PQfnumber(r, "progress"); + item_id = PQfnumber(r, "item_id"); +} + + +void Db::TicketColumns::SetTicket(PGresult * r, long row, Ticket & ticket) +{ + if( id != -1 ) ticket.id = DbBase::AssertValueLong(r, row, id); + if( dir_id != -1 ) ticket.dir_id = DbBase::AssertValueLong(r, row, dir_id); + if( parent_id != -1 ) ticket.parent_id = DbBase::AssertValueLong(r, row, parent_id); + if( type != -1 ) ticket.type = DbBase::AssertValueInt(r, row, type); + if( status != -1 ) ticket.status = DbBase::AssertValueInt(r, row, status); + if( priority != -1 ) ticket.priority = DbBase::AssertValueInt(r, row, priority); + if( category != -1 ) ticket.category = DbBase::AssertValueInt(r, row, category); + if( expected != -1 ) ticket.expected = DbBase::AssertValueInt(r, row, expected); + if( progress != -1 ) ticket.progress = DbBase::AssertValueInt(r, row, progress); + if( item_id != -1 ) ticket.item_id = DbBase::AssertValueLong(r, row, item_id); +} + diff --git a/db/db.h b/db/db.h index a4244a1..04b07e7 100755 --- a/db/db.h +++ b/db/db.h @@ -7,43 +7,41 @@ * */ -#ifndef headerfilecmslucoredb -#define headerfilecmslucoredb +#ifndef headerfile_winix_db_db +#define headerfile_winix_db_db - -#include #include #include -#include -#include #include #include #include -#include "item.h" -#include "user.h" -#include "group.h" -#include "thread.h" -#include "error.h" -#include "dircontainer.h" -#include "ugcontainer.h" -#include "ticket.h" +#include "dbbase.h" +#include "dbitemquery.h" +#include "dbitemcolumns.h" + +#include "core/item.h" +#include "core/user.h" +#include "core/group.h" +#include "core/thread.h" +#include "core/error.h" +#include "core/dircontainer.h" +#include "core/ugcontainer.h" +#include "core/ticket.h" -class Db + + +class Db : public DbBase { public: - Db(bool close_at_end_ = true); - ~Db(); - // !! przerobic tak aby GetItem zwracalo wszystkie pozycja // !! GetFile tylko dla plikow // !! GetDir tylko dla katalogow // !! GetFile i GetDir beda uzywac GetItem - void Init(const std::string & database, const std::string & user, const std::string & pass); - void WaitForConnection(); + bool CheckUser(const std::string & login, const std::string & password, long & user_id); Error AddUser(User & user, const std::string & password); @@ -54,91 +52,9 @@ public: void CheckAllUrlSubject(); - struct ItemQuery - { - // id is selected always - bool sel_parent_id; // parent_id - bool sel_user_id; // user_id, modification_user_id - bool sel_group_id; // group_id - bool sel_guest_name; // guest_name - bool sel_privileges; // privileges - bool sel_date; // date_creation, date_modification - bool sel_subject; // subject - bool sel_content; // content, content_type, (content_id) - bool sel_url; // url - bool sel_type; // type (dir, file, none) - bool sel_default_item; // default_item - bool sel_auth; // auth, auth_path - bool sel_html_template; // template - bool where_id; // - bool where_parent_id; // - bool where_type; - bool where_auth; - - long id; // if where_id is true - long parent_id; // if where_parent_id is true - Item::Type type; - Item::Auth auth; - bool auth_equal; // if true means auth should be equal - - bool sort_asc; - - - void SetAllSel(bool sel) - { - sel_parent_id = sel; - sel_user_id = sel; - sel_group_id = sel; - sel_guest_name = sel; - sel_privileges = sel; - sel_date = sel; - sel_subject = sel; - sel_content = sel; - sel_url = sel; - sel_type = sel; - sel_default_item= sel; - sel_auth = sel; - sel_html_template= sel; - } - - void SetAllWhere(bool where_) - { - where_id = where_; - where_parent_id = where_; - where_type = where_; - where_auth = where_; - } - - void SetAll(bool sel, bool where_) - { - SetAllSel(sel); - SetAllWhere(where_); - } - - void WhereId(long id_) { where_id = true; id = id_; } - void WhereParentId(long parent_id_) { where_parent_id = true; parent_id = parent_id_; } - void WhereType(Item::Type type_) { where_type = true; type = type_; } - void WhereAuth(Item::Auth st, - bool equal = true) { where_auth = true; auth = st; auth_equal = equal; } - - ItemQuery() - { - sort_asc = true; - auth_equal = true; - - SetAll(true, false); - - id = -1; - parent_id = -1; - type = Item::none; - auth = Item::auth_none; - } - }; - - - void GetItems(std::vector & item_tab, const ItemQuery & item_query); - void GetItems(std::vector & item_tab, const ItemQuery & item_query); + void GetItems(std::vector & item_tab, const DbItemQuery & item_query); + void GetItems(std::vector & item_tab, const DbItemQuery & item_query); // !! pobiera tylko jeden item (cos wymyslec innego z nazwa albo argumentem) @@ -171,12 +87,6 @@ public: long GetFileId(long parent_id, const std::string & url); long GetDirId(long parent_id, const std::string & url); - static tm ConvertTime(const char * str); - static const char * ConvertTime(const tm & t); - - PGconn * GetPGconn(); - - virtual void Connect(); Error AddThread(Thread & thread); @@ -197,24 +107,9 @@ public: protected: - PGconn * pg_conn; - std::string db_database, db_user, db_pass; - bool close_at_end; - - void SetDbParameters(); - - void Close(); - - bool AssertConnection(bool put_log = true, bool throw_if_no_connection = true); + DbTextStream query, query_create_url; + std::string temp_url; - std::string Escape(const std::string & s); - std::string Escape(const char * s); - PGresult * AssertQuery(const std::string & q); - void AssertResultStatus(PGresult * r, ExecStatusType t); - static int AssertColumn(PGresult * r, const char * column_name); - static const char * AssertValue(PGresult * r, int row, int col); - void ClearResult(PGresult * r); - long AssertCurrval(const char * table); bool AddItemCreateUrlSubject(Item & item); Error AddItemIntoContent(Item & item); @@ -227,24 +122,15 @@ protected: void CheckAllUrlSubjectModifyItem(Item & item); - PGresult * GetItemsQuery(const ItemQuery & iq, bool skip_other_sel = false); + PGresult * GetItemsQuery(const DbItemQuery & iq, bool skip_other_sel = false); bool DelItemDelItem(const Item & item); void DelItemDelContent(const Item & item); Error DelItemCountContents(const Item & item, long & contents); - struct ItemColumns - { - int id, user_id, group_id, privileges, date_creation, date_modification, url, type, parent_id, - content_id, default_item, subject, content, content_type, guest_name, auth, auth_path, - modification_user_id, html_template; - - void SetColumns(PGresult * r); - void SetItem(PGresult * r, long row, Item & item); - }; - - + // !! tymczasowo + // bedzie wszystko w osobnym pluginie struct TicketColumns { int id, dir_id, parent_id, type, status, priority, category, expected, progress, item_id; @@ -253,10 +139,7 @@ protected: void SetTicket(PGresult * r, long row, Ticket & ticket); }; -}; // class Db - - - +}; #endif diff --git a/db/db_itemcolumns.cpp b/db/db_itemcolumns.cpp deleted file mode 100755 index a370183..0000000 --- a/db/db_itemcolumns.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/* - * This file is a part of Winix - * and is not publicly distributed - * - * Copyright (c) 2008-2010, Tomasz Sowa - * All rights reserved. - * - */ - -#include "db.h" - - - -void Db::ItemColumns::SetColumns(PGresult * r) -{ - // PQfnumber returns -1 if there is no such a column - id = PQfnumber(r, "id"); - user_id = PQfnumber(r, "user_id"); - group_id = PQfnumber(r, "group_id"); - privileges = PQfnumber(r, "privileges"); - date_creation = PQfnumber(r, "date_creation"); - date_modification = PQfnumber(r, "date_modification"); - url = PQfnumber(r, "url"); - type = PQfnumber(r, "type"); - parent_id = PQfnumber(r, "parent_id"); - content_id = PQfnumber(r, "content_id"); - default_item = PQfnumber(r, "default_item"); - subject = PQfnumber(r, "subject"); - content = PQfnumber(r, "content"); - content_type = PQfnumber(r, "content_type"); - guest_name = PQfnumber(r, "guest_name"); - auth = PQfnumber(r, "auth"); - auth_path = PQfnumber(r, "auth_path"); - html_template = PQfnumber(r, "template"); - modification_user_id = PQfnumber(r, "modification_user_id"); -} - - - -void Db::ItemColumns::SetItem(PGresult * r, long row, Item & item) -{ - if( id != -1 ) item.id = atol( Db::AssertValue(r, row, id) ); - if( user_id != -1 ) item.user_id = atol( Db::AssertValue(r, row, user_id) ); - if( group_id != -1 ) item.group_id = atol( Db::AssertValue(r, row, group_id) ); - if( privileges != -1 ) item.privileges = atoi( Db::AssertValue(r, row, privileges) ); - if( date_creation != -1 ) item.date_creation = ConvertTime( Db::AssertValue(r, row, date_creation) ); - if( date_modification != -1 ) item.date_modification = ConvertTime( Db::AssertValue(r, row, date_modification) ); - if( url != -1 ) item.url = Db::AssertValue(r, row, url); - if( type != -1 ) item.type = static_cast( atoi(Db::AssertValue(r, row, type)) ); - if( parent_id != -1 ) item.parent_id = atol( Db::AssertValue(r, row, parent_id) ); - if( content_id != -1 ) item.content_id = atol( Db::AssertValue(r, row, content_id) ); - if( default_item != -1 ) item.default_item = atol( Db::AssertValue(r, row, default_item) ); - if( subject != -1 ) item.subject = Db::AssertValue(r, row, subject); - if( content != -1 ) item.content = Db::AssertValue(r, row, content); - if( content_type != -1 ) item.content_type = static_cast( atoi(Db::AssertValue(r, row, content_type)) ); - if( guest_name != -1 ) item.guest_name = Db::AssertValue(r, row, guest_name); - if( auth != -1 ) item.auth = static_cast( atoi(Db::AssertValue(r, row, auth)) ); - if( auth_path != -1 ) item.auth_path = Db::AssertValue(r, row, auth_path); - if( html_template != -1 ) item.html_template = Db::AssertValue(r, row, html_template); - if( modification_user_id != -1 ) item.modification_user_id = atol( Db::AssertValue(r, row, modification_user_id) ); -} - - - - - - -void Db::TicketColumns::SetColumns(PGresult * r) -{ - // PQfnumber returns -1 if there is no such a column - id = PQfnumber(r, "id"); - dir_id = PQfnumber(r, "dir_id"); - parent_id = PQfnumber(r, "parent_id"); - type = PQfnumber(r, "type"); - status = PQfnumber(r, "status"); - priority = PQfnumber(r, "priority"); - category = PQfnumber(r, "category"); - expected = PQfnumber(r, "expected"); - progress = PQfnumber(r, "progress"); - item_id = PQfnumber(r, "item_id"); -} - - -void Db::TicketColumns::SetTicket(PGresult * r, long row, Ticket & ticket) -{ - if( id != -1 ) ticket.id = atol( Db::AssertValue(r, row, id) ); - if( dir_id != -1 ) ticket.dir_id = atol( Db::AssertValue(r, row, dir_id) ); - if( parent_id != -1 ) ticket.parent_id = atol( Db::AssertValue(r, row, parent_id) ); - if( type != -1 ) ticket.type = atoi( Db::AssertValue(r, row, type) ); - if( status != -1 ) ticket.status = atoi( Db::AssertValue(r, row, status) ); - if( priority != -1 ) ticket.priority = atoi( Db::AssertValue(r, row, priority) ); - if( category != -1 ) ticket.category = atoi( Db::AssertValue(r, row, category) ); - if( expected != -1 ) ticket.expected = atoi( Db::AssertValue(r, row, expected) ); - if( progress != -1 ) ticket.progress = atoi( Db::AssertValue(r, row, progress) ); - if( item_id != -1 ) ticket.item_id = atol( Db::AssertValue(r, row, item_id) ); -} - - - diff --git a/db/dbbase.cpp b/db/dbbase.cpp new file mode 100755 index 0000000..c6d225e --- /dev/null +++ b/db/dbbase.cpp @@ -0,0 +1,301 @@ +/* + * This file is a part of Winix + * and is not publicly distributed + * + * Copyright (c) 2010, Tomasz Sowa + * All rights reserved. + * + */ + +#include "dbbase.h" +#include "core/log.h" +#include "core/error.h" +#include +#include +#include + + + +DbBase::DbBase() +{ + db_conn = 0; + log_queries = false; +} + + + +void DbBase::SetConn(DbConn * conn) +{ + db_conn = conn; +} + + + +void DbBase::SetConn(DbConn & conn) +{ + db_conn = &conn; +} + + +DbConn * DbBase::GetConn() +{ + return db_conn; +} + + + +void DbBase::LogQueries(bool log_q) +{ + log_queries = log_q; +} + + + +PGresult * DbBase::AssertQuery(const char * q) +{ + if( log_queries ) + log << log1 << "Db: executing query: " << q << logend; + + bool bad_query = false; + PGresult * r = PQexec(db_conn->GetPgConn(), q); + + if( !r ) + { + bad_query = true; + + if( PQstatus(db_conn->GetPgConn()) != CONNECTION_OK ) + { + db_conn->AssertConnection(); + r = PQexec(db_conn->GetPgConn(), q); + + if( r ) + bad_query = false; + } + } + + + if( bad_query ) + { + log << log1 << "Db: Problem with this query: \"" << q << '\"' << logend; + log << log1 << "Db: " << PQerrorMessage(db_conn->GetPgConn()) << logend; + + throw Error(WINIX_ERR_DB_INCORRECT_QUERY); + } + +return r; +} + + +PGresult * DbBase::AssertQuery(const std::string & q) +{ + return AssertQuery(q.c_str()); +} + + +PGresult * DbBase::AssertQuery(const DbTextStream & query) +{ + return AssertQuery(query.CStr()); +} + + +void DbBase::AssertResult(PGresult * r, ExecStatusType t) +{ + if( PQresultStatus(r) != t ) + { + log << "Db: Incorrect result status: " << PQerrorMessage(db_conn->GetPgConn()) << logend; + + throw Error(WINIX_ERR_DB_INCORRENT_RESULT_STATUS); + } +} + + + +int DbBase::AssertColumn(PGresult * r, const char * column_name) +{ + int c = PQfnumber(r, column_name); + + if( c == -1 ) + { + log << log1 << "Db: there is no column: " << column_name << logend; + + throw Error(WINIX_ERR_DB_NO_COLUMN); + } + +return c; +} + + +const char * DbBase::AssertValue(PGresult * r, int row, int col) +{ + const char * res = PQgetvalue(r, row, col); + + if( !res ) + { + log << log1 << "Db: there is no such an item in the result, row:" << row << ", col:" << col << logend; + + throw Error(WINIX_ERR_NO_ITEM); + } + +return res; +} + + +long DbBase::AssertValueLong(PGresult * r, int row, int col) +{ + return strtol( AssertValue(r, row, col), 0, 10 ); +} + + +int DbBase::AssertValueInt(PGresult * r, int row, int col) +{ + return (int)strtol( AssertValue(r, row, col), 0, 10 ); +} + + + +unsigned long DbBase::AssertValueULong(PGresult * r, int row, int col) +{ + return strtoul( AssertValue(r, row, col), 0, 10 ); +} + + +unsigned int DbBase::AssertValueUInt(PGresult * r, int row, int col) +{ + return (unsigned int)strtoul( AssertValue(r, row, col), 0, 10 ); +} + + + +void DbBase::ClearResult(PGresult * r) +{ + if( r ) + PQclear(r); +} + + +bool DbBase::IsNull(PGresult * r, int row, int col) +{ + return PQgetisnull(r, row, col) == 1; +} + + +int DbBase::Rows(PGresult * r) +{ + // PQntuples - Returns the number of rows (tuples) in the query result. Because it returns + // an integer result, large result sets might overflow the return value on 32-bit operating systems. + return PQntuples(r); +} + + +int DbBase::Cols(PGresult * r) +{ + // PQnfields - Returns the number of columns (fields) in each row of the query result. + return PQnfields(r); +} + + +long DbBase::AffectedRows(PGresult * r) +{ + // PQcmdTuples - This function returns a string containing the number of rows affected by the SQL + // statement that generated the PGresult. This function can only be used following the execution + // of an INSERT, UPDATE, DELETE, MOVE, FETCH, or COPY statement, or [...] + char * rows_str = PQcmdTuples(r); // can be an empty string + long rows = 0; + + if( rows_str ) + { + rows = strtol(rows_str, 0, 10); + // strtol - If an overflow or underflow occurs, errno is set to ERANGE + // and the function return value is clamped according to the following table: + // Function underflow overflow + // strtol() LONG_MIN LONG_MAX + + if( rows < 0 ) + rows = 0; + } + +return rows; +} + + +long DbBase::AssertCurrval(const char * table) +{ + PGresult * r; + + bquery.Clear(); + bquery << R("select currval(") + << table + << R(");"); + + r = AssertQuery(bquery); + AssertResult(r, PGRES_TUPLES_OK); + + if( Rows(r) != 1 ) + { + log << log1 << "Db: error (currval) for table: " << table << ", " << PQerrorMessage(db_conn->GetPgConn()) << logend; + throw Error(WINIX_ERR_DB_ERR_CURRVAL); + } + +return AssertValueLong(r, 0, 0); +} + + + + +tm DbBase::ConvertTime(const char * str) +{ +tm t; + + memset(&t, 0, sizeof(t)); + + if( !str ) + return t; + + size_t len = strlen(str); + + if( len != 19 ) + { + // the format must be like this: 2008-12-31 22:30:00 + log << log1 << "DbBase: ConvertTime: unknown time format: \"" << str << "\""; + return t; + } + + t.tm_year = atoi(str + 0) - 1900; /* year - 1900 */ + t.tm_mon = atoi(str + 5) - 1; /* month of year (0 - 11) */ + t.tm_mday = atoi(str + 8); /* day of month (1 - 31) */ + t.tm_hour = atoi(str + 11); /* hours (0 - 23) */ + t.tm_min = atoi(str + 14); /* minutes (0 - 59) */ + t.tm_sec = atoi(str + 17); /* seconds (0 - 60) */ + + // t.tm_wday = 0; /* day of week (Sunday = 0) */ + // t.tm_yday = 0; /* day of year (0 - 365) */ + // t.tm_isdst = 0; /* is summer time in effect? */ + // t.tm_zone = 0; // const_cast(""); /* abbreviation of timezone name */ + +return t; +} + + +const char * DbBase::ConvertTime(const tm & t) +{ +// not thread safe +static char buffer[100]; + + sprintf(buffer, "%04d-%02d-%02d %02d:%02d:%02d", + t.tm_year + 1900, + t.tm_mon + 1, + t.tm_mday, + t.tm_hour, + t.tm_min, + t.tm_sec); + +return buffer; +} + + + + + + + + diff --git a/db/dbbase.h b/db/dbbase.h new file mode 100755 index 0000000..9984abd --- /dev/null +++ b/db/dbbase.h @@ -0,0 +1,75 @@ +/* + * This file is a part of Winix + * and is not publicly distributed + * + * Copyright (c) 2010, Tomasz Sowa + * All rights reserved. + * + */ + +#ifndef headerfile_winix_db_dbbase +#define headerfile_winix_db_dbbase + + +#include "dbconn.h" +#include "dbtextstream.h" + + +class DbBase +{ +public: + + DbBase(); + + void SetConn(DbConn * conn); + void SetConn(DbConn & conn); + DbConn * GetConn(); + + void LogQueries(bool log_q); + + PGresult * AssertQuery(const char * query); + PGresult * AssertQuery(const std::string & query); + PGresult * AssertQuery(const DbTextStream & query); + void AssertResult(PGresult * r, ExecStatusType t); + static int AssertColumn(PGresult * r, const char * column_name); + + static const char * AssertValue(PGresult * r, int row, int col); + static long AssertValueLong(PGresult * r, int row, int col); + static int AssertValueInt(PGresult * r, int row, int col); + static unsigned long AssertValueULong(PGresult * r, int row, int col); + static unsigned int AssertValueUInt(PGresult * r, int row, int col); + + void ClearResult(PGresult * r); + long AssertCurrval(const char * table); + + bool IsNull(PGresult * r, int row, int col); + int Rows(PGresult * r); + int Cols(PGresult * r); + long AffectedRows(PGresult * r); + + static tm ConvertTime(const char * str); + static const char * ConvertTime(const tm & t); // warning: it uses its own static buffer + +protected: + + // a helper method for escaping strings + template + DbTextStream::RawText R(const RawType & par) + { + return DbTextStream::RawText(par); + } + + DbConn * db_conn; + bool log_queries; + +private: + + DbTextStream bquery; + +}; + + + + +#endif + diff --git a/db/dbconn.cpp b/db/dbconn.cpp new file mode 100755 index 0000000..f727c7f --- /dev/null +++ b/db/dbconn.cpp @@ -0,0 +1,153 @@ +/* + * This file is a part of Winix + * and is not publicly distributed + * + * Copyright (c) 2010, Tomasz Sowa + * All rights reserved. + * + */ + +#include "dbconn.h" +#include "core/log.h" +#include "core/error.h" + + + + + +DbConn::DbConn() +{ + pg_conn = 0; +} + + + +DbConn::~DbConn() +{ + Close(); +} + + + +PGconn * DbConn::GetPgConn() +{ + return pg_conn; +} + + + +void DbConn::SetConnParam(const std::string & d, const std::string & u, const std::string & p) +{ + db_database = d; + db_user = u; + db_pass = p; +} + + + +void DbConn::Connect() +{ + Close(); + + conn_info.Clear(); + conn_info.SetExtented(false); + + conn_info << R("dbname=") << db_database + << R(" user=") << db_user + << R(" password=") << db_pass; + + pg_conn = PQconnectdb(conn_info.CStr()); + + // warning! pg_conn can be not null but there cannnot be a connection established + // use PQstatus(pg_conn) to check whether the connection works fine +} + + + +void DbConn::LogConnectionSocket() +{ + log << log2 << "Db: connection to the database works fine" << logend; + log << log3 << "Db: connection socket: " << PQsocket(pg_conn) << logend; +} + + + +void DbConn::WaitForConnection() +{ + if( !pg_conn || PQstatus(pg_conn) != CONNECTION_OK ) + { + log << log3 << "Db: waiting for the db to be ready...." << logend; + + while( !AssertConnection(false, false) ) + sleep(5); + + LogConnectionSocket(); + } +} + + + +void DbConn::Close() +{ + if( pg_conn ) + { + PQfinish(pg_conn); + pg_conn = 0; + } +} + + + +bool DbConn::AssertConnection(bool put_log, bool throw_if_no_connection) +{ +bool was_connection = true; + + + if( !pg_conn ) + { + was_connection = false; + Connect(); + } + else + if( PQstatus(pg_conn) != CONNECTION_OK ) + { + if( put_log ) + log << log2 << "Db: connection to the database is lost, trying to recover" << logend; + + was_connection = false; + PQreset(pg_conn); + } + + + if( pg_conn && PQstatus(pg_conn) == CONNECTION_OK ) + { + if( !was_connection ) + { + if( put_log ) + LogConnectionSocket(); + + SetDbParameters(); + } + + return true; + } + else + { + if( put_log ) + log << log1 << "Db: connection to db server cannot be established" << logend; + + if( throw_if_no_connection ) + throw Error(WINIX_ERR_DB_FATAL_ERROR_DURING_CONNECTING); + + return false; + } +} + + + +void DbConn::SetDbParameters() +{ + if( PQsetClientEncoding(pg_conn, "LATIN2") == -1 ) + log << log1 << "Db: Can't set the proper client encoding" << logend; +} + diff --git a/db/dbconn.h b/db/dbconn.h new file mode 100755 index 0000000..163b915 --- /dev/null +++ b/db/dbconn.h @@ -0,0 +1,55 @@ +/* + * This file is a part of Winix + * and is not publicly distributed + * + * Copyright (c) 2010, Tomasz Sowa + * All rights reserved. + * + */ + +#ifndef headerfile_winix_db_dbconn +#define headerfile_winix_db_dbconn + +#include +#include +#include "dbtextstream.h" + + + + +class DbConn +{ +public: + + DbConn(); + ~DbConn(); + + void SetConnParam(const std::string & database, const std::string & user, const std::string & pass); + void Connect(); + void WaitForConnection(); + void Close(); + bool AssertConnection(bool put_log = true, bool throw_if_no_connection = true); + void SetDbParameters(); + PGconn * GetPgConn(); + +private: + + void LogConnectionSocket(); + + PGconn * pg_conn; + std::string db_database, db_user, db_pass; + DbTextStream conn_info; + + // a helper method for escaping strings + template + DbTextStream::RawText R(const RawType & par) + { + return DbTextStream::RawText(par); + } +}; + + + + +#endif + diff --git a/db/dbitemcolumns.cpp b/db/dbitemcolumns.cpp new file mode 100755 index 0000000..24bb05f --- /dev/null +++ b/db/dbitemcolumns.cpp @@ -0,0 +1,66 @@ +/* + * This file is a part of Winix + * and is not publicly distributed + * + * Copyright (c) 2008-2010, Tomasz Sowa + * All rights reserved. + * + */ + +#include "dbitemcolumns.h" +#include "dbbase.h" + + + +void DbItemColumns::SetColumns(PGresult * r) +{ + // PQfnumber returns -1 if there is no such a column + id = PQfnumber(r, "id"); + user_id = PQfnumber(r, "user_id"); + group_id = PQfnumber(r, "group_id"); + privileges = PQfnumber(r, "privileges"); + date_creation = PQfnumber(r, "date_creation"); + date_modification = PQfnumber(r, "date_modification"); + url = PQfnumber(r, "url"); + type = PQfnumber(r, "type"); + parent_id = PQfnumber(r, "parent_id"); + content_id = PQfnumber(r, "content_id"); + default_item = PQfnumber(r, "default_item"); + subject = PQfnumber(r, "subject"); + content = PQfnumber(r, "content"); + content_type = PQfnumber(r, "content_type"); + guest_name = PQfnumber(r, "guest_name"); + auth = PQfnumber(r, "auth"); + auth_path = PQfnumber(r, "auth_path"); + html_template = PQfnumber(r, "template"); + modification_user_id = PQfnumber(r, "modification_user_id"); +} + + + +void DbItemColumns::SetItem(PGresult * r, long row, Item & item) +{ + if( id != -1 ) item.id = DbBase::AssertValueLong(r, row, id); + if( user_id != -1 ) item.user_id = DbBase::AssertValueLong(r, row, user_id); + if( group_id != -1 ) item.group_id = DbBase::AssertValueLong(r, row, group_id); + if( privileges != -1 ) item.privileges = DbBase::AssertValueInt(r, row, privileges); + if( date_creation != -1 ) item.date_creation = DbBase::ConvertTime( DbBase::AssertValue(r, row, date_creation) ); + if( date_modification != -1 ) item.date_modification = DbBase::ConvertTime( DbBase::AssertValue(r, row, date_modification) ); + if( url != -1 ) item.url = DbBase::AssertValue(r, row, url); + if( type != -1 ) item.type = static_cast( DbBase::AssertValueInt(r, row, type) ); + if( parent_id != -1 ) item.parent_id = DbBase::AssertValueLong(r, row, parent_id); + if( content_id != -1 ) item.content_id = DbBase::AssertValueLong(r, row, content_id); + if( default_item != -1 ) item.default_item = DbBase::AssertValueLong(r, row, default_item); + if( subject != -1 ) item.subject = DbBase::AssertValue(r, row, subject); + if( content != -1 ) item.content = DbBase::AssertValue(r, row, content); + if( content_type != -1 ) item.content_type = static_cast( DbBase::AssertValueInt(r, row, content_type) ); + if( guest_name != -1 ) item.guest_name = DbBase::AssertValue(r, row, guest_name); + if( auth != -1 ) item.auth = static_cast( DbBase::AssertValueInt(r, row, auth) ); + if( auth_path != -1 ) item.auth_path = DbBase::AssertValue(r, row, auth_path); + if( html_template != -1 ) item.html_template = DbBase::AssertValue(r, row, html_template); + if( modification_user_id != -1 ) item.modification_user_id = DbBase::AssertValueLong(r, row, modification_user_id); +} + + + + diff --git a/db/dbitemcolumns.h b/db/dbitemcolumns.h new file mode 100755 index 0000000..4de1b06 --- /dev/null +++ b/db/dbitemcolumns.h @@ -0,0 +1,50 @@ +/* + * This file is a part of Winix + * and is not publicly distributed + * + * Copyright (c) 2010, Tomasz Sowa + * All rights reserved. + * + */ + +#ifndef headerfile_winix_db_dbitemcolumns +#define headerfile_winix_db_dbitemcolumns + + +#include +#include "core/item.h" + + + + +struct DbItemColumns +{ + int id; + int user_id; + int group_id; + int privileges; + int date_creation; + int date_modification; + int url; + int type; + int parent_id; + int content_id; + int default_item; + int subject; + int content; + int content_type; + int guest_name; + int auth; + int auth_path; + int modification_user_id; + int html_template; + + void SetColumns(PGresult * r); + void SetItem(PGresult * r, long row, Item & item); +}; + + + + +#endif + diff --git a/db/dbitemquery.cpp b/db/dbitemquery.cpp new file mode 100755 index 0000000..305461f --- /dev/null +++ b/db/dbitemquery.cpp @@ -0,0 +1,97 @@ +/* + * This file is a part of Winix + * and is not publicly distributed + * + * Copyright (c) 2010, Tomasz Sowa + * All rights reserved. + * + */ + + +#include "dbitemquery.h" + + + +DbItemQuery::DbItemQuery() +{ + sort_asc = true; + auth_equal = true; + + SetAll(true, false); + + id = -1; + parent_id = -1; + type = Item::none; + auth = Item::auth_none; +} + + + +void DbItemQuery::SetAllSel(bool sel) +{ + sel_parent_id = sel; + sel_user_id = sel; + sel_group_id = sel; + sel_guest_name = sel; + sel_privileges = sel; + sel_date = sel; + sel_subject = sel; + sel_content = sel; + sel_url = sel; + sel_type = sel; + sel_default_item = sel; + sel_auth = sel; + sel_html_template = sel; +} + + + +void DbItemQuery::SetAllWhere(bool where_) +{ + where_id = where_; + where_parent_id = where_; + where_type = where_; + where_auth = where_; +} + + + +void DbItemQuery::SetAll(bool sel, bool where_) +{ + SetAllSel(sel); + SetAllWhere(where_); +} + + + +void DbItemQuery::WhereId(long id_) +{ + where_id = true; + id = id_; +} + + + +void DbItemQuery::WhereParentId(long parent_id_) +{ + where_parent_id = true; + parent_id = parent_id_; +} + + + +void DbItemQuery::WhereType(Item::Type type_) +{ + where_type = true; + type = type_; +} + + + +void DbItemQuery::WhereAuth(Item::Auth st, bool equal) +{ + where_auth = true; + auth = st; + auth_equal = equal; +} + diff --git a/db/dbitemquery.h b/db/dbitemquery.h new file mode 100755 index 0000000..fa1fcf9 --- /dev/null +++ b/db/dbitemquery.h @@ -0,0 +1,67 @@ +/* + * This file is a part of Winix + * and is not publicly distributed + * + * Copyright (c) 2010, Tomasz Sowa + * All rights reserved. + * + */ + +#ifndef headerfile_winix_db_dbitemquery +#define headerfile_winix_db_dbitemquery + + +#include "core/item.h" + + + + +struct DbItemQuery +{ + // id is selected always + bool sel_parent_id; // parent_id + bool sel_user_id; // user_id, modification_user_id + bool sel_group_id; // group_id + bool sel_guest_name; // guest_name + bool sel_privileges; // privileges + bool sel_date; // date_creation, date_modification + bool sel_subject; // subject + bool sel_content; // content, content_type, (content_id) + bool sel_url; // url + bool sel_type; // type (dir, file, none) + bool sel_default_item; // default_item + bool sel_auth; // auth, auth_path + bool sel_html_template; // template + + bool where_id; // + bool where_parent_id; // + bool where_type; + bool where_auth; + + long id; // if where_id is true + long parent_id; // if where_parent_id is true + Item::Type type; + Item::Auth auth; + bool auth_equal; // if true means auth should be equal + bool sort_asc; + + + DbItemQuery(); + + void SetAllSel(bool sel); + void SetAllWhere(bool where_); + void SetAll(bool sel, bool where_); + + void WhereId(long id_); + void WhereParentId(long parent_id_); + void WhereType(Item::Type type_); + void WhereAuth(Item::Auth st, bool equal = true); +}; + + + + + + +#endif + diff --git a/db/dbtextstream.cpp b/db/dbtextstream.cpp new file mode 100755 index 0000000..c6808c0 --- /dev/null +++ b/db/dbtextstream.cpp @@ -0,0 +1,364 @@ +/* + * This file is a part of Winix + * and is not publicly distributed + * + * Copyright (c) 2010, Tomasz Sowa + * All rights reserved. + * + */ + +#include "dbtextstream.h" + + + +DbTextStream::DbTextStream() +{ + was_param = false; + ext_escape = true; +} + + +void DbTextStream::SetExtented(bool ext) +{ + ext_escape = ext; +} + + + + + +/* + without escaping +*/ + + +DbTextStream & DbTextStream::PutText(const char * str) +{ + buffer += str; + was_param = false; + +return *this; +} + + +DbTextStream & DbTextStream::PutText(const std::string * str) +{ + return PutText(str->c_str()); +} + + +DbTextStream & DbTextStream::PutText(const std::string & str) +{ + return PutText(str.c_str()); +} + + + +DbTextStream & DbTextStream::operator<<(const DbTextStream::RawText & raw) +{ + return PutText(raw.par); +} + + + + +DbTextStream & DbTextStream::operator<<(DbTextStream::RawText raw) +{ + return PutText(raw.par.c_str()); +} + + +DbTextStream & DbTextStream::operator<<(RawText raw) +{ + TextStream::operator<<(raw.par); + was_param = false; + +return *this; +} + + +DbTextStream & DbTextStream::operator<<(RawText raw) +{ + TextStream::operator<<(raw.par); + was_param = false; + +return *this; +} + + +DbTextStream & DbTextStream::operator<<(RawText raw) +{ + TextStream::operator<<(raw.par); + was_param = false; + +return *this; +} + + +DbTextStream & DbTextStream::operator<<(RawText raw) +{ + TextStream::operator<<(raw.par); + was_param = false; + +return *this; +} + + +DbTextStream & DbTextStream::operator<<(RawText raw) +{ + TextStream::operator<<(raw.par); + was_param = false; + +return *this; +} + + +DbTextStream & DbTextStream::operator<<(RawText raw) +{ + TextStream::operator<<(raw.par); + was_param = false; + +return *this; +} + + +DbTextStream & DbTextStream::operator<<(RawText raw) +{ + TextStream::operator<<(raw.par); + was_param = false; + +return *this; +} + + + + + + +/* + with escaping +*/ + + +// !! sprawdzic jej dzialanie dla kolumn bytea (binarnych) +DbTextStream & DbTextStream::EBinPutChar(char c_) +{ +char buf[10]; + + int c = (unsigned char)c_; + + if( (c>=0 && c<=31) || c>=127 || c==39 || c==92 ) + { + sprintf(buf, "\\\\%03o", c); + buffer += buf; + } + else + { + buffer += c; + } + +return *this; +} + + +DbTextStream & DbTextStream::ETextPutChar(char c) +{ + if( c == '\\' ) + buffer += "\\\\"; + else + if( c == '\'' ) + buffer += "\\\'"; // don't use "''" because we use the method for PQconnectdb too + else + if( c != 0 ) + buffer += c; + +return *this; +} + + + +DbTextStream & DbTextStream::EPutText(const char * str) +{ + if( was_param ) + buffer += ", "; + + if( ext_escape ) + buffer += 'E'; + + buffer += '\''; + + for( ; *str ; ++str ) + ETextPutChar(*str); + + buffer += '\''; + was_param = true; + +return *this; +} + + +DbTextStream & DbTextStream::EPutText(const std::string * str) +{ + return EPutText(str->c_str()); +} + + +DbTextStream & DbTextStream::EPutText(const std::string & str) +{ + return EPutText(str.c_str()); +} + + +// this method can escaped 0 in the middle of the string +DbTextStream & DbTextStream::EPutBin(const char * str, size_t len) +{ + if( was_param ) + buffer += ", "; + + if( ext_escape ) + buffer += 'E'; + + buffer += '\''; + + for(size_t i = 0 ; i < len ; ++i) + EBinPutChar(str[i]); + + buffer += '\''; + was_param = true; + +return *this; +} + + +DbTextStream & DbTextStream::EPutBin(const std::string * str) +{ + return EPutBin(str->c_str(), str->size()); +} + + +DbTextStream & DbTextStream::EPutBin(const std::string & str) +{ + return EPutBin(str.c_str(), str.size()); +} + + + + +DbTextStream & DbTextStream::operator<<(const char * str) +{ + return EPutText(str); +} + + +DbTextStream & DbTextStream::operator<<(const std::string * str) +{ + return EPutText(str); +} + + +DbTextStream & DbTextStream::operator<<(const std::string & str) +{ + return EPutText(str); +} + + + + + +DbTextStream & DbTextStream::operator<<(char v) +{ + if( was_param ) + buffer += ", "; + + if( ext_escape ) + buffer += 'E'; + + buffer += '\''; + ETextPutChar(v); + buffer += '\''; + was_param = true; + +return *this; +} + + +DbTextStream & DbTextStream::operator<<(int v) +{ + if( was_param ) + buffer += ", "; + + TextStream::operator<<(v); + was_param = true; + +return *this; +} + + +DbTextStream & DbTextStream::operator<<(long v) +{ + if( was_param ) + buffer += ", "; + + TextStream::operator<<(v); + was_param = true; + +return *this; +} + + +DbTextStream & DbTextStream::operator<<(unsigned int v) +{ + if( was_param ) + buffer += ", "; + + TextStream::operator<<(v); + was_param = true; + +return *this; +} + + +DbTextStream & DbTextStream::operator<<(unsigned long v) +{ + if( was_param ) + buffer += ", "; + + TextStream::operator<<(v); + was_param = true; + +return *this; +} + + +DbTextStream & DbTextStream::operator<<(double v) +{ + if( was_param ) + buffer += ", "; + + TextStream::operator<<(v); + was_param = true; + +return *this; +} + + +DbTextStream & DbTextStream::operator<<(const void * v) +{ + if( was_param ) + buffer += ", "; + + buffer += '\''; // !! not needed here? + TextStream::operator<<(v); + buffer += '\''; + was_param = true; + +return *this; +} + + + + + + + + diff --git a/db/dbtextstream.h b/db/dbtextstream.h new file mode 100755 index 0000000..e287893 --- /dev/null +++ b/db/dbtextstream.h @@ -0,0 +1,144 @@ +/* + * This file is a part of Winix + * and is not publicly distributed + * + * Copyright (c) 2010, Tomasz Sowa + * All rights reserved. + * + */ + +#ifndef headerfile_winix_core_dbtextstream +#define headerfile_winix_core_dbtextstream + +#include "core/textstream.h" + + + +/* + DbTextStream is used as a buffer for creating a database's query + By default all operators<< espace its string artuments. If you don't want + to escape an argument you should use a helper function R() (raw argument) + note: you have to define the function yourself, we do not provide it + because such a short name would make a mess in namespaces + + sample: + create a helper function R as follows: + + template + DbTextStream::RawText R(const RawType & par) + { + return DbTextStream::RawText(par); + } + + now you can use DbTextStream in an easy way: + + DbTextStream query; + std::string key = "some string"; + query << R("select * from table where key=") << key << R(";"); + + in above example only the key is escaped. + + Also with escaping operators<< insert commas between parameters, e.g.: + + query << R("insert into table (key1, key2, key3) values (") + << key1 + << key2 + << key3 + << R(");"); + + between key1 key2 and key3 are commas inserted automatically +*/ +class DbTextStream : public TextStream +{ +public: + + + /* + a helper struct to select a proper operator<< + (for non-escaping versions of these operators) + */ + template + struct RawText + { + const RawType & par; + + RawText(const RawText & p) : par(p.par) {} + RawText(const RawType & p) : par(p) {} + }; + + + DbTextStream(); + + // extented escaping: adding E character before the first quote e.g. E'string' + // default: true + void SetExtented(bool ext); + + + + /* + without escaping + */ + + DbTextStream & PutText(const char *); + DbTextStream & PutText(const std::string *); + DbTextStream & PutText(const std::string &); + + /* + we need this template operator for such calling: + dbtextstream_object << R("some string"); + "some string" is actually a table (not a pointer) + */ + template + DbTextStream & operator<<(const RawText & raw) { return PutText(raw.par); } + + DbTextStream & operator<<(const RawText & raw); + DbTextStream & operator<<(RawText raw); + DbTextStream & operator<<(RawText raw); + DbTextStream & operator<<(RawText raw); + DbTextStream & operator<<(RawText raw); + DbTextStream & operator<<(RawText raw); + DbTextStream & operator<<(RawText raw); + DbTextStream & operator<<(RawText raw); + DbTextStream & operator<<(RawText raw); + + + + /* + with escaping + */ + + DbTextStream & EBinPutChar(char c); + DbTextStream & ETextPutChar(char c); + + DbTextStream & EPutText(const char * str); + DbTextStream & EPutText(const std::string * str); + DbTextStream & EPutText(const std::string & str); + + DbTextStream & EPutBin(const char * str, size_t len); + DbTextStream & EPutBin(const std::string * str); + DbTextStream & EPutBin(const std::string & str); + + DbTextStream & operator<<(const char * str); + DbTextStream & operator<<(const std::string * str); + DbTextStream & operator<<(const std::string & str); + DbTextStream & operator<<(char); + DbTextStream & operator<<(int); + DbTextStream & operator<<(long); + DbTextStream & operator<<(unsigned int); + DbTextStream & operator<<(unsigned long); + DbTextStream & operator<<(double); + DbTextStream & operator<<(const void *); + + +private: + + bool was_param; + bool ext_escape; + +}; + + + + +#endif + diff --git a/functions/Makefile.dep b/functions/Makefile.dep index a6d677e..1febdaf 100755 --- a/functions/Makefile.dep +++ b/functions/Makefile.dep @@ -1,109 +1,134 @@ # DO NOT DELETE -adduser.o: adduser.h functionbase.h ../core/item.h ../core/db.h -adduser.o: ../core/item.h ../core/user.h ../core/group.h ../core/thread.h -adduser.o: ../core/error.h ../core/log.h ../core/dircontainer.h -adduser.o: ../core/ugcontainer.h ../core/ticket.h ../core/request.h -adduser.o: ../core/requesttypes.h ../core/session.h ../core/plugindata.h -adduser.o: ../core/rebus.h ../core/config.h ../core/confparser.h -adduser.o: ../core/htmlfilter.h ../core/config.h ../core/system.h -adduser.o: ../core/dirs.h ../core/db.h ../core/request.h ../core/mounts.h -adduser.o: ../core/mount.h ../core/mountparser.h ../core/users.h -adduser.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h -adduser.o: ../core/notify.h ../templatesnotify/templatesnotify.h -adduser.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h -adduser.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h -adduser.o: ../core/system.h -cat.o: cat.h functionbase.h ../core/item.h ../core/db.h ../core/item.h -cat.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h -cat.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h +adduser.o: adduser.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +adduser.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +adduser.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +adduser.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +adduser.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h +adduser.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h +adduser.o: ../core/session.h ../core/error.h ../core/user.h +adduser.o: ../core/plugindata.h ../core/rebus.h ../core/config.h +adduser.o: ../core/confparser.h ../core/htmlfilter.h ../core/config.h +adduser.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h +adduser.o: ../core/request.h ../core/mounts.h ../core/mount.h +adduser.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h +adduser.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h +adduser.o: ../core/loadavg.h ../core/notify.h +adduser.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h +adduser.o: ../core/mount.h ../core/locale.h ../templates/misc.h +adduser.o: ../templates/localefilter.h ../core/locale.h ../core/system.h +cat.o: cat.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +cat.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +cat.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +cat.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +cat.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h cat.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h -cat.o: ../core/session.h ../core/plugindata.h ../core/rebus.h -cat.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h -cat.o: ../core/config.h ../core/system.h ../core/dirs.h ../core/db.h -cat.o: ../core/request.h ../core/mounts.h ../core/mount.h -cat.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -cat.o: ../core/groups.h ../core/loadavg.h ../core/notify.h +cat.o: ../core/session.h ../core/error.h ../core/user.h ../core/plugindata.h +cat.o: ../core/rebus.h ../core/config.h ../core/confparser.h +cat.o: ../core/htmlfilter.h ../core/config.h ../core/system.h ../core/dirs.h +cat.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h +cat.o: ../core/mount.h ../core/mountparser.h ../core/users.h +cat.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +cat.o: ../core/group.h ../core/loadavg.h ../core/notify.h cat.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h cat.o: ../core/mount.h ../core/locale.h ../templates/misc.h cat.o: ../templates/localefilter.h ../core/locale.h ../core/system.h -chmod.o: chmod.h functionbase.h ../core/item.h ../core/db.h ../core/item.h -chmod.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h -chmod.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h +chmod.o: chmod.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +chmod.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +chmod.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +chmod.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +chmod.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h chmod.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h -chmod.o: ../core/session.h ../core/plugindata.h ../core/rebus.h -chmod.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h -chmod.o: ../core/config.h ../core/system.h ../core/dirs.h ../core/db.h +chmod.o: ../core/session.h ../core/error.h ../core/user.h +chmod.o: ../core/plugindata.h ../core/rebus.h ../core/config.h +chmod.o: ../core/confparser.h ../core/htmlfilter.h ../core/config.h +chmod.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h chmod.o: ../core/request.h ../core/mounts.h ../core/mount.h -chmod.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -chmod.o: ../core/groups.h ../core/loadavg.h ../core/notify.h +chmod.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h +chmod.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h +chmod.o: ../core/loadavg.h ../core/notify.h chmod.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h chmod.o: ../core/mount.h ../core/locale.h ../templates/misc.h chmod.o: ../templates/localefilter.h ../core/locale.h ../core/system.h chmod.o: privchanger.h -chown.o: chown.h functionbase.h ../core/item.h ../core/db.h ../core/item.h -chown.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h -chown.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h +chown.o: chown.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +chown.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +chown.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +chown.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +chown.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h chown.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h -chown.o: ../core/session.h ../core/plugindata.h ../core/rebus.h -chown.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h -chown.o: ../core/config.h ../core/system.h ../core/dirs.h ../core/db.h +chown.o: ../core/session.h ../core/error.h ../core/user.h +chown.o: ../core/plugindata.h ../core/rebus.h ../core/config.h +chown.o: ../core/confparser.h ../core/htmlfilter.h ../core/config.h +chown.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h chown.o: ../core/request.h ../core/mounts.h ../core/mount.h -chown.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -chown.o: ../core/groups.h ../core/loadavg.h ../core/notify.h +chown.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h +chown.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h +chown.o: ../core/loadavg.h ../core/notify.h chown.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h chown.o: ../core/mount.h ../core/locale.h ../templates/misc.h chown.o: ../templates/localefilter.h ../core/locale.h ../core/system.h chown.o: privchanger.h -ckeditor.o: ckeditor.h functionbase.h ../core/item.h ../core/db.h -ckeditor.o: ../core/item.h ../core/user.h ../core/group.h ../core/thread.h -ckeditor.o: ../core/error.h ../core/log.h ../core/dircontainer.h +ckeditor.o: ckeditor.h functionbase.h ../core/item.h ../db/db.h +ckeditor.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +ckeditor.o: ../core/textstream.h ../db/dbitemquery.h ../db/dbitemcolumns.h +ckeditor.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h +ckeditor.o: ../core/log.h ../core/dircontainer.h ../core/item.h ckeditor.o: ../core/ugcontainer.h ../core/ticket.h ../core/request.h -ckeditor.o: ../core/requesttypes.h ../core/session.h ../core/plugindata.h -ckeditor.o: ../core/rebus.h ../core/config.h ../core/confparser.h -ckeditor.o: ../core/htmlfilter.h ../core/config.h ../core/system.h -ckeditor.o: ../core/dirs.h ../core/db.h ../core/request.h ../core/mounts.h +ckeditor.o: ../core/requesttypes.h ../core/session.h ../core/error.h +ckeditor.o: ../core/user.h ../core/plugindata.h ../core/rebus.h +ckeditor.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h +ckeditor.o: ../core/config.h ../core/system.h ../core/dirs.h +ckeditor.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h ckeditor.o: ../core/mount.h ../core/mountparser.h ../core/users.h -ckeditor.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h -ckeditor.o: ../core/notify.h ../templatesnotify/templatesnotify.h -ckeditor.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h -ckeditor.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h -ckeditor.o: ../core/system.h functions.h functionparser.h adduser.h cat.h -ckeditor.o: chmod.h privchanger.h chown.h cp.h createthread.h createticket.h +ckeditor.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +ckeditor.o: ../core/group.h ../core/loadavg.h ../core/notify.h +ckeditor.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h +ckeditor.o: ../core/mount.h ../core/locale.h ../templates/misc.h +ckeditor.o: ../templates/localefilter.h ../core/locale.h ../core/system.h +ckeditor.o: functions.h functionparser.h adduser.h cat.h chmod.h +ckeditor.o: privchanger.h chown.h cp.h createthread.h createticket.h ckeditor.o: default.h download.h editticket.h emacs.h last.h login.h logout.h ckeditor.o: ls.h mkdir.h mv.h node.h priv.h reload.h rm.h run.h subject.h -ckeditor.o: funthread.h ../core/thread.h funticket.h ../core/ticket.h -ckeditor.o: template.h tinymce.h uname.h upload.h uptime.h who.h -ckeditor.o: ../core/htmlfilter.h -cp.o: cp.h functionbase.h ../core/item.h ../core/db.h ../core/item.h -cp.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h -cp.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h +ckeditor.o: funthread.h funticket.h template.h tinymce.h uname.h upload.h +ckeditor.o: uptime.h who.h ../core/htmlfilter.h +cp.o: cp.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +cp.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +cp.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +cp.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +cp.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h cp.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h -cp.o: ../core/session.h ../core/plugindata.h ../core/rebus.h ../core/config.h -cp.o: ../core/confparser.h ../core/htmlfilter.h ../core/config.h -cp.o: ../core/system.h ../core/dirs.h ../core/db.h ../core/request.h -cp.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h ../core/users.h -cp.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h -cp.o: ../core/notify.h ../templatesnotify/templatesnotify.h -cp.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h -cp.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h -cp.o: ../core/system.h ../core/misc.h functions.h functionparser.h adduser.h -cp.o: cat.h chmod.h privchanger.h chown.h ckeditor.h createthread.h -cp.o: createticket.h default.h download.h editticket.h emacs.h last.h login.h -cp.o: logout.h ls.h mkdir.h mv.h node.h priv.h reload.h rm.h run.h subject.h -cp.o: funthread.h ../core/thread.h funticket.h ../core/ticket.h template.h -cp.o: tinymce.h uname.h upload.h uptime.h who.h ../core/htmlfilter.h -createthread.o: createthread.h functionbase.h ../core/item.h ../core/db.h -createthread.o: ../core/item.h ../core/user.h ../core/group.h +cp.o: ../core/session.h ../core/error.h ../core/user.h ../core/plugindata.h +cp.o: ../core/rebus.h ../core/config.h ../core/confparser.h +cp.o: ../core/htmlfilter.h ../core/config.h ../core/system.h ../core/dirs.h +cp.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h +cp.o: ../core/mount.h ../core/mountparser.h ../core/users.h +cp.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +cp.o: ../core/group.h ../core/loadavg.h ../core/notify.h +cp.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h +cp.o: ../core/mount.h ../core/locale.h ../templates/misc.h +cp.o: ../templates/localefilter.h ../core/locale.h ../core/system.h +cp.o: ../core/misc.h functions.h functionparser.h adduser.h cat.h chmod.h +cp.o: privchanger.h chown.h ckeditor.h createthread.h createticket.h +cp.o: default.h download.h editticket.h emacs.h last.h login.h logout.h ls.h +cp.o: mkdir.h mv.h node.h priv.h reload.h rm.h run.h subject.h funthread.h +cp.o: funticket.h template.h tinymce.h uname.h upload.h uptime.h who.h +cp.o: ../core/htmlfilter.h +createthread.o: createthread.h functionbase.h ../core/item.h ../db/db.h +createthread.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +createthread.o: ../core/textstream.h ../db/dbitemquery.h +createthread.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h createthread.o: ../core/thread.h ../core/error.h ../core/log.h -createthread.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/ticket.h -createthread.o: ../core/request.h ../core/requesttypes.h ../core/session.h +createthread.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h +createthread.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h +createthread.o: ../core/session.h ../core/error.h ../core/user.h createthread.o: ../core/plugindata.h ../core/rebus.h ../core/config.h createthread.o: ../core/confparser.h ../core/htmlfilter.h ../core/config.h -createthread.o: ../core/system.h ../core/dirs.h ../core/db.h +createthread.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h createthread.o: ../core/request.h ../core/mounts.h ../core/mount.h -createthread.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -createthread.o: ../core/groups.h ../core/loadavg.h ../core/notify.h +createthread.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h +createthread.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h +createthread.o: ../core/loadavg.h ../core/notify.h createthread.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h createthread.o: ../core/mount.h ../core/locale.h ../templates/misc.h createthread.o: ../templates/localefilter.h ../core/locale.h ../core/system.h @@ -111,88 +136,103 @@ createthread.o: functions.h functionparser.h adduser.h cat.h chmod.h createthread.o: privchanger.h chown.h ckeditor.h cp.h createticket.h createthread.o: default.h download.h editticket.h emacs.h last.h login.h createthread.o: logout.h ls.h mkdir.h mv.h node.h priv.h reload.h rm.h run.h -createthread.o: subject.h funthread.h ../core/thread.h funticket.h -createthread.o: ../core/ticket.h template.h tinymce.h uname.h upload.h -createthread.o: uptime.h who.h ../core/htmlfilter.h -createticket.o: createticket.h functionbase.h ../core/item.h ../core/db.h -createticket.o: ../core/item.h ../core/user.h ../core/group.h +createthread.o: subject.h funthread.h funticket.h template.h tinymce.h +createthread.o: uname.h upload.h uptime.h who.h ../core/htmlfilter.h +createticket.o: createticket.h functionbase.h ../core/item.h ../db/db.h +createticket.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +createticket.o: ../core/textstream.h ../db/dbitemquery.h +createticket.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h createticket.o: ../core/thread.h ../core/error.h ../core/log.h -createticket.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/ticket.h -createticket.o: ../core/request.h ../core/requesttypes.h ../core/session.h +createticket.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h +createticket.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h +createticket.o: ../core/session.h ../core/error.h ../core/user.h createticket.o: ../core/plugindata.h ../core/rebus.h ../core/config.h createticket.o: ../core/confparser.h ../core/htmlfilter.h ../core/config.h -createticket.o: ../core/system.h ../core/dirs.h ../core/db.h +createticket.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h createticket.o: ../core/request.h ../core/mounts.h ../core/mount.h -createticket.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -createticket.o: ../core/groups.h ../core/loadavg.h ../core/notify.h +createticket.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h +createticket.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h +createticket.o: ../core/loadavg.h ../core/notify.h createticket.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h createticket.o: ../core/mount.h ../core/locale.h ../templates/misc.h createticket.o: ../templates/localefilter.h ../core/locale.h ../core/system.h -createticket.o: readticket.h ../core/ticket.h functions.h functionparser.h -createticket.o: adduser.h cat.h chmod.h privchanger.h chown.h ckeditor.h cp.h -createticket.o: createthread.h default.h download.h editticket.h emacs.h -createticket.o: last.h login.h logout.h ls.h mkdir.h mv.h node.h priv.h -createticket.o: reload.h rm.h run.h subject.h funthread.h ../core/thread.h -createticket.o: funticket.h template.h tinymce.h uname.h upload.h uptime.h -createticket.o: who.h ../core/htmlfilter.h -default.o: default.h functionbase.h ../core/item.h ../core/db.h -default.o: ../core/item.h ../core/user.h ../core/group.h ../core/thread.h -default.o: ../core/error.h ../core/log.h ../core/dircontainer.h -default.o: ../core/ugcontainer.h ../core/ticket.h ../core/request.h -default.o: ../core/requesttypes.h ../core/session.h ../core/plugindata.h -default.o: ../core/rebus.h ../core/config.h ../core/confparser.h -default.o: ../core/htmlfilter.h ../core/config.h ../core/system.h -default.o: ../core/dirs.h ../core/db.h ../core/request.h ../core/mounts.h -default.o: ../core/mount.h ../core/mountparser.h ../core/users.h -default.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h -default.o: ../core/notify.h ../templatesnotify/templatesnotify.h -default.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h -default.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h -default.o: ../core/system.h -download.o: download.h functionbase.h ../core/item.h ../core/db.h -download.o: ../core/item.h ../core/user.h ../core/group.h ../core/thread.h -download.o: ../core/error.h ../core/log.h ../core/dircontainer.h +createticket.o: readticket.h functions.h functionparser.h adduser.h cat.h +createticket.o: chmod.h privchanger.h chown.h ckeditor.h cp.h createthread.h +createticket.o: default.h download.h editticket.h emacs.h last.h login.h +createticket.o: logout.h ls.h mkdir.h mv.h node.h priv.h reload.h rm.h run.h +createticket.o: subject.h funthread.h funticket.h template.h tinymce.h +createticket.o: uname.h upload.h uptime.h who.h ../core/htmlfilter.h +default.o: default.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +default.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +default.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +default.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +default.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h +default.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h +default.o: ../core/session.h ../core/error.h ../core/user.h +default.o: ../core/plugindata.h ../core/rebus.h ../core/config.h +default.o: ../core/confparser.h ../core/htmlfilter.h ../core/config.h +default.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h +default.o: ../core/request.h ../core/mounts.h ../core/mount.h +default.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h +default.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h +default.o: ../core/loadavg.h ../core/notify.h +default.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h +default.o: ../core/mount.h ../core/locale.h ../templates/misc.h +default.o: ../templates/localefilter.h ../core/locale.h ../core/system.h +download.o: download.h functionbase.h ../core/item.h ../db/db.h +download.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +download.o: ../core/textstream.h ../db/dbitemquery.h ../db/dbitemcolumns.h +download.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h +download.o: ../core/log.h ../core/dircontainer.h ../core/item.h download.o: ../core/ugcontainer.h ../core/ticket.h ../core/request.h -download.o: ../core/requesttypes.h ../core/session.h ../core/plugindata.h -download.o: ../core/rebus.h ../core/config.h ../core/confparser.h -download.o: ../core/htmlfilter.h ../core/config.h ../core/system.h -download.o: ../core/dirs.h ../core/db.h ../core/request.h ../core/mounts.h +download.o: ../core/requesttypes.h ../core/session.h ../core/error.h +download.o: ../core/user.h ../core/plugindata.h ../core/rebus.h +download.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h +download.o: ../core/config.h ../core/system.h ../core/dirs.h +download.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h download.o: ../core/mount.h ../core/mountparser.h ../core/users.h -download.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h -download.o: ../core/notify.h ../templatesnotify/templatesnotify.h -download.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h -download.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h -download.o: ../core/system.h -editticket.o: editticket.h functionbase.h ../core/item.h ../core/db.h -editticket.o: ../core/item.h ../core/user.h ../core/group.h ../core/thread.h -editticket.o: ../core/error.h ../core/log.h ../core/dircontainer.h +download.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +download.o: ../core/group.h ../core/loadavg.h ../core/notify.h +download.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h +download.o: ../core/mount.h ../core/locale.h ../templates/misc.h +download.o: ../templates/localefilter.h ../core/locale.h ../core/system.h +editticket.o: editticket.h functionbase.h ../core/item.h ../db/db.h +editticket.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +editticket.o: ../core/textstream.h ../db/dbitemquery.h ../db/dbitemcolumns.h +editticket.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h +editticket.o: ../core/log.h ../core/dircontainer.h ../core/item.h editticket.o: ../core/ugcontainer.h ../core/ticket.h ../core/request.h -editticket.o: ../core/requesttypes.h ../core/session.h ../core/plugindata.h -editticket.o: ../core/rebus.h ../core/config.h ../core/confparser.h -editticket.o: ../core/htmlfilter.h ../core/config.h ../core/system.h -editticket.o: ../core/dirs.h ../core/db.h ../core/request.h ../core/mounts.h +editticket.o: ../core/requesttypes.h ../core/session.h ../core/error.h +editticket.o: ../core/user.h ../core/plugindata.h ../core/rebus.h +editticket.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h +editticket.o: ../core/config.h ../core/system.h ../core/dirs.h +editticket.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h editticket.o: ../core/mount.h ../core/mountparser.h ../core/users.h -editticket.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h -editticket.o: ../core/notify.h ../templatesnotify/templatesnotify.h -editticket.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h -editticket.o: ../templates/misc.h ../templates/localefilter.h -editticket.o: ../core/locale.h ../core/system.h functions.h functionparser.h -editticket.o: adduser.h cat.h chmod.h privchanger.h chown.h ckeditor.h cp.h -editticket.o: createthread.h createticket.h default.h download.h emacs.h -editticket.o: last.h login.h logout.h ls.h mkdir.h mv.h node.h priv.h -editticket.o: reload.h rm.h run.h subject.h funthread.h ../core/thread.h -editticket.o: funticket.h ../core/ticket.h template.h tinymce.h uname.h +editticket.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +editticket.o: ../core/group.h ../core/loadavg.h ../core/notify.h +editticket.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h +editticket.o: ../core/mount.h ../core/locale.h ../templates/misc.h +editticket.o: ../templates/localefilter.h ../core/locale.h ../core/system.h +editticket.o: functions.h functionparser.h adduser.h cat.h chmod.h +editticket.o: privchanger.h chown.h ckeditor.h cp.h createthread.h +editticket.o: createticket.h default.h download.h emacs.h last.h login.h +editticket.o: logout.h ls.h mkdir.h mv.h node.h priv.h reload.h rm.h run.h +editticket.o: subject.h funthread.h funticket.h template.h tinymce.h uname.h editticket.o: upload.h uptime.h who.h ../core/htmlfilter.h readticket.h -emacs.o: emacs.h functionbase.h ../core/item.h ../core/db.h ../core/item.h -emacs.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h -emacs.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h +emacs.o: emacs.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +emacs.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +emacs.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +emacs.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +emacs.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h emacs.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h -emacs.o: ../core/session.h ../core/plugindata.h ../core/rebus.h -emacs.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h -emacs.o: ../core/config.h ../core/system.h ../core/dirs.h ../core/db.h +emacs.o: ../core/session.h ../core/error.h ../core/user.h +emacs.o: ../core/plugindata.h ../core/rebus.h ../core/config.h +emacs.o: ../core/confparser.h ../core/htmlfilter.h ../core/config.h +emacs.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h emacs.o: ../core/request.h ../core/mounts.h ../core/mount.h -emacs.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -emacs.o: ../core/groups.h ../core/loadavg.h ../core/notify.h +emacs.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h +emacs.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h +emacs.o: ../core/loadavg.h ../core/notify.h emacs.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h emacs.o: ../core/mount.h ../core/locale.h ../templates/misc.h emacs.o: ../templates/localefilter.h ../core/locale.h ../core/system.h @@ -204,250 +244,305 @@ emacs.o: ../core/sessioncontainer.h functions.h functionparser.h adduser.h emacs.o: cat.h chmod.h privchanger.h chown.h ckeditor.h cp.h createthread.h emacs.o: createticket.h default.h download.h editticket.h last.h login.h emacs.o: logout.h ls.h mkdir.h mv.h node.h priv.h reload.h rm.h run.h -emacs.o: subject.h funthread.h ../core/thread.h funticket.h ../core/ticket.h -emacs.o: template.h tinymce.h uname.h upload.h uptime.h who.h -emacs.o: ../core/htmlfilter.h -functionbase.o: functionbase.h ../core/item.h ../core/db.h ../core/item.h -functionbase.o: ../core/user.h ../core/group.h ../core/thread.h -functionbase.o: ../core/error.h ../core/log.h ../core/dircontainer.h +emacs.o: subject.h funthread.h funticket.h template.h tinymce.h uname.h +emacs.o: upload.h uptime.h who.h ../core/htmlfilter.h +functionbase.o: functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +functionbase.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +functionbase.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +functionbase.o: ../core/group.h ../core/thread.h ../core/error.h +functionbase.o: ../core/log.h ../core/dircontainer.h ../core/item.h functionbase.o: ../core/ugcontainer.h ../core/ticket.h ../core/request.h -functionbase.o: ../core/requesttypes.h ../core/session.h ../core/plugindata.h -functionbase.o: ../core/rebus.h ../core/config.h ../core/confparser.h -functionbase.o: ../core/htmlfilter.h ../core/config.h ../core/system.h -functionbase.o: ../core/dirs.h ../core/db.h ../core/request.h -functionbase.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h -functionbase.o: ../core/users.h ../core/lastcontainer.h ../core/groups.h -functionbase.o: ../core/loadavg.h ../core/notify.h -functionbase.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h -functionbase.o: ../core/mount.h ../core/locale.h ../templates/misc.h -functionbase.o: ../templates/localefilter.h ../core/locale.h ../core/system.h -functionbase.o: functions.h functionparser.h adduser.h cat.h chmod.h -functionbase.o: privchanger.h chown.h ckeditor.h cp.h createthread.h -functionbase.o: createticket.h default.h download.h editticket.h emacs.h -functionbase.o: last.h login.h logout.h ls.h mkdir.h mv.h node.h priv.h -functionbase.o: reload.h rm.h run.h subject.h funthread.h ../core/thread.h -functionbase.o: funticket.h ../core/ticket.h template.h tinymce.h uname.h -functionbase.o: upload.h uptime.h who.h ../core/htmlfilter.h +functionbase.o: ../core/requesttypes.h ../core/session.h ../core/error.h +functionbase.o: ../core/user.h ../core/plugindata.h ../core/rebus.h +functionbase.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h +functionbase.o: ../core/config.h ../core/system.h ../core/dirs.h +functionbase.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h +functionbase.o: ../core/mount.h ../core/mountparser.h ../core/users.h +functionbase.o: ../core/ugcontainer.h ../core/lastcontainer.h +functionbase.o: ../core/groups.h ../core/group.h ../core/loadavg.h +functionbase.o: ../core/notify.h ../templatesnotify/templatesnotify.h +functionbase.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h +functionbase.o: ../templates/misc.h ../templates/localefilter.h +functionbase.o: ../core/locale.h ../core/system.h functions.h +functionbase.o: functionparser.h adduser.h cat.h chmod.h privchanger.h +functionbase.o: chown.h ckeditor.h cp.h createthread.h createticket.h +functionbase.o: default.h download.h editticket.h emacs.h last.h login.h +functionbase.o: logout.h ls.h mkdir.h mv.h node.h priv.h reload.h rm.h run.h +functionbase.o: subject.h funthread.h funticket.h template.h tinymce.h +functionbase.o: uname.h upload.h uptime.h who.h ../core/htmlfilter.h functionparser.o: functionparser.h ../core/request.h ../core/requesttypes.h functionparser.o: ../core/session.h ../core/item.h ../core/error.h -functionparser.o: ../core/log.h ../core/user.h ../core/plugindata.h -functionparser.o: ../core/rebus.h ../core/config.h ../core/confparser.h -functionparser.o: ../core/htmlfilter.h ../core/db.h ../core/group.h -functionparser.o: ../core/thread.h ../core/dircontainer.h +functionparser.o: ../core/user.h ../core/plugindata.h ../core/rebus.h +functionparser.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h +functionparser.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h +functionparser.o: ../db/dbtextstream.h ../core/textstream.h +functionparser.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h +functionparser.o: ../core/user.h ../core/group.h ../core/thread.h +functionparser.o: ../core/error.h ../core/log.h ../core/dircontainer.h functionparser.o: ../core/ugcontainer.h ../core/ticket.h ../core/system.h -functionparser.o: ../core/dirs.h ../core/db.h ../core/request.h +functionparser.o: ../core/dirs.h ../core/dircontainer.h ../core/request.h functionparser.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h -functionparser.o: ../core/users.h ../core/lastcontainer.h ../core/groups.h -functionparser.o: ../core/loadavg.h ../core/log.h ../core/item.h -functionparser.o: ../core/error.h functions.h functionbase.h ../core/config.h -functionparser.o: ../core/notify.h ../templatesnotify/templatesnotify.h -functionparser.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h -functionparser.o: ../templates/misc.h ../templates/localefilter.h -functionparser.o: ../core/locale.h ../core/system.h adduser.h cat.h chmod.h -functionparser.o: privchanger.h chown.h ckeditor.h cp.h createthread.h -functionparser.o: createticket.h default.h download.h editticket.h emacs.h -functionparser.o: last.h login.h logout.h ls.h mkdir.h mv.h node.h priv.h -functionparser.o: reload.h rm.h run.h subject.h funthread.h ../core/thread.h -functionparser.o: funticket.h ../core/ticket.h template.h tinymce.h uname.h -functionparser.o: upload.h uptime.h who.h ../core/htmlfilter.h -functions.o: functions.h functionbase.h ../core/item.h ../core/db.h -functions.o: ../core/item.h ../core/user.h ../core/group.h ../core/thread.h -functions.o: ../core/error.h ../core/log.h ../core/dircontainer.h +functionparser.o: ../core/users.h ../core/ugcontainer.h +functionparser.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h +functionparser.o: ../core/loadavg.h ../core/log.h functions.h functionbase.h +functionparser.o: ../core/config.h ../core/notify.h +functionparser.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h +functionparser.o: ../core/mount.h ../core/locale.h ../templates/misc.h +functionparser.o: ../templates/localefilter.h ../core/locale.h +functionparser.o: ../core/system.h adduser.h cat.h chmod.h privchanger.h +functionparser.o: chown.h ckeditor.h cp.h createthread.h createticket.h +functionparser.o: default.h download.h editticket.h emacs.h last.h login.h +functionparser.o: logout.h ls.h mkdir.h mv.h node.h priv.h reload.h rm.h +functionparser.o: run.h subject.h funthread.h funticket.h template.h +functionparser.o: tinymce.h uname.h upload.h uptime.h who.h +functionparser.o: ../core/htmlfilter.h +functions.o: functions.h functionbase.h ../core/item.h ../db/db.h +functions.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +functions.o: ../core/textstream.h ../db/dbitemquery.h ../db/dbitemcolumns.h +functions.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h +functions.o: ../core/log.h ../core/dircontainer.h ../core/item.h functions.o: ../core/ugcontainer.h ../core/ticket.h ../core/request.h -functions.o: ../core/requesttypes.h ../core/session.h ../core/plugindata.h -functions.o: ../core/rebus.h ../core/config.h ../core/confparser.h -functions.o: ../core/htmlfilter.h ../core/config.h ../core/system.h -functions.o: ../core/dirs.h ../core/db.h ../core/request.h ../core/mounts.h +functions.o: ../core/requesttypes.h ../core/session.h ../core/error.h +functions.o: ../core/user.h ../core/plugindata.h ../core/rebus.h +functions.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h +functions.o: ../core/config.h ../core/system.h ../core/dirs.h +functions.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h functions.o: ../core/mount.h ../core/mountparser.h ../core/users.h -functions.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h -functions.o: ../core/notify.h ../templatesnotify/templatesnotify.h -functions.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h -functions.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h -functions.o: ../core/system.h functionparser.h adduser.h cat.h chmod.h -functions.o: privchanger.h chown.h ckeditor.h cp.h createthread.h -functions.o: createticket.h default.h download.h editticket.h emacs.h last.h -functions.o: login.h logout.h ls.h mkdir.h mv.h node.h priv.h reload.h rm.h -functions.o: run.h subject.h funthread.h ../core/thread.h funticket.h -functions.o: ../core/ticket.h template.h tinymce.h uname.h upload.h uptime.h -functions.o: who.h ../core/htmlfilter.h ../core/log.h ../core/misc.h +functions.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +functions.o: ../core/group.h ../core/loadavg.h ../core/notify.h +functions.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h +functions.o: ../core/mount.h ../core/locale.h ../templates/misc.h +functions.o: ../templates/localefilter.h ../core/locale.h ../core/system.h +functions.o: functionparser.h adduser.h cat.h chmod.h privchanger.h chown.h +functions.o: ckeditor.h cp.h createthread.h createticket.h default.h +functions.o: download.h editticket.h emacs.h last.h login.h logout.h ls.h +functions.o: mkdir.h mv.h node.h priv.h reload.h rm.h run.h subject.h +functions.o: funthread.h funticket.h template.h tinymce.h uname.h upload.h +functions.o: uptime.h who.h ../core/htmlfilter.h ../core/log.h ../core/misc.h functions.o: ../templates/templates.h ../templates/patterncacher.h functions.o: ../core/item.h ../templates/misc.h functions.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h functions.o: ../core/log.h ../templates/indexpatterns.h functions.o: ../core/sessionmanager.h ../core/sessioncontainer.h -funthread.o: funthread.h functionbase.h ../core/item.h ../core/db.h -funthread.o: ../core/item.h ../core/user.h ../core/group.h ../core/thread.h -funthread.o: ../core/error.h ../core/log.h ../core/dircontainer.h +funthread.o: funthread.h functionbase.h ../core/item.h ../db/db.h +funthread.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +funthread.o: ../core/textstream.h ../db/dbitemquery.h ../db/dbitemcolumns.h +funthread.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h +funthread.o: ../core/log.h ../core/dircontainer.h ../core/item.h funthread.o: ../core/ugcontainer.h ../core/ticket.h ../core/request.h -funthread.o: ../core/requesttypes.h ../core/session.h ../core/plugindata.h -funthread.o: ../core/rebus.h ../core/config.h ../core/confparser.h -funthread.o: ../core/htmlfilter.h ../core/config.h ../core/system.h -funthread.o: ../core/dirs.h ../core/db.h ../core/request.h ../core/mounts.h +funthread.o: ../core/requesttypes.h ../core/session.h ../core/error.h +funthread.o: ../core/user.h ../core/plugindata.h ../core/rebus.h +funthread.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h +funthread.o: ../core/config.h ../core/system.h ../core/dirs.h +funthread.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h funthread.o: ../core/mount.h ../core/mountparser.h ../core/users.h -funthread.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h -funthread.o: ../core/notify.h ../templatesnotify/templatesnotify.h -funthread.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h -funthread.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h -funthread.o: ../core/system.h ../core/thread.h -funticket.o: funticket.h functionbase.h ../core/item.h ../core/db.h -funticket.o: ../core/item.h ../core/user.h ../core/group.h ../core/thread.h -funticket.o: ../core/error.h ../core/log.h ../core/dircontainer.h +funthread.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +funthread.o: ../core/group.h ../core/loadavg.h ../core/notify.h +funthread.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h +funthread.o: ../core/mount.h ../core/locale.h ../templates/misc.h +funthread.o: ../templates/localefilter.h ../core/locale.h ../core/system.h +funticket.o: funticket.h functionbase.h ../core/item.h ../db/db.h +funticket.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +funticket.o: ../core/textstream.h ../db/dbitemquery.h ../db/dbitemcolumns.h +funticket.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h +funticket.o: ../core/log.h ../core/dircontainer.h ../core/item.h funticket.o: ../core/ugcontainer.h ../core/ticket.h ../core/request.h -funticket.o: ../core/requesttypes.h ../core/session.h ../core/plugindata.h -funticket.o: ../core/rebus.h ../core/config.h ../core/confparser.h -funticket.o: ../core/htmlfilter.h ../core/config.h ../core/system.h -funticket.o: ../core/dirs.h ../core/db.h ../core/request.h ../core/mounts.h +funticket.o: ../core/requesttypes.h ../core/session.h ../core/error.h +funticket.o: ../core/user.h ../core/plugindata.h ../core/rebus.h +funticket.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h +funticket.o: ../core/config.h ../core/system.h ../core/dirs.h +funticket.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h funticket.o: ../core/mount.h ../core/mountparser.h ../core/users.h -funticket.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h -funticket.o: ../core/notify.h ../templatesnotify/templatesnotify.h -funticket.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h -funticket.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h -funticket.o: ../core/system.h ../core/ticket.h -last.o: last.h functionbase.h ../core/item.h ../core/db.h ../core/item.h -last.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h -last.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h +funticket.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +funticket.o: ../core/group.h ../core/loadavg.h ../core/notify.h +funticket.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h +funticket.o: ../core/mount.h ../core/locale.h ../templates/misc.h +funticket.o: ../templates/localefilter.h ../core/locale.h ../core/system.h +last.o: last.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +last.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +last.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +last.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +last.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h last.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h -last.o: ../core/session.h ../core/plugindata.h ../core/rebus.h -last.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h -last.o: ../core/config.h ../core/system.h ../core/dirs.h ../core/db.h -last.o: ../core/request.h ../core/mounts.h ../core/mount.h -last.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -last.o: ../core/groups.h ../core/loadavg.h ../core/notify.h +last.o: ../core/session.h ../core/error.h ../core/user.h ../core/plugindata.h +last.o: ../core/rebus.h ../core/config.h ../core/confparser.h +last.o: ../core/htmlfilter.h ../core/config.h ../core/system.h ../core/dirs.h +last.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h +last.o: ../core/mount.h ../core/mountparser.h ../core/users.h +last.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +last.o: ../core/group.h ../core/loadavg.h ../core/notify.h last.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h last.o: ../core/mount.h ../core/locale.h ../templates/misc.h last.o: ../templates/localefilter.h ../core/locale.h ../core/system.h -login.o: login.h functionbase.h ../core/item.h ../core/db.h ../core/item.h -login.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h -login.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h +login.o: login.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +login.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +login.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +login.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +login.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h login.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h -login.o: ../core/session.h ../core/plugindata.h ../core/rebus.h -login.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h -login.o: ../core/config.h ../core/system.h ../core/dirs.h ../core/db.h +login.o: ../core/session.h ../core/error.h ../core/user.h +login.o: ../core/plugindata.h ../core/rebus.h ../core/config.h +login.o: ../core/confparser.h ../core/htmlfilter.h ../core/config.h +login.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h login.o: ../core/request.h ../core/mounts.h ../core/mount.h -login.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -login.o: ../core/groups.h ../core/loadavg.h ../core/notify.h +login.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h +login.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h +login.o: ../core/loadavg.h ../core/notify.h login.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h login.o: ../core/mount.h ../core/locale.h ../templates/misc.h login.o: ../templates/localefilter.h ../core/locale.h ../core/system.h -logout.o: logout.h functionbase.h ../core/item.h ../core/db.h ../core/item.h -logout.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h -logout.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h +logout.o: logout.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +logout.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +logout.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +logout.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +logout.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h logout.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h -logout.o: ../core/session.h ../core/plugindata.h ../core/rebus.h -logout.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h -logout.o: ../core/config.h ../core/system.h ../core/dirs.h ../core/db.h +logout.o: ../core/session.h ../core/error.h ../core/user.h +logout.o: ../core/plugindata.h ../core/rebus.h ../core/config.h +logout.o: ../core/confparser.h ../core/htmlfilter.h ../core/config.h +logout.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h logout.o: ../core/request.h ../core/mounts.h ../core/mount.h -logout.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -logout.o: ../core/groups.h ../core/loadavg.h ../core/notify.h +logout.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h +logout.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h +logout.o: ../core/loadavg.h ../core/notify.h logout.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h logout.o: ../core/mount.h ../core/locale.h ../templates/misc.h logout.o: ../templates/localefilter.h ../core/locale.h ../core/system.h -ls.o: ls.h functionbase.h ../core/item.h ../core/db.h ../core/item.h -ls.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h -ls.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h +ls.o: ls.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +ls.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +ls.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +ls.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +ls.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h ls.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h -ls.o: ../core/session.h ../core/plugindata.h ../core/rebus.h ../core/config.h -ls.o: ../core/confparser.h ../core/htmlfilter.h ../core/config.h -ls.o: ../core/system.h ../core/dirs.h ../core/db.h ../core/request.h -ls.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h ../core/users.h -ls.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h -ls.o: ../core/notify.h ../templatesnotify/templatesnotify.h -ls.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h -ls.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h -ls.o: ../core/system.h -mkdir.o: mkdir.h functionbase.h ../core/item.h ../core/db.h ../core/item.h -mkdir.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h -mkdir.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h +ls.o: ../core/session.h ../core/error.h ../core/user.h ../core/plugindata.h +ls.o: ../core/rebus.h ../core/config.h ../core/confparser.h +ls.o: ../core/htmlfilter.h ../core/config.h ../core/system.h ../core/dirs.h +ls.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h +ls.o: ../core/mount.h ../core/mountparser.h ../core/users.h +ls.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +ls.o: ../core/group.h ../core/loadavg.h ../core/notify.h +ls.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h +ls.o: ../core/mount.h ../core/locale.h ../templates/misc.h +ls.o: ../templates/localefilter.h ../core/locale.h ../core/system.h +mkdir.o: mkdir.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +mkdir.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +mkdir.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +mkdir.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +mkdir.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h mkdir.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h -mkdir.o: ../core/session.h ../core/plugindata.h ../core/rebus.h -mkdir.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h -mkdir.o: ../core/config.h ../core/system.h ../core/dirs.h ../core/db.h +mkdir.o: ../core/session.h ../core/error.h ../core/user.h +mkdir.o: ../core/plugindata.h ../core/rebus.h ../core/config.h +mkdir.o: ../core/confparser.h ../core/htmlfilter.h ../core/config.h +mkdir.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h mkdir.o: ../core/request.h ../core/mounts.h ../core/mount.h -mkdir.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -mkdir.o: ../core/groups.h ../core/loadavg.h ../core/notify.h +mkdir.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h +mkdir.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h +mkdir.o: ../core/loadavg.h ../core/notify.h mkdir.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h mkdir.o: ../core/mount.h ../core/locale.h ../templates/misc.h mkdir.o: ../templates/localefilter.h ../core/locale.h ../core/system.h mkdir.o: functions.h functionparser.h adduser.h cat.h chmod.h privchanger.h mkdir.o: chown.h ckeditor.h cp.h createthread.h createticket.h default.h mkdir.o: download.h editticket.h emacs.h last.h login.h logout.h ls.h mv.h -mkdir.o: node.h priv.h reload.h rm.h run.h subject.h funthread.h -mkdir.o: ../core/thread.h funticket.h ../core/ticket.h template.h tinymce.h -mkdir.o: uname.h upload.h uptime.h who.h ../core/htmlfilter.h -mv.o: mv.h functionbase.h ../core/item.h ../core/db.h ../core/item.h -mv.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h -mv.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h +mkdir.o: node.h priv.h reload.h rm.h run.h subject.h funthread.h funticket.h +mkdir.o: template.h tinymce.h uname.h upload.h uptime.h who.h +mkdir.o: ../core/htmlfilter.h +mv.o: mv.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +mv.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +mv.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +mv.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +mv.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h mv.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h -mv.o: ../core/session.h ../core/plugindata.h ../core/rebus.h ../core/config.h -mv.o: ../core/confparser.h ../core/htmlfilter.h ../core/config.h -mv.o: ../core/system.h ../core/dirs.h ../core/db.h ../core/request.h -mv.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h ../core/users.h -mv.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h -mv.o: ../core/notify.h ../templatesnotify/templatesnotify.h -mv.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h -mv.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h -mv.o: ../core/system.h functions.h functionparser.h adduser.h cat.h chmod.h -mv.o: privchanger.h chown.h ckeditor.h cp.h createthread.h createticket.h -mv.o: default.h download.h editticket.h emacs.h last.h login.h logout.h ls.h -mv.o: mkdir.h node.h priv.h reload.h rm.h run.h subject.h funthread.h -mv.o: ../core/thread.h funticket.h ../core/ticket.h template.h tinymce.h -mv.o: uname.h upload.h uptime.h who.h ../core/htmlfilter.h -node.o: node.h functionbase.h ../core/item.h ../core/db.h ../core/item.h -node.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h -node.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h +mv.o: ../core/session.h ../core/error.h ../core/user.h ../core/plugindata.h +mv.o: ../core/rebus.h ../core/config.h ../core/confparser.h +mv.o: ../core/htmlfilter.h ../core/config.h ../core/system.h ../core/dirs.h +mv.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h +mv.o: ../core/mount.h ../core/mountparser.h ../core/users.h +mv.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +mv.o: ../core/group.h ../core/loadavg.h ../core/notify.h +mv.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h +mv.o: ../core/mount.h ../core/locale.h ../templates/misc.h +mv.o: ../templates/localefilter.h ../core/locale.h ../core/system.h +mv.o: functions.h functionparser.h adduser.h cat.h chmod.h privchanger.h +mv.o: chown.h ckeditor.h cp.h createthread.h createticket.h default.h +mv.o: download.h editticket.h emacs.h last.h login.h logout.h ls.h mkdir.h +mv.o: node.h priv.h reload.h rm.h run.h subject.h funthread.h funticket.h +mv.o: template.h tinymce.h uname.h upload.h uptime.h who.h +mv.o: ../core/htmlfilter.h +node.o: node.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +node.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +node.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +node.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +node.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h node.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h -node.o: ../core/session.h ../core/plugindata.h ../core/rebus.h -node.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h -node.o: ../core/config.h ../core/system.h ../core/dirs.h ../core/db.h -node.o: ../core/request.h ../core/mounts.h ../core/mount.h -node.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -node.o: ../core/groups.h ../core/loadavg.h ../core/notify.h +node.o: ../core/session.h ../core/error.h ../core/user.h ../core/plugindata.h +node.o: ../core/rebus.h ../core/config.h ../core/confparser.h +node.o: ../core/htmlfilter.h ../core/config.h ../core/system.h ../core/dirs.h +node.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h +node.o: ../core/mount.h ../core/mountparser.h ../core/users.h +node.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +node.o: ../core/group.h ../core/loadavg.h ../core/notify.h node.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h node.o: ../core/mount.h ../core/locale.h ../templates/misc.h node.o: ../templates/localefilter.h ../core/locale.h ../core/system.h -priv.o: priv.h functionbase.h ../core/item.h ../core/db.h ../core/item.h -priv.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h -priv.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h +priv.o: priv.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +priv.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +priv.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +priv.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +priv.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h priv.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h -priv.o: ../core/session.h ../core/plugindata.h ../core/rebus.h -priv.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h -priv.o: ../core/config.h ../core/system.h ../core/dirs.h ../core/db.h -priv.o: ../core/request.h ../core/mounts.h ../core/mount.h -priv.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -priv.o: ../core/groups.h ../core/loadavg.h ../core/notify.h +priv.o: ../core/session.h ../core/error.h ../core/user.h ../core/plugindata.h +priv.o: ../core/rebus.h ../core/config.h ../core/confparser.h +priv.o: ../core/htmlfilter.h ../core/config.h ../core/system.h ../core/dirs.h +priv.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h +priv.o: ../core/mount.h ../core/mountparser.h ../core/users.h +priv.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +priv.o: ../core/group.h ../core/loadavg.h ../core/notify.h priv.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h priv.o: ../core/mount.h ../core/locale.h ../templates/misc.h priv.o: ../templates/localefilter.h ../core/locale.h ../core/system.h priv.o: privchanger.h privchanger.o: privchanger.h ../core/request.h ../core/requesttypes.h -privchanger.o: ../core/session.h ../core/item.h ../core/error.h ../core/log.h +privchanger.o: ../core/session.h ../core/item.h ../core/error.h privchanger.o: ../core/user.h ../core/plugindata.h ../core/rebus.h privchanger.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h privchanger.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h -privchanger.o: ../core/db.h ../core/request.h ../core/mounts.h -privchanger.o: ../core/mount.h ../core/mountparser.h ../core/users.h -privchanger.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h -privchanger.o: ../core/group.h ../core/loadavg.h ../core/db.h -privchanger.o: ../core/thread.h ../core/ticket.h +privchanger.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +privchanger.o: ../core/textstream.h ../db/dbitemquery.h ../core/item.h +privchanger.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h +privchanger.o: ../core/thread.h ../core/error.h ../core/log.h +privchanger.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/ticket.h +privchanger.o: ../core/request.h ../core/mounts.h ../core/mount.h +privchanger.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h +privchanger.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h +privchanger.o: ../core/loadavg.h readticket.o: readticket.h ../core/request.h ../core/requesttypes.h -readticket.o: ../core/session.h ../core/item.h ../core/error.h ../core/log.h -readticket.o: ../core/user.h ../core/plugindata.h ../core/rebus.h -readticket.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h -readticket.o: ../core/ticket.h ../core/system.h ../core/dirs.h -readticket.o: ../core/dircontainer.h ../core/db.h ../core/request.h +readticket.o: ../core/session.h ../core/item.h ../core/error.h ../core/user.h +readticket.o: ../core/plugindata.h ../core/rebus.h ../core/config.h +readticket.o: ../core/confparser.h ../core/htmlfilter.h ../core/ticket.h +readticket.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h +readticket.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +readticket.o: ../core/textstream.h ../db/dbitemquery.h ../core/item.h +readticket.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h +readticket.o: ../core/thread.h ../core/error.h ../core/log.h +readticket.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/request.h readticket.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h readticket.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h readticket.o: ../core/groups.h ../core/group.h ../core/loadavg.h -reload.o: reload.h functionbase.h ../core/item.h ../core/db.h ../core/item.h -reload.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h -reload.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h +reload.o: reload.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +reload.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +reload.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +reload.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +reload.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h reload.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h -reload.o: ../core/session.h ../core/plugindata.h ../core/rebus.h -reload.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h -reload.o: ../core/config.h ../core/system.h ../core/dirs.h ../core/db.h +reload.o: ../core/session.h ../core/error.h ../core/user.h +reload.o: ../core/plugindata.h ../core/rebus.h ../core/config.h +reload.o: ../core/confparser.h ../core/htmlfilter.h ../core/config.h +reload.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h reload.o: ../core/request.h ../core/mounts.h ../core/mount.h -reload.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -reload.o: ../core/groups.h ../core/loadavg.h ../core/notify.h +reload.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h +reload.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h +reload.o: ../core/loadavg.h ../core/notify.h reload.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h reload.o: ../core/mount.h ../core/locale.h ../templates/misc.h reload.o: ../templates/localefilter.h ../core/locale.h ../core/system.h @@ -456,114 +551,137 @@ reload.o: ../core/item.h ../templates/misc.h ../templates/ckeditorgetparser.h reload.o: ../core/httpsimpleparser.h ../core/log.h reload.o: ../templates/indexpatterns.h ../core/sessionmanager.h reload.o: ../core/sessioncontainer.h -rm.o: rm.h functionbase.h ../core/item.h ../core/db.h ../core/item.h -rm.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h -rm.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h +rm.o: rm.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +rm.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +rm.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +rm.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +rm.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h rm.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h -rm.o: ../core/session.h ../core/plugindata.h ../core/rebus.h ../core/config.h -rm.o: ../core/confparser.h ../core/htmlfilter.h ../core/config.h -rm.o: ../core/system.h ../core/dirs.h ../core/db.h ../core/request.h -rm.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h ../core/users.h -rm.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h -rm.o: ../core/notify.h ../templatesnotify/templatesnotify.h -rm.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h -rm.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h -rm.o: ../core/system.h ../core/plugin.h ../core/pluginmsg.h -rm.o: ../core/sessionmanager.h ../core/sessioncontainer.h -rm.o: ../functions/functions.h functionparser.h adduser.h cat.h chmod.h -rm.o: privchanger.h chown.h ckeditor.h cp.h createthread.h createticket.h -rm.o: default.h download.h editticket.h emacs.h last.h login.h logout.h ls.h -rm.o: mkdir.h mv.h node.h priv.h reload.h run.h subject.h funthread.h -rm.o: ../core/thread.h funticket.h ../core/ticket.h template.h tinymce.h -rm.o: uname.h upload.h uptime.h who.h ../core/htmlfilter.h -rm.o: ../templates/templates.h ../templates/patterncacher.h ../core/item.h -rm.o: ../templates/misc.h ../templates/ckeditorgetparser.h -rm.o: ../core/httpsimpleparser.h ../core/log.h ../templates/indexpatterns.h -rm.o: ../core/sessionmanager.h -run.o: run.h functionbase.h ../core/item.h ../core/db.h ../core/item.h -run.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h -run.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h +rm.o: ../core/session.h ../core/error.h ../core/user.h ../core/plugindata.h +rm.o: ../core/rebus.h ../core/config.h ../core/confparser.h +rm.o: ../core/htmlfilter.h ../core/config.h ../core/system.h ../core/dirs.h +rm.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h +rm.o: ../core/mount.h ../core/mountparser.h ../core/users.h +rm.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +rm.o: ../core/group.h ../core/loadavg.h ../core/notify.h +rm.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h +rm.o: ../core/mount.h ../core/locale.h ../templates/misc.h +rm.o: ../templates/localefilter.h ../core/locale.h ../core/system.h +rm.o: ../core/plugin.h ../core/pluginmsg.h ../core/sessionmanager.h +rm.o: ../core/sessioncontainer.h ../functions/functions.h functionparser.h +rm.o: adduser.h cat.h chmod.h privchanger.h chown.h ckeditor.h cp.h +rm.o: createthread.h createticket.h default.h download.h editticket.h emacs.h +rm.o: last.h login.h logout.h ls.h mkdir.h mv.h node.h priv.h reload.h run.h +rm.o: subject.h funthread.h funticket.h template.h tinymce.h uname.h upload.h +rm.o: uptime.h who.h ../core/htmlfilter.h ../templates/templates.h +rm.o: ../templates/patterncacher.h ../core/item.h ../templates/misc.h +rm.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h +rm.o: ../core/log.h ../templates/indexpatterns.h ../core/sessionmanager.h +run.o: run.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +run.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +run.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +run.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +run.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h run.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h -run.o: ../core/session.h ../core/plugindata.h ../core/rebus.h -run.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h -run.o: ../core/config.h ../core/system.h ../core/dirs.h ../core/db.h -run.o: ../core/request.h ../core/mounts.h ../core/mount.h -run.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -run.o: ../core/groups.h ../core/loadavg.h ../core/notify.h +run.o: ../core/session.h ../core/error.h ../core/user.h ../core/plugindata.h +run.o: ../core/rebus.h ../core/config.h ../core/confparser.h +run.o: ../core/htmlfilter.h ../core/config.h ../core/system.h ../core/dirs.h +run.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h +run.o: ../core/mount.h ../core/mountparser.h ../core/users.h +run.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +run.o: ../core/group.h ../core/loadavg.h ../core/notify.h run.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h run.o: ../core/mount.h ../core/locale.h ../templates/misc.h run.o: ../templates/localefilter.h ../core/locale.h ../core/system.h -subject.o: subject.h functionbase.h ../core/item.h ../core/db.h -subject.o: ../core/item.h ../core/user.h ../core/group.h ../core/thread.h -subject.o: ../core/error.h ../core/log.h ../core/dircontainer.h -subject.o: ../core/ugcontainer.h ../core/ticket.h ../core/request.h -subject.o: ../core/requesttypes.h ../core/session.h ../core/plugindata.h -subject.o: ../core/rebus.h ../core/config.h ../core/confparser.h -subject.o: ../core/htmlfilter.h ../core/config.h ../core/system.h -subject.o: ../core/dirs.h ../core/db.h ../core/request.h ../core/mounts.h -subject.o: ../core/mount.h ../core/mountparser.h ../core/users.h -subject.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h -subject.o: ../core/notify.h ../templatesnotify/templatesnotify.h -subject.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h -subject.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h -subject.o: ../core/system.h -template.o: template.h functionbase.h ../core/item.h ../core/db.h -template.o: ../core/item.h ../core/user.h ../core/group.h ../core/thread.h -template.o: ../core/error.h ../core/log.h ../core/dircontainer.h +subject.o: subject.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +subject.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +subject.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +subject.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +subject.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h +subject.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h +subject.o: ../core/session.h ../core/error.h ../core/user.h +subject.o: ../core/plugindata.h ../core/rebus.h ../core/config.h +subject.o: ../core/confparser.h ../core/htmlfilter.h ../core/config.h +subject.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h +subject.o: ../core/request.h ../core/mounts.h ../core/mount.h +subject.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h +subject.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h +subject.o: ../core/loadavg.h ../core/notify.h +subject.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h +subject.o: ../core/mount.h ../core/locale.h ../templates/misc.h +subject.o: ../templates/localefilter.h ../core/locale.h ../core/system.h +template.o: template.h functionbase.h ../core/item.h ../db/db.h +template.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +template.o: ../core/textstream.h ../db/dbitemquery.h ../db/dbitemcolumns.h +template.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h +template.o: ../core/log.h ../core/dircontainer.h ../core/item.h template.o: ../core/ugcontainer.h ../core/ticket.h ../core/request.h -template.o: ../core/requesttypes.h ../core/session.h ../core/plugindata.h -template.o: ../core/rebus.h ../core/config.h ../core/confparser.h -template.o: ../core/htmlfilter.h ../core/config.h ../core/system.h -template.o: ../core/dirs.h ../core/db.h ../core/request.h ../core/mounts.h +template.o: ../core/requesttypes.h ../core/session.h ../core/error.h +template.o: ../core/user.h ../core/plugindata.h ../core/rebus.h +template.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h +template.o: ../core/config.h ../core/system.h ../core/dirs.h +template.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h template.o: ../core/mount.h ../core/mountparser.h ../core/users.h -template.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h -template.o: ../core/notify.h ../templatesnotify/templatesnotify.h -template.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h -template.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h -template.o: ../core/system.h ../core/misc.h -tinymce.o: tinymce.h functionbase.h ../core/item.h ../core/db.h -tinymce.o: ../core/item.h ../core/user.h ../core/group.h ../core/thread.h -tinymce.o: ../core/error.h ../core/log.h ../core/dircontainer.h -tinymce.o: ../core/ugcontainer.h ../core/ticket.h ../core/request.h -tinymce.o: ../core/requesttypes.h ../core/session.h ../core/plugindata.h -tinymce.o: ../core/rebus.h ../core/config.h ../core/confparser.h -tinymce.o: ../core/htmlfilter.h ../core/config.h ../core/system.h -tinymce.o: ../core/dirs.h ../core/db.h ../core/request.h ../core/mounts.h -tinymce.o: ../core/mount.h ../core/mountparser.h ../core/users.h -tinymce.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h -tinymce.o: ../core/notify.h ../templatesnotify/templatesnotify.h -tinymce.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h -tinymce.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h -tinymce.o: ../core/system.h functions.h functionparser.h adduser.h cat.h -tinymce.o: chmod.h privchanger.h chown.h ckeditor.h cp.h createthread.h -tinymce.o: createticket.h default.h download.h editticket.h emacs.h last.h -tinymce.o: login.h logout.h ls.h mkdir.h mv.h node.h priv.h reload.h rm.h -tinymce.o: run.h subject.h funthread.h ../core/thread.h funticket.h -tinymce.o: ../core/ticket.h template.h uname.h upload.h uptime.h who.h +template.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +template.o: ../core/group.h ../core/loadavg.h ../core/notify.h +template.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h +template.o: ../core/mount.h ../core/locale.h ../templates/misc.h +template.o: ../templates/localefilter.h ../core/locale.h ../core/system.h +template.o: ../core/misc.h +tinymce.o: tinymce.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +tinymce.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +tinymce.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +tinymce.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +tinymce.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h +tinymce.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h +tinymce.o: ../core/session.h ../core/error.h ../core/user.h +tinymce.o: ../core/plugindata.h ../core/rebus.h ../core/config.h +tinymce.o: ../core/confparser.h ../core/htmlfilter.h ../core/config.h +tinymce.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h +tinymce.o: ../core/request.h ../core/mounts.h ../core/mount.h +tinymce.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h +tinymce.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h +tinymce.o: ../core/loadavg.h ../core/notify.h +tinymce.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h +tinymce.o: ../core/mount.h ../core/locale.h ../templates/misc.h +tinymce.o: ../templates/localefilter.h ../core/locale.h ../core/system.h +tinymce.o: functions.h functionparser.h adduser.h cat.h chmod.h privchanger.h +tinymce.o: chown.h ckeditor.h cp.h createthread.h createticket.h default.h +tinymce.o: download.h editticket.h emacs.h last.h login.h logout.h ls.h +tinymce.o: mkdir.h mv.h node.h priv.h reload.h rm.h run.h subject.h +tinymce.o: funthread.h funticket.h template.h uname.h upload.h uptime.h who.h tinymce.o: ../core/htmlfilter.h -uname.o: uname.h functionbase.h ../core/item.h ../core/db.h ../core/item.h -uname.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h -uname.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h +uname.o: uname.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +uname.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +uname.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +uname.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +uname.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h uname.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h -uname.o: ../core/session.h ../core/plugindata.h ../core/rebus.h -uname.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h -uname.o: ../core/config.h ../core/system.h ../core/dirs.h ../core/db.h +uname.o: ../core/session.h ../core/error.h ../core/user.h +uname.o: ../core/plugindata.h ../core/rebus.h ../core/config.h +uname.o: ../core/confparser.h ../core/htmlfilter.h ../core/config.h +uname.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h uname.o: ../core/request.h ../core/mounts.h ../core/mount.h -uname.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -uname.o: ../core/groups.h ../core/loadavg.h ../core/notify.h +uname.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h +uname.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h +uname.o: ../core/loadavg.h ../core/notify.h uname.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h uname.o: ../core/mount.h ../core/locale.h ../templates/misc.h uname.o: ../templates/localefilter.h ../core/locale.h ../core/system.h -upload.o: upload.h functionbase.h ../core/item.h ../core/db.h ../core/item.h -upload.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h -upload.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h +upload.o: upload.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +upload.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +upload.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +upload.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +upload.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h upload.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h -upload.o: ../core/session.h ../core/plugindata.h ../core/rebus.h -upload.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h -upload.o: ../core/config.h ../core/system.h ../core/dirs.h ../core/db.h +upload.o: ../core/session.h ../core/error.h ../core/user.h +upload.o: ../core/plugindata.h ../core/rebus.h ../core/config.h +upload.o: ../core/confparser.h ../core/htmlfilter.h ../core/config.h +upload.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h upload.o: ../core/request.h ../core/mounts.h ../core/mount.h -upload.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -upload.o: ../core/groups.h ../core/loadavg.h ../core/notify.h +upload.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h +upload.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h +upload.o: ../core/loadavg.h ../core/notify.h upload.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h upload.o: ../core/mount.h ../core/locale.h ../templates/misc.h upload.o: ../templates/localefilter.h ../core/locale.h ../core/system.h @@ -571,32 +689,38 @@ upload.o: ../core/misc.h ../functions/functions.h functionparser.h adduser.h upload.o: cat.h chmod.h privchanger.h chown.h ckeditor.h cp.h createthread.h upload.o: createticket.h default.h download.h editticket.h emacs.h last.h upload.o: login.h logout.h ls.h mkdir.h mv.h node.h priv.h reload.h rm.h -upload.o: run.h subject.h funthread.h ../core/thread.h funticket.h -upload.o: ../core/ticket.h template.h tinymce.h uname.h uptime.h who.h -upload.o: ../core/htmlfilter.h -uptime.o: uptime.h functionbase.h ../core/item.h ../core/db.h ../core/item.h -uptime.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h -uptime.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h +upload.o: run.h subject.h funthread.h funticket.h template.h tinymce.h +upload.o: uname.h uptime.h who.h ../core/htmlfilter.h +uptime.o: uptime.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +uptime.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +uptime.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +uptime.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +uptime.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h uptime.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h -uptime.o: ../core/session.h ../core/plugindata.h ../core/rebus.h -uptime.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h -uptime.o: ../core/config.h ../core/system.h ../core/dirs.h ../core/db.h +uptime.o: ../core/session.h ../core/error.h ../core/user.h +uptime.o: ../core/plugindata.h ../core/rebus.h ../core/config.h +uptime.o: ../core/confparser.h ../core/htmlfilter.h ../core/config.h +uptime.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h uptime.o: ../core/request.h ../core/mounts.h ../core/mount.h -uptime.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -uptime.o: ../core/groups.h ../core/loadavg.h ../core/notify.h +uptime.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h +uptime.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h +uptime.o: ../core/loadavg.h ../core/notify.h uptime.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h uptime.o: ../core/mount.h ../core/locale.h ../templates/misc.h uptime.o: ../templates/localefilter.h ../core/locale.h ../core/system.h -who.o: who.h functionbase.h ../core/item.h ../core/db.h ../core/item.h -who.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h -who.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h +who.o: who.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h +who.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +who.o: ../db/dbitemquery.h ../db/dbitemcolumns.h ../core/user.h +who.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h +who.o: ../core/dircontainer.h ../core/item.h ../core/ugcontainer.h who.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h -who.o: ../core/session.h ../core/plugindata.h ../core/rebus.h -who.o: ../core/config.h ../core/confparser.h ../core/htmlfilter.h -who.o: ../core/config.h ../core/system.h ../core/dirs.h ../core/db.h -who.o: ../core/request.h ../core/mounts.h ../core/mount.h -who.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -who.o: ../core/groups.h ../core/loadavg.h ../core/notify.h +who.o: ../core/session.h ../core/error.h ../core/user.h ../core/plugindata.h +who.o: ../core/rebus.h ../core/config.h ../core/confparser.h +who.o: ../core/htmlfilter.h ../core/config.h ../core/system.h ../core/dirs.h +who.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h +who.o: ../core/mount.h ../core/mountparser.h ../core/users.h +who.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +who.o: ../core/group.h ../core/loadavg.h ../core/notify.h who.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h who.o: ../core/mount.h ../core/locale.h ../templates/misc.h who.o: ../templates/localefilter.h ../core/locale.h ../core/system.h diff --git a/functions/cp.h b/functions/cp.h index e5a5665..70abea2 100755 --- a/functions/cp.h +++ b/functions/cp.h @@ -29,7 +29,7 @@ private: // !! wywalic przedrostki cp_ Cp Item cp_temp; - Db::ItemQuery cp_iq; + DbItemQuery cp_iq; bool cp_remove_defaults; bool cp_preserve_attr; long cp_new_user; diff --git a/functions/functionbase.h b/functions/functionbase.h index fa1b57c..d0fdad7 100755 --- a/functions/functionbase.h +++ b/functions/functionbase.h @@ -13,7 +13,7 @@ #include #include #include "core/item.h" -#include "core/db.h" +#include "db/db.h" #include "core/request.h" #include "core/config.h" #include "core/system.h" diff --git a/functions/functionparser.h b/functions/functionparser.h index e25fdac..b4958f7 100755 --- a/functions/functionparser.h +++ b/functions/functionparser.h @@ -11,7 +11,7 @@ #define headerfilecmslucorefunctionparser #include "core/request.h" -#include "core/db.h" +#include "db/db.h" #include "core/system.h" diff --git a/functions/funthread.cpp b/functions/funthread.cpp index 313abce..eb17387 100755 --- a/functions/funthread.cpp +++ b/functions/funthread.cpp @@ -62,7 +62,7 @@ void FunThread::MakeGet() { is_thread = (db->GetThreadByDirId(request->dir_tab.back()->id, thread) == WINIX_ERR_OK); - Db::ItemQuery iq; + DbItemQuery iq; if( system->mounts.pmount->IsArg(system->mounts.MountParThread(), "sort_desc") ) iq.sort_asc = false; diff --git a/functions/funticket.cpp b/functions/funticket.cpp index dabdef3..0f9ada1 100755 --- a/functions/funticket.cpp +++ b/functions/funticket.cpp @@ -76,7 +76,7 @@ void FunTicket::MakeGet() { ReadTicket(); - Db::ItemQuery iq; + DbItemQuery iq; iq.WhereParentId(request->dir_tab.back()->id); iq.WhereType(Item::file); diff --git a/functions/ls.cpp b/functions/ls.cpp index 9afbaaa..d615af0 100755 --- a/functions/ls.cpp +++ b/functions/ls.cpp @@ -25,7 +25,7 @@ void Ls::MakeGet() { if( !request->is_item ) { - Db::ItemQuery iq; + DbItemQuery iq; iq.sel_content = false; diff --git a/functions/mv.cpp b/functions/mv.cpp index 21a2cf8..3587d1d 100755 --- a/functions/mv.cpp +++ b/functions/mv.cpp @@ -222,7 +222,7 @@ void Mv::MoveFile(Item & item, bool redirect) void Mv::MoveContentOfDir() { -Db::ItemQuery iq; +DbItemQuery iq; iq.sel_parent_id = true; iq.sel_type = true; diff --git a/functions/mv.h b/functions/mv.h index 6f59387..2b75e33 100755 --- a/functions/mv.h +++ b/functions/mv.h @@ -33,7 +33,7 @@ private: std::string mv_new_path; long mv_dir_id; std::vector mv_auth; - Db::ItemQuery mv_auth_iq; + DbItemQuery mv_auth_iq; bool MoveCheckAccessFromToDir(); bool MoveCheckAccessFrom(); diff --git a/functions/privchanger.cpp b/functions/privchanger.cpp index c2c35ec..568e5e5 100755 --- a/functions/privchanger.cpp +++ b/functions/privchanger.cpp @@ -166,7 +166,7 @@ Item * root = 0; void PrivChanger::PrivFilesInDir(long parent_id) { - Db::ItemQuery iq; + DbItemQuery iq; iq.SetAll(false, false); iq.sel_user_id = iq.sel_group_id = iq.sel_guest_name = iq.sel_privileges = true; diff --git a/functions/privchanger.h b/functions/privchanger.h index 9a912db..0342c09 100755 --- a/functions/privchanger.h +++ b/functions/privchanger.h @@ -13,7 +13,7 @@ #include "core/request.h" #include "core/system.h" -#include "core/db.h" +#include "db/db.h" diff --git a/functions/rm.h b/functions/rm.h index 28b70e6..8d671bb 100755 --- a/functions/rm.h +++ b/functions/rm.h @@ -28,7 +28,7 @@ public: private: - Db::ItemQuery rm_auth_iq; + DbItemQuery rm_auth_iq; bool HasAccess(const Item & item); void RemoveAuthPrepareQuery(); diff --git a/main/Makefile.dep b/main/Makefile.dep index 0f75b1a..1b2e692 100755 --- a/main/Makefile.dep +++ b/main/Makefile.dep @@ -2,19 +2,22 @@ main.o: ../core/log.h ../core/app.h ../core/config.h ../core/confparser.h main.o: ../core/htmlfilter.h ../core/system.h ../core/dirs.h ../core/item.h -main.o: ../core/dircontainer.h ../core/db.h ../core/user.h ../core/group.h -main.o: ../core/thread.h ../core/error.h ../core/log.h ../core/ugcontainer.h -main.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h -main.o: ../core/session.h ../core/plugindata.h ../core/rebus.h -main.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h -main.o: ../core/users.h ../core/lastcontainer.h ../core/groups.h -main.o: ../core/loadavg.h ../core/sessionmanager.h ../core/sessioncontainer.h -main.o: ../core/notify.h ../templatesnotify/templatesnotify.h -main.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h ../core/config.h -main.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h -main.o: ../functions/functions.h ../functions/functionbase.h ../core/item.h -main.o: ../core/db.h ../core/request.h ../core/system.h ../core/notify.h -main.o: ../functions/functionparser.h ../functions/adduser.h +main.o: ../core/dircontainer.h ../db/db.h ../db/dbbase.h ../db/dbconn.h +main.o: ../db/dbtextstream.h ../core/textstream.h ../db/dbitemquery.h +main.o: ../core/item.h ../db/dbitemcolumns.h ../core/user.h ../core/group.h +main.o: ../core/thread.h ../core/error.h ../core/log.h ../core/dircontainer.h +main.o: ../core/ugcontainer.h ../core/ticket.h ../core/request.h +main.o: ../core/requesttypes.h ../core/session.h ../core/error.h +main.o: ../core/user.h ../core/plugindata.h ../core/rebus.h ../core/mounts.h +main.o: ../core/mount.h ../core/mountparser.h ../core/users.h +main.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +main.o: ../core/group.h ../core/loadavg.h ../core/sessionmanager.h +main.o: ../core/sessioncontainer.h ../core/notify.h +main.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h +main.o: ../core/mount.h ../core/locale.h ../core/config.h ../templates/misc.h +main.o: ../templates/localefilter.h ../core/locale.h ../functions/functions.h +main.o: ../functions/functionbase.h ../core/request.h ../core/system.h +main.o: ../core/notify.h ../functions/functionparser.h ../functions/adduser.h main.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h main.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h main.o: ../functions/createthread.h ../functions/createticket.h @@ -24,14 +27,14 @@ main.o: ../functions/login.h ../functions/logout.h ../functions/ls.h main.o: ../functions/mkdir.h ../functions/mv.h ../functions/node.h main.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h main.o: ../functions/run.h ../functions/subject.h ../functions/funthread.h -main.o: ../core/thread.h ../functions/funticket.h ../core/ticket.h -main.o: ../functions/template.h ../functions/tinymce.h ../functions/uname.h -main.o: ../functions/upload.h ../functions/uptime.h ../functions/who.h -main.o: ../core/htmlfilter.h ../templates/templates.h -main.o: ../templates/patterncacher.h ../core/item.h ../templates/misc.h -main.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h -main.o: ../core/log.h ../templates/indexpatterns.h ../core/sessionmanager.h -main.o: ../core/compress.h ../core/getparser.h ../core/httpsimpleparser.h -main.o: ../core/postparser.h ../core/cookieparser.h ../core/postmultiparser.h +main.o: ../functions/funticket.h ../functions/template.h +main.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h +main.o: ../functions/uptime.h ../functions/who.h ../core/htmlfilter.h +main.o: ../templates/templates.h ../templates/patterncacher.h ../core/item.h +main.o: ../templates/misc.h ../templates/ckeditorgetparser.h +main.o: ../core/httpsimpleparser.h ../core/log.h ../templates/indexpatterns.h +main.o: ../core/sessionmanager.h ../core/compress.h ../core/getparser.h +main.o: ../core/httpsimpleparser.h ../core/postparser.h +main.o: ../core/cookieparser.h ../core/postmultiparser.h main.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h main.o: ../core/plugin.h ../core/pluginmsg.h diff --git a/main/main.cpp b/main/main.cpp index 15c0736..325da79 100755 --- a/main/main.cpp +++ b/main/main.cpp @@ -16,12 +16,9 @@ #include "core/app.h" #include "core/plugin.h" -// !! chwilowo -#include "core/db.h" - Log log; -Log nlog; // notify log (used by another thread) +Log nlog; // notify log (used by a notification thread) Plugin plugin; diff --git a/plugins/stats/Makefile.dep b/plugins/stats/Makefile.dep index c53797b..ffac943 100755 --- a/plugins/stats/Makefile.dep +++ b/plugins/stats/Makefile.dep @@ -5,33 +5,36 @@ init.o: ../../core/log.h ../../core/request.h ../../core/requesttypes.h init.o: ../../core/session.h ../../core/item.h ../../core/error.h init.o: ../../core/log.h ../../core/user.h ../../core/plugindata.h init.o: ../../core/rebus.h ../../core/config.h ../../core/confparser.h -init.o: ../../core/htmlfilter.h ../../core/config.h ../../core/db.h -init.o: ../../core/group.h ../../core/thread.h ../../core/dircontainer.h +init.o: ../../core/htmlfilter.h ../../core/config.h ../../db/db.h +init.o: ../../db/dbbase.h ../../db/dbconn.h ../../db/dbtextstream.h +init.o: ../../core/textstream.h ../../db/dbitemquery.h ../../core/item.h +init.o: ../../db/dbitemcolumns.h ../../core/user.h ../../core/group.h +init.o: ../../core/thread.h ../../core/error.h ../../core/dircontainer.h init.o: ../../core/ugcontainer.h ../../core/ticket.h bot.h stats.h init.o: templates.h ../../core/plugin.h ../../core/pluginmsg.h init.o: ../../core/request.h ../../core/system.h ../../core/dirs.h -init.o: ../../core/db.h ../../core/mounts.h ../../core/mount.h -init.o: ../../core/mountparser.h ../../core/users.h -init.o: ../../core/lastcontainer.h ../../core/groups.h ../../core/loadavg.h -init.o: ../../core/sessionmanager.h ../../core/sessioncontainer.h -init.o: ../../functions/functions.h ../../functions/functionbase.h -init.o: ../../core/item.h ../../core/system.h ../../core/notify.h -init.o: ../../templatesnotify/templatesnotify.h ../../../ezc/src/ezc.h -init.o: ../../core/mount.h ../../core/locale.h ../../templates/misc.h -init.o: ../../templates/localefilter.h ../../core/locale.h -init.o: ../../functions/functionparser.h ../../functions/adduser.h -init.o: ../../functions/cat.h ../../functions/chmod.h -init.o: ../../functions/privchanger.h ../../functions/chown.h -init.o: ../../functions/ckeditor.h ../../functions/cp.h -init.o: ../../functions/createthread.h ../../functions/createticket.h -init.o: ../../functions/default.h ../../functions/download.h -init.o: ../../functions/editticket.h ../../functions/emacs.h -init.o: ../../functions/last.h ../../functions/login.h -init.o: ../../functions/logout.h ../../functions/ls.h ../../functions/mkdir.h -init.o: ../../functions/mv.h ../../functions/node.h ../../functions/priv.h -init.o: ../../functions/reload.h ../../functions/rm.h ../../functions/run.h -init.o: ../../functions/subject.h ../../functions/funthread.h -init.o: ../../core/thread.h ../../functions/funticket.h ../../core/ticket.h +init.o: ../../core/dircontainer.h ../../core/mounts.h ../../core/mount.h +init.o: ../../core/mountparser.h ../../core/users.h ../../core/ugcontainer.h +init.o: ../../core/lastcontainer.h ../../core/groups.h ../../core/group.h +init.o: ../../core/loadavg.h ../../core/sessionmanager.h +init.o: ../../core/sessioncontainer.h ../../functions/functions.h +init.o: ../../functions/functionbase.h ../../core/system.h +init.o: ../../core/notify.h ../../templatesnotify/templatesnotify.h +init.o: ../../../ezc/src/ezc.h ../../core/mount.h ../../core/locale.h +init.o: ../../templates/misc.h ../../templates/localefilter.h +init.o: ../../core/locale.h ../../functions/functionparser.h +init.o: ../../functions/adduser.h ../../functions/cat.h +init.o: ../../functions/chmod.h ../../functions/privchanger.h +init.o: ../../functions/chown.h ../../functions/ckeditor.h +init.o: ../../functions/cp.h ../../functions/createthread.h +init.o: ../../functions/createticket.h ../../functions/default.h +init.o: ../../functions/download.h ../../functions/editticket.h +init.o: ../../functions/emacs.h ../../functions/last.h +init.o: ../../functions/login.h ../../functions/logout.h ../../functions/ls.h +init.o: ../../functions/mkdir.h ../../functions/mv.h ../../functions/node.h +init.o: ../../functions/priv.h ../../functions/reload.h ../../functions/rm.h +init.o: ../../functions/run.h ../../functions/subject.h +init.o: ../../functions/funthread.h ../../functions/funticket.h init.o: ../../functions/template.h ../../functions/tinymce.h init.o: ../../functions/uname.h ../../functions/upload.h init.o: ../../functions/uptime.h ../../functions/who.h @@ -46,16 +49,19 @@ templates.o: templates.h ../../core/plugin.h ../../core/pluginmsg.h templates.o: ../../core/log.h ../../core/plugindata.h ../../core/config.h templates.o: ../../core/confparser.h ../../core/htmlfilter.h templates.o: ../../core/request.h ../../core/system.h ../../core/dirs.h -templates.o: ../../core/item.h ../../core/dircontainer.h ../../core/db.h -templates.o: ../../core/mounts.h ../../core/mount.h ../../core/error.h -templates.o: ../../core/mountparser.h ../../core/users.h ../../core/user.h -templates.o: ../../core/ugcontainer.h ../../core/lastcontainer.h -templates.o: ../../core/groups.h ../../core/group.h ../../core/rebus.h -templates.o: ../../core/loadavg.h ../../core/sessionmanager.h -templates.o: ../../core/sessioncontainer.h ../../core/session.h -templates.o: ../../functions/functions.h ../../functions/functionbase.h -templates.o: ../../core/item.h ../../core/db.h ../../core/thread.h -templates.o: ../../core/ticket.h ../../core/request.h +templates.o: ../../core/item.h ../../core/dircontainer.h ../../db/db.h +templates.o: ../../db/dbbase.h ../../db/dbconn.h ../../db/dbtextstream.h +templates.o: ../../core/textstream.h ../../db/dbitemquery.h ../../core/item.h +templates.o: ../../db/dbitemcolumns.h ../../core/user.h ../../core/group.h +templates.o: ../../core/thread.h ../../core/error.h ../../core/dircontainer.h +templates.o: ../../core/ugcontainer.h ../../core/ticket.h ../../core/mounts.h +templates.o: ../../core/mount.h ../../core/error.h ../../core/mountparser.h +templates.o: ../../core/users.h ../../core/user.h ../../core/ugcontainer.h +templates.o: ../../core/lastcontainer.h ../../core/groups.h +templates.o: ../../core/group.h ../../core/rebus.h ../../core/loadavg.h +templates.o: ../../core/sessionmanager.h ../../core/sessioncontainer.h +templates.o: ../../core/session.h ../../functions/functions.h +templates.o: ../../functions/functionbase.h ../../core/request.h templates.o: ../../core/requesttypes.h ../../core/config.h templates.o: ../../core/system.h ../../core/notify.h templates.o: ../../templatesnotify/templatesnotify.h ../../../ezc/src/ezc.h @@ -74,8 +80,7 @@ templates.o: ../../functions/mkdir.h ../../functions/mv.h templates.o: ../../functions/node.h ../../functions/priv.h templates.o: ../../functions/reload.h ../../functions/rm.h templates.o: ../../functions/run.h ../../functions/subject.h -templates.o: ../../functions/funthread.h ../../core/thread.h -templates.o: ../../functions/funticket.h ../../core/ticket.h +templates.o: ../../functions/funthread.h ../../functions/funticket.h templates.o: ../../functions/template.h ../../functions/tinymce.h templates.o: ../../functions/uname.h ../../functions/upload.h templates.o: ../../functions/uptime.h ../../functions/who.h diff --git a/plugins/stats/init.cpp b/plugins/stats/init.cpp index 41c6fd5..d274a5a 100755 --- a/plugins/stats/init.cpp +++ b/plugins/stats/init.cpp @@ -11,7 +11,7 @@ #include "core/log.h" #include "core/request.h" #include "core/config.h" -#include "core/db.h" +#include "db/db.h" #include "bot.h" #include "stats.h" @@ -148,7 +148,7 @@ void RemoveFile(PluginInfo & info) void RemoveDir(PluginInfo & info) { -Db::ItemQuery query; +DbItemQuery query; std::vector items; size_t i; diff --git a/templates/Makefile.dep b/templates/Makefile.dep index 860af55..96e8318 100755 --- a/templates/Makefile.dep +++ b/templates/Makefile.dep @@ -7,11 +7,15 @@ adduser.o: indexpatterns.h ../core/locale.h ../core/config.h adduser.o: ../core/htmlfilter.h ../core/request.h ../core/requesttypes.h adduser.o: ../core/session.h ../core/item.h ../core/error.h ../core/log.h adduser.o: ../core/user.h ../core/plugindata.h ../core/rebus.h -adduser.o: ../core/config.h ../core/db.h ../core/group.h ../core/thread.h +adduser.o: ../core/config.h ../db/db.h ../db/dbbase.h ../db/dbconn.h +adduser.o: ../db/dbtextstream.h ../core/textstream.h ../db/dbitemquery.h +adduser.o: ../core/item.h ../db/dbitemcolumns.h ../core/user.h +adduser.o: ../core/group.h ../core/thread.h ../core/error.h adduser.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/ticket.h -adduser.o: ../core/system.h ../core/dirs.h ../core/db.h ../core/request.h -adduser.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h -adduser.o: ../core/users.h ../core/lastcontainer.h ../core/groups.h +adduser.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h +adduser.o: ../core/request.h ../core/mounts.h ../core/mount.h +adduser.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h +adduser.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h adduser.o: ../core/loadavg.h ../core/sessionmanager.h adduser.o: ../core/sessioncontainer.h ../core/system.h dir.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h misc.h @@ -20,15 +24,19 @@ dir.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h dir.o: indexpatterns.h ../core/locale.h ../core/config.h ../core/htmlfilter.h dir.o: ../core/request.h ../core/requesttypes.h ../core/session.h dir.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h -dir.o: ../core/plugindata.h ../core/rebus.h ../core/config.h ../core/db.h -dir.o: ../core/group.h ../core/thread.h ../core/dircontainer.h -dir.o: ../core/ugcontainer.h ../core/ticket.h ../core/system.h ../core/dirs.h -dir.o: ../core/db.h ../core/request.h ../core/mounts.h ../core/mount.h -dir.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -dir.o: ../core/groups.h ../core/loadavg.h ../core/sessionmanager.h +dir.o: ../core/plugindata.h ../core/rebus.h ../core/config.h ../db/db.h +dir.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +dir.o: ../core/textstream.h ../db/dbitemquery.h ../core/item.h +dir.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h ../core/thread.h +dir.o: ../core/error.h ../core/dircontainer.h ../core/ugcontainer.h +dir.o: ../core/ticket.h ../core/system.h ../core/dirs.h +dir.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h +dir.o: ../core/mount.h ../core/mountparser.h ../core/users.h +dir.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +dir.o: ../core/group.h ../core/loadavg.h ../core/sessionmanager.h dir.o: ../core/sessioncontainer.h ../core/system.h ../core/misc.h -dir.o: ../functions/functions.h ../functions/functionbase.h ../core/item.h -dir.o: ../core/notify.h ../templatesnotify/templatesnotify.h ../core/mount.h +dir.o: ../functions/functions.h ../functions/functionbase.h ../core/notify.h +dir.o: ../templatesnotify/templatesnotify.h ../core/mount.h dir.o: ../templates/misc.h ../functions/functionparser.h dir.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h dir.o: ../functions/privchanger.h ../functions/chown.h @@ -39,22 +47,26 @@ dir.o: ../functions/last.h ../functions/login.h ../functions/logout.h dir.o: ../functions/ls.h ../functions/mkdir.h ../functions/mv.h dir.o: ../functions/node.h ../functions/priv.h ../functions/reload.h dir.o: ../functions/rm.h ../functions/run.h ../functions/subject.h -dir.o: ../functions/funthread.h ../core/thread.h ../functions/funticket.h -dir.o: ../core/ticket.h ../functions/template.h ../functions/tinymce.h -dir.o: ../functions/uname.h ../functions/upload.h ../functions/uptime.h -dir.o: ../functions/who.h ../core/htmlfilter.h +dir.o: ../functions/funthread.h ../functions/funticket.h +dir.o: ../functions/template.h ../functions/tinymce.h ../functions/uname.h +dir.o: ../functions/upload.h ../functions/uptime.h ../functions/who.h +dir.o: ../core/htmlfilter.h doc.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h misc.h doc.o: localefilter.h ../core/locale.h ../core/confparser.h doc.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h doc.o: indexpatterns.h ../core/locale.h ../core/config.h ../core/htmlfilter.h doc.o: ../core/request.h ../core/requesttypes.h ../core/session.h doc.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h -doc.o: ../core/plugindata.h ../core/rebus.h ../core/config.h ../core/db.h -doc.o: ../core/group.h ../core/thread.h ../core/dircontainer.h -doc.o: ../core/ugcontainer.h ../core/ticket.h ../core/system.h ../core/dirs.h -doc.o: ../core/db.h ../core/request.h ../core/mounts.h ../core/mount.h -doc.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -doc.o: ../core/groups.h ../core/loadavg.h ../core/sessionmanager.h +doc.o: ../core/plugindata.h ../core/rebus.h ../core/config.h ../db/db.h +doc.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +doc.o: ../core/textstream.h ../db/dbitemquery.h ../core/item.h +doc.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h ../core/thread.h +doc.o: ../core/error.h ../core/dircontainer.h ../core/ugcontainer.h +doc.o: ../core/ticket.h ../core/system.h ../core/dirs.h +doc.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h +doc.o: ../core/mount.h ../core/mountparser.h ../core/users.h +doc.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +doc.o: ../core/group.h ../core/loadavg.h ../core/sessionmanager.h doc.o: ../core/sessioncontainer.h ../core/system.h ../core/request.h doc.o: ../core/misc.h indexpatterns.o: indexpatterns.h ../../ezc/src/ezc.h localefilter.h @@ -67,13 +79,17 @@ item.o: indexpatterns.h ../core/locale.h ../core/config.h item.o: ../core/htmlfilter.h ../core/request.h ../core/requesttypes.h item.o: ../core/session.h ../core/item.h ../core/error.h ../core/log.h item.o: ../core/user.h ../core/plugindata.h ../core/rebus.h ../core/config.h -item.o: ../core/db.h ../core/group.h ../core/thread.h ../core/dircontainer.h -item.o: ../core/ugcontainer.h ../core/ticket.h ../core/system.h -item.o: ../core/dirs.h ../core/db.h ../core/request.h ../core/mounts.h +item.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +item.o: ../core/textstream.h ../db/dbitemquery.h ../core/item.h +item.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h ../core/thread.h +item.o: ../core/error.h ../core/dircontainer.h ../core/ugcontainer.h +item.o: ../core/ticket.h ../core/system.h ../core/dirs.h +item.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h item.o: ../core/mount.h ../core/mountparser.h ../core/users.h -item.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h -item.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h -item.o: ../core/request.h ../core/misc.h ../core/bbcodeparser.h +item.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +item.o: ../core/group.h ../core/loadavg.h ../core/sessionmanager.h +item.o: ../core/sessioncontainer.h ../core/system.h ../core/request.h +item.o: ../core/misc.h ../core/bbcodeparser.h last.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h misc.h last.o: localefilter.h ../core/locale.h ../core/confparser.h last.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h @@ -81,13 +97,17 @@ last.o: indexpatterns.h ../core/locale.h ../core/config.h last.o: ../core/htmlfilter.h ../core/request.h ../core/requesttypes.h last.o: ../core/session.h ../core/item.h ../core/error.h ../core/log.h last.o: ../core/user.h ../core/plugindata.h ../core/rebus.h ../core/config.h -last.o: ../core/db.h ../core/group.h ../core/thread.h ../core/dircontainer.h -last.o: ../core/ugcontainer.h ../core/ticket.h ../core/system.h -last.o: ../core/dirs.h ../core/db.h ../core/request.h ../core/mounts.h +last.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +last.o: ../core/textstream.h ../db/dbitemquery.h ../core/item.h +last.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h ../core/thread.h +last.o: ../core/error.h ../core/dircontainer.h ../core/ugcontainer.h +last.o: ../core/ticket.h ../core/system.h ../core/dirs.h +last.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h last.o: ../core/mount.h ../core/mountparser.h ../core/users.h -last.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h -last.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h -last.o: ../core/lastcontainer.h ../core/request.h ../core/misc.h +last.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +last.o: ../core/group.h ../core/loadavg.h ../core/sessionmanager.h +last.o: ../core/sessioncontainer.h ../core/system.h ../core/lastcontainer.h +last.o: ../core/request.h ../core/misc.h localefilter.o: localefilter.h ../core/locale.h ../core/confparser.h localefilter.o: ../../ezc/src/ezc.h ../core/misc.h ../core/item.h ls.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h misc.h @@ -96,12 +116,15 @@ ls.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h ls.o: indexpatterns.h ../core/locale.h ../core/config.h ../core/htmlfilter.h ls.o: ../core/request.h ../core/requesttypes.h ../core/session.h ls.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h -ls.o: ../core/plugindata.h ../core/rebus.h ../core/config.h ../core/db.h -ls.o: ../core/group.h ../core/thread.h ../core/dircontainer.h +ls.o: ../core/plugindata.h ../core/rebus.h ../core/config.h ../db/db.h +ls.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h +ls.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h ../core/user.h +ls.o: ../core/group.h ../core/thread.h ../core/error.h ../core/dircontainer.h ls.o: ../core/ugcontainer.h ../core/ticket.h ../core/system.h ../core/dirs.h -ls.o: ../core/db.h ../core/request.h ../core/mounts.h ../core/mount.h -ls.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -ls.o: ../core/groups.h ../core/loadavg.h ../core/sessionmanager.h +ls.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h +ls.o: ../core/mount.h ../core/mountparser.h ../core/users.h +ls.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +ls.o: ../core/group.h ../core/loadavg.h ../core/sessionmanager.h ls.o: ../core/sessioncontainer.h ../core/system.h ../core/request.h misc.o: ../core/misc.h ../core/item.h ../core/request.h templates.h misc.o: ../../ezc/src/ezc.h patterncacher.h ../core/item.h misc.h @@ -110,13 +133,17 @@ misc.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h misc.o: indexpatterns.h ../core/locale.h ../core/config.h misc.o: ../core/htmlfilter.h ../core/request.h ../core/requesttypes.h misc.o: ../core/session.h ../core/error.h ../core/log.h ../core/user.h -misc.o: ../core/plugindata.h ../core/rebus.h ../core/config.h ../core/db.h -misc.o: ../core/group.h ../core/thread.h ../core/dircontainer.h -misc.o: ../core/ugcontainer.h ../core/ticket.h ../core/system.h -misc.o: ../core/dirs.h ../core/db.h ../core/request.h ../core/mounts.h +misc.o: ../core/plugindata.h ../core/rebus.h ../core/config.h ../db/db.h +misc.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +misc.o: ../core/textstream.h ../db/dbitemquery.h ../core/item.h +misc.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h ../core/thread.h +misc.o: ../core/error.h ../core/dircontainer.h ../core/ugcontainer.h +misc.o: ../core/ticket.h ../core/system.h ../core/dirs.h +misc.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h misc.o: ../core/mount.h ../core/mountparser.h ../core/users.h -misc.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h -misc.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h +misc.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +misc.o: ../core/group.h ../core/loadavg.h ../core/sessionmanager.h +misc.o: ../core/sessioncontainer.h ../core/system.h mount.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h mount.o: misc.h localefilter.h ../core/locale.h ../core/confparser.h mount.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h @@ -124,11 +151,15 @@ mount.o: indexpatterns.h ../core/locale.h ../core/config.h mount.o: ../core/htmlfilter.h ../core/request.h ../core/requesttypes.h mount.o: ../core/session.h ../core/item.h ../core/error.h ../core/log.h mount.o: ../core/user.h ../core/plugindata.h ../core/rebus.h ../core/config.h -mount.o: ../core/db.h ../core/group.h ../core/thread.h ../core/dircontainer.h +mount.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +mount.o: ../core/textstream.h ../db/dbitemquery.h ../core/item.h +mount.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h +mount.o: ../core/thread.h ../core/error.h ../core/dircontainer.h mount.o: ../core/ugcontainer.h ../core/ticket.h ../core/system.h -mount.o: ../core/dirs.h ../core/db.h ../core/request.h ../core/mounts.h -mount.o: ../core/mount.h ../core/mountparser.h ../core/users.h -mount.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h +mount.o: ../core/dirs.h ../core/dircontainer.h ../core/request.h +mount.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h +mount.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h +mount.o: ../core/groups.h ../core/group.h ../core/loadavg.h mount.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h mount.o: ../core/misc.h patterncacher.o: patterncacher.h ../core/item.h ../../ezc/src/ezc.h @@ -140,15 +171,19 @@ priv.o: indexpatterns.h ../core/locale.h ../core/config.h priv.o: ../core/htmlfilter.h ../core/request.h ../core/requesttypes.h priv.o: ../core/session.h ../core/item.h ../core/error.h ../core/log.h priv.o: ../core/user.h ../core/plugindata.h ../core/rebus.h ../core/config.h -priv.o: ../core/db.h ../core/group.h ../core/thread.h ../core/dircontainer.h -priv.o: ../core/ugcontainer.h ../core/ticket.h ../core/system.h -priv.o: ../core/dirs.h ../core/db.h ../core/request.h ../core/mounts.h +priv.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +priv.o: ../core/textstream.h ../db/dbitemquery.h ../core/item.h +priv.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h ../core/thread.h +priv.o: ../core/error.h ../core/dircontainer.h ../core/ugcontainer.h +priv.o: ../core/ticket.h ../core/system.h ../core/dirs.h +priv.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h priv.o: ../core/mount.h ../core/mountparser.h ../core/users.h -priv.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h -priv.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h -priv.o: ../core/misc.h ../functions/functions.h ../functions/functionbase.h -priv.o: ../core/item.h ../core/notify.h ../templatesnotify/templatesnotify.h -priv.o: ../core/mount.h ../templates/misc.h ../functions/functionparser.h +priv.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +priv.o: ../core/group.h ../core/loadavg.h ../core/sessionmanager.h +priv.o: ../core/sessioncontainer.h ../core/system.h ../core/misc.h +priv.o: ../functions/functions.h ../functions/functionbase.h ../core/notify.h +priv.o: ../templatesnotify/templatesnotify.h ../core/mount.h +priv.o: ../templates/misc.h ../functions/functionparser.h priv.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h priv.o: ../functions/privchanger.h ../functions/chown.h priv.o: ../functions/ckeditor.h ../functions/cp.h ../functions/createthread.h @@ -158,8 +193,8 @@ priv.o: ../functions/emacs.h ../functions/last.h ../functions/login.h priv.o: ../functions/logout.h ../functions/ls.h ../functions/mkdir.h priv.o: ../functions/mv.h ../functions/node.h ../functions/priv.h priv.o: ../functions/reload.h ../functions/rm.h ../functions/run.h -priv.o: ../functions/subject.h ../functions/funthread.h ../core/thread.h -priv.o: ../functions/funticket.h ../core/ticket.h ../functions/template.h +priv.o: ../functions/subject.h ../functions/funthread.h +priv.o: ../functions/funticket.h ../functions/template.h priv.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h priv.o: ../functions/uptime.h ../functions/who.h ../core/htmlfilter.h rebus.o: ../core/request.h templates.h ../../ezc/src/ezc.h patterncacher.h @@ -169,11 +204,15 @@ rebus.o: ../core/log.h indexpatterns.h ../core/locale.h ../core/config.h rebus.o: ../core/htmlfilter.h ../core/request.h ../core/requesttypes.h rebus.o: ../core/session.h ../core/item.h ../core/error.h ../core/log.h rebus.o: ../core/user.h ../core/plugindata.h ../core/rebus.h ../core/config.h -rebus.o: ../core/db.h ../core/group.h ../core/thread.h ../core/dircontainer.h +rebus.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +rebus.o: ../core/textstream.h ../db/dbitemquery.h ../core/item.h +rebus.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h +rebus.o: ../core/thread.h ../core/error.h ../core/dircontainer.h rebus.o: ../core/ugcontainer.h ../core/ticket.h ../core/system.h -rebus.o: ../core/dirs.h ../core/db.h ../core/request.h ../core/mounts.h -rebus.o: ../core/mount.h ../core/mountparser.h ../core/users.h -rebus.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h +rebus.o: ../core/dirs.h ../core/dircontainer.h ../core/request.h +rebus.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h +rebus.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h +rebus.o: ../core/groups.h ../core/group.h ../core/loadavg.h rebus.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h sys.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h misc.h sys.o: localefilter.h ../core/locale.h ../core/confparser.h @@ -181,12 +220,16 @@ sys.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h sys.o: indexpatterns.h ../core/locale.h ../core/config.h ../core/htmlfilter.h sys.o: ../core/request.h ../core/requesttypes.h ../core/session.h sys.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h -sys.o: ../core/plugindata.h ../core/rebus.h ../core/config.h ../core/db.h -sys.o: ../core/group.h ../core/thread.h ../core/dircontainer.h -sys.o: ../core/ugcontainer.h ../core/ticket.h ../core/system.h ../core/dirs.h -sys.o: ../core/db.h ../core/request.h ../core/mounts.h ../core/mount.h -sys.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -sys.o: ../core/groups.h ../core/loadavg.h ../core/sessionmanager.h +sys.o: ../core/plugindata.h ../core/rebus.h ../core/config.h ../db/db.h +sys.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +sys.o: ../core/textstream.h ../db/dbitemquery.h ../core/item.h +sys.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h ../core/thread.h +sys.o: ../core/error.h ../core/dircontainer.h ../core/ugcontainer.h +sys.o: ../core/ticket.h ../core/system.h ../core/dirs.h +sys.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h +sys.o: ../core/mount.h ../core/mountparser.h ../core/users.h +sys.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +sys.o: ../core/group.h ../core/loadavg.h ../core/sessionmanager.h sys.o: ../core/sessioncontainer.h ../core/system.h ../core/request.h sys.o: ../core/version.h template.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h @@ -196,11 +239,15 @@ template.o: indexpatterns.h ../core/locale.h ../core/config.h template.o: ../core/htmlfilter.h ../core/request.h ../core/requesttypes.h template.o: ../core/session.h ../core/item.h ../core/error.h ../core/log.h template.o: ../core/user.h ../core/plugindata.h ../core/rebus.h -template.o: ../core/config.h ../core/db.h ../core/group.h ../core/thread.h +template.o: ../core/config.h ../db/db.h ../db/dbbase.h ../db/dbconn.h +template.o: ../db/dbtextstream.h ../core/textstream.h ../db/dbitemquery.h +template.o: ../core/item.h ../db/dbitemcolumns.h ../core/user.h +template.o: ../core/group.h ../core/thread.h ../core/error.h template.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/ticket.h -template.o: ../core/system.h ../core/dirs.h ../core/db.h ../core/request.h -template.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h -template.o: ../core/users.h ../core/lastcontainer.h ../core/groups.h +template.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h +template.o: ../core/request.h ../core/mounts.h ../core/mount.h +template.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h +template.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h template.o: ../core/loadavg.h ../core/sessionmanager.h template.o: ../core/sessioncontainer.h ../core/system.h ../core/misc.h templates.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h @@ -210,19 +257,23 @@ templates.o: indexpatterns.h ../core/locale.h ../core/config.h templates.o: ../core/htmlfilter.h ../core/request.h ../core/requesttypes.h templates.o: ../core/session.h ../core/item.h ../core/error.h ../core/log.h templates.o: ../core/user.h ../core/plugindata.h ../core/rebus.h -templates.o: ../core/config.h ../core/db.h ../core/group.h ../core/thread.h +templates.o: ../core/config.h ../db/db.h ../db/dbbase.h ../db/dbconn.h +templates.o: ../db/dbtextstream.h ../core/textstream.h ../db/dbitemquery.h +templates.o: ../core/item.h ../db/dbitemcolumns.h ../core/user.h +templates.o: ../core/group.h ../core/thread.h ../core/error.h templates.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/ticket.h -templates.o: ../core/system.h ../core/dirs.h ../core/db.h ../core/request.h -templates.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h -templates.o: ../core/users.h ../core/lastcontainer.h ../core/groups.h +templates.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h +templates.o: ../core/request.h ../core/mounts.h ../core/mount.h +templates.o: ../core/mountparser.h ../core/users.h ../core/ugcontainer.h +templates.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h templates.o: ../core/loadavg.h ../core/sessionmanager.h templates.o: ../core/sessioncontainer.h ../core/system.h ../core/misc.h templates.o: ../core/plugin.h ../core/pluginmsg.h ../core/sessionmanager.h templates.o: ../functions/functions.h ../functions/functionbase.h -templates.o: ../core/item.h ../core/notify.h -templates.o: ../templatesnotify/templatesnotify.h ../core/mount.h -templates.o: ../templates/misc.h ../functions/functionparser.h -templates.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h +templates.o: ../core/notify.h ../templatesnotify/templatesnotify.h +templates.o: ../core/mount.h ../templates/misc.h +templates.o: ../functions/functionparser.h ../functions/adduser.h +templates.o: ../functions/cat.h ../functions/chmod.h templates.o: ../functions/privchanger.h ../functions/chown.h templates.o: ../functions/ckeditor.h ../functions/cp.h templates.o: ../functions/createthread.h ../functions/createticket.h @@ -232,8 +283,7 @@ templates.o: ../functions/last.h ../functions/login.h ../functions/logout.h templates.o: ../functions/ls.h ../functions/mkdir.h ../functions/mv.h templates.o: ../functions/node.h ../functions/priv.h ../functions/reload.h templates.o: ../functions/rm.h ../functions/run.h ../functions/subject.h -templates.o: ../functions/funthread.h ../core/thread.h -templates.o: ../functions/funticket.h ../core/ticket.h +templates.o: ../functions/funthread.h ../functions/funticket.h templates.o: ../functions/template.h ../functions/tinymce.h templates.o: ../functions/uname.h ../functions/upload.h ../functions/uptime.h templates.o: ../functions/who.h ../core/htmlfilter.h ../templates/templates.h @@ -244,16 +294,20 @@ thread.o: indexpatterns.h ../core/locale.h ../core/config.h thread.o: ../core/htmlfilter.h ../core/request.h ../core/requesttypes.h thread.o: ../core/session.h ../core/item.h ../core/error.h ../core/log.h thread.o: ../core/user.h ../core/plugindata.h ../core/rebus.h -thread.o: ../core/config.h ../core/db.h ../core/group.h ../core/thread.h -thread.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/ticket.h -thread.o: ../core/system.h ../core/dirs.h ../core/db.h ../core/request.h +thread.o: ../core/config.h ../db/db.h ../db/dbbase.h ../db/dbconn.h +thread.o: ../db/dbtextstream.h ../core/textstream.h ../db/dbitemquery.h +thread.o: ../core/item.h ../db/dbitemcolumns.h ../core/user.h ../core/group.h +thread.o: ../core/thread.h ../core/error.h ../core/dircontainer.h +thread.o: ../core/ugcontainer.h ../core/ticket.h ../core/system.h +thread.o: ../core/dirs.h ../core/dircontainer.h ../core/request.h thread.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h -thread.o: ../core/users.h ../core/lastcontainer.h ../core/groups.h -thread.o: ../core/loadavg.h ../core/sessionmanager.h -thread.o: ../core/sessioncontainer.h ../core/system.h ../core/misc.h -thread.o: ../functions/functions.h ../functions/functionbase.h ../core/item.h -thread.o: ../core/notify.h ../templatesnotify/templatesnotify.h -thread.o: ../core/mount.h ../templates/misc.h ../functions/functionparser.h +thread.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h +thread.o: ../core/groups.h ../core/group.h ../core/loadavg.h +thread.o: ../core/sessionmanager.h ../core/sessioncontainer.h +thread.o: ../core/system.h ../core/misc.h ../functions/functions.h +thread.o: ../functions/functionbase.h ../core/notify.h +thread.o: ../templatesnotify/templatesnotify.h ../core/mount.h +thread.o: ../templates/misc.h ../functions/functionparser.h thread.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h thread.o: ../functions/privchanger.h ../functions/chown.h thread.o: ../functions/ckeditor.h ../functions/cp.h @@ -264,10 +318,9 @@ thread.o: ../functions/login.h ../functions/logout.h ../functions/ls.h thread.o: ../functions/mkdir.h ../functions/mv.h ../functions/node.h thread.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h thread.o: ../functions/run.h ../functions/subject.h ../functions/funthread.h -thread.o: ../core/thread.h ../functions/funticket.h ../core/ticket.h -thread.o: ../functions/template.h ../functions/tinymce.h ../functions/uname.h -thread.o: ../functions/upload.h ../functions/uptime.h ../functions/who.h -thread.o: ../core/htmlfilter.h +thread.o: ../functions/funticket.h ../functions/template.h +thread.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h +thread.o: ../functions/uptime.h ../functions/who.h ../core/htmlfilter.h ticket.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h ticket.o: misc.h localefilter.h ../core/locale.h ../core/confparser.h ticket.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h @@ -275,16 +328,20 @@ ticket.o: indexpatterns.h ../core/locale.h ../core/config.h ticket.o: ../core/htmlfilter.h ../core/request.h ../core/requesttypes.h ticket.o: ../core/session.h ../core/item.h ../core/error.h ../core/log.h ticket.o: ../core/user.h ../core/plugindata.h ../core/rebus.h -ticket.o: ../core/config.h ../core/db.h ../core/group.h ../core/thread.h -ticket.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/ticket.h -ticket.o: ../core/system.h ../core/dirs.h ../core/db.h ../core/request.h +ticket.o: ../core/config.h ../db/db.h ../db/dbbase.h ../db/dbconn.h +ticket.o: ../db/dbtextstream.h ../core/textstream.h ../db/dbitemquery.h +ticket.o: ../core/item.h ../db/dbitemcolumns.h ../core/user.h ../core/group.h +ticket.o: ../core/thread.h ../core/error.h ../core/dircontainer.h +ticket.o: ../core/ugcontainer.h ../core/ticket.h ../core/system.h +ticket.o: ../core/dirs.h ../core/dircontainer.h ../core/request.h ticket.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h -ticket.o: ../core/users.h ../core/lastcontainer.h ../core/groups.h -ticket.o: ../core/loadavg.h ../core/sessionmanager.h -ticket.o: ../core/sessioncontainer.h ../core/system.h ../core/misc.h -ticket.o: ../functions/functions.h ../functions/functionbase.h ../core/item.h -ticket.o: ../core/notify.h ../templatesnotify/templatesnotify.h -ticket.o: ../core/mount.h ../templates/misc.h ../functions/functionparser.h +ticket.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h +ticket.o: ../core/groups.h ../core/group.h ../core/loadavg.h +ticket.o: ../core/sessionmanager.h ../core/sessioncontainer.h +ticket.o: ../core/system.h ../core/misc.h ../functions/functions.h +ticket.o: ../functions/functionbase.h ../core/notify.h +ticket.o: ../templatesnotify/templatesnotify.h ../core/mount.h +ticket.o: ../templates/misc.h ../functions/functionparser.h ticket.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h ticket.o: ../functions/privchanger.h ../functions/chown.h ticket.o: ../functions/ckeditor.h ../functions/cp.h @@ -295,10 +352,9 @@ ticket.o: ../functions/login.h ../functions/logout.h ../functions/ls.h ticket.o: ../functions/mkdir.h ../functions/mv.h ../functions/node.h ticket.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h ticket.o: ../functions/run.h ../functions/subject.h ../functions/funthread.h -ticket.o: ../core/thread.h ../functions/funticket.h ../core/ticket.h -ticket.o: ../functions/template.h ../functions/tinymce.h ../functions/uname.h -ticket.o: ../functions/upload.h ../functions/uptime.h ../functions/who.h -ticket.o: ../core/htmlfilter.h +ticket.o: ../functions/funticket.h ../functions/template.h +ticket.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h +ticket.o: ../functions/uptime.h ../functions/who.h ../core/htmlfilter.h upload.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h upload.o: misc.h localefilter.h ../core/locale.h ../core/confparser.h upload.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h @@ -306,13 +362,17 @@ upload.o: indexpatterns.h ../core/locale.h ../core/config.h upload.o: ../core/htmlfilter.h ../core/request.h ../core/requesttypes.h upload.o: ../core/session.h ../core/item.h ../core/error.h ../core/log.h upload.o: ../core/user.h ../core/plugindata.h ../core/rebus.h -upload.o: ../core/config.h ../core/db.h ../core/group.h ../core/thread.h -upload.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/ticket.h -upload.o: ../core/system.h ../core/dirs.h ../core/db.h ../core/request.h +upload.o: ../core/config.h ../db/db.h ../db/dbbase.h ../db/dbconn.h +upload.o: ../db/dbtextstream.h ../core/textstream.h ../db/dbitemquery.h +upload.o: ../core/item.h ../db/dbitemcolumns.h ../core/user.h ../core/group.h +upload.o: ../core/thread.h ../core/error.h ../core/dircontainer.h +upload.o: ../core/ugcontainer.h ../core/ticket.h ../core/system.h +upload.o: ../core/dirs.h ../core/dircontainer.h ../core/request.h upload.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h -upload.o: ../core/users.h ../core/lastcontainer.h ../core/groups.h -upload.o: ../core/loadavg.h ../core/sessionmanager.h -upload.o: ../core/sessioncontainer.h ../core/system.h ../core/request.h +upload.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h +upload.o: ../core/groups.h ../core/group.h ../core/loadavg.h +upload.o: ../core/sessionmanager.h ../core/sessioncontainer.h +upload.o: ../core/system.h ../core/request.h uptime.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h uptime.o: misc.h localefilter.h ../core/locale.h ../core/confparser.h uptime.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h @@ -320,13 +380,17 @@ uptime.o: indexpatterns.h ../core/locale.h ../core/config.h uptime.o: ../core/htmlfilter.h ../core/request.h ../core/requesttypes.h uptime.o: ../core/session.h ../core/item.h ../core/error.h ../core/log.h uptime.o: ../core/user.h ../core/plugindata.h ../core/rebus.h -uptime.o: ../core/config.h ../core/db.h ../core/group.h ../core/thread.h -uptime.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/ticket.h -uptime.o: ../core/system.h ../core/dirs.h ../core/db.h ../core/request.h +uptime.o: ../core/config.h ../db/db.h ../db/dbbase.h ../db/dbconn.h +uptime.o: ../db/dbtextstream.h ../core/textstream.h ../db/dbitemquery.h +uptime.o: ../core/item.h ../db/dbitemcolumns.h ../core/user.h ../core/group.h +uptime.o: ../core/thread.h ../core/error.h ../core/dircontainer.h +uptime.o: ../core/ugcontainer.h ../core/ticket.h ../core/system.h +uptime.o: ../core/dirs.h ../core/dircontainer.h ../core/request.h uptime.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h -uptime.o: ../core/users.h ../core/lastcontainer.h ../core/groups.h -uptime.o: ../core/loadavg.h ../core/sessionmanager.h -uptime.o: ../core/sessioncontainer.h ../core/system.h +uptime.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h +uptime.o: ../core/groups.h ../core/group.h ../core/loadavg.h +uptime.o: ../core/sessionmanager.h ../core/sessioncontainer.h +uptime.o: ../core/system.h user.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h misc.h user.o: localefilter.h ../core/locale.h ../core/confparser.h user.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h @@ -334,25 +398,33 @@ user.o: indexpatterns.h ../core/locale.h ../core/config.h user.o: ../core/htmlfilter.h ../core/request.h ../core/requesttypes.h user.o: ../core/session.h ../core/item.h ../core/error.h ../core/log.h user.o: ../core/user.h ../core/plugindata.h ../core/rebus.h ../core/config.h -user.o: ../core/db.h ../core/group.h ../core/thread.h ../core/dircontainer.h -user.o: ../core/ugcontainer.h ../core/ticket.h ../core/system.h -user.o: ../core/dirs.h ../core/db.h ../core/request.h ../core/mounts.h +user.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +user.o: ../core/textstream.h ../db/dbitemquery.h ../core/item.h +user.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h ../core/thread.h +user.o: ../core/error.h ../core/dircontainer.h ../core/ugcontainer.h +user.o: ../core/ticket.h ../core/system.h ../core/dirs.h +user.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h user.o: ../core/mount.h ../core/mountparser.h ../core/users.h -user.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h -user.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h -user.o: ../core/request.h ../core/misc.h +user.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +user.o: ../core/group.h ../core/loadavg.h ../core/sessionmanager.h +user.o: ../core/sessioncontainer.h ../core/system.h ../core/request.h +user.o: ../core/misc.h who.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h misc.h who.o: localefilter.h ../core/locale.h ../core/confparser.h who.o: ckeditorgetparser.h ../core/httpsimpleparser.h ../core/log.h who.o: indexpatterns.h ../core/locale.h ../core/config.h ../core/htmlfilter.h who.o: ../core/request.h ../core/requesttypes.h ../core/session.h who.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h -who.o: ../core/plugindata.h ../core/rebus.h ../core/config.h ../core/db.h -who.o: ../core/group.h ../core/thread.h ../core/dircontainer.h -who.o: ../core/ugcontainer.h ../core/ticket.h ../core/system.h ../core/dirs.h -who.o: ../core/db.h ../core/request.h ../core/mounts.h ../core/mount.h -who.o: ../core/mountparser.h ../core/users.h ../core/lastcontainer.h -who.o: ../core/groups.h ../core/loadavg.h ../core/sessionmanager.h +who.o: ../core/plugindata.h ../core/rebus.h ../core/config.h ../db/db.h +who.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +who.o: ../core/textstream.h ../db/dbitemquery.h ../core/item.h +who.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h ../core/thread.h +who.o: ../core/error.h ../core/dircontainer.h ../core/ugcontainer.h +who.o: ../core/ticket.h ../core/system.h ../core/dirs.h +who.o: ../core/dircontainer.h ../core/request.h ../core/mounts.h +who.o: ../core/mount.h ../core/mountparser.h ../core/users.h +who.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +who.o: ../core/group.h ../core/loadavg.h ../core/sessionmanager.h who.o: ../core/sessioncontainer.h ../core/system.h ../core/misc.h winix.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h winix.o: misc.h localefilter.h ../core/locale.h ../core/confparser.h @@ -361,13 +433,17 @@ winix.o: indexpatterns.h ../core/locale.h ../core/config.h winix.o: ../core/htmlfilter.h ../core/request.h ../core/requesttypes.h winix.o: ../core/session.h ../core/item.h ../core/error.h ../core/log.h winix.o: ../core/user.h ../core/plugindata.h ../core/rebus.h ../core/config.h -winix.o: ../core/db.h ../core/group.h ../core/thread.h ../core/dircontainer.h +winix.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h +winix.o: ../core/textstream.h ../db/dbitemquery.h ../core/item.h +winix.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h +winix.o: ../core/thread.h ../core/error.h ../core/dircontainer.h winix.o: ../core/ugcontainer.h ../core/ticket.h ../core/system.h -winix.o: ../core/dirs.h ../core/db.h ../core/request.h ../core/mounts.h -winix.o: ../core/mount.h ../core/mountparser.h ../core/users.h -winix.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h +winix.o: ../core/dirs.h ../core/dircontainer.h ../core/request.h +winix.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h +winix.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h +winix.o: ../core/groups.h ../core/group.h ../core/loadavg.h winix.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h -winix.o: ../functions/functions.h ../functions/functionbase.h ../core/item.h +winix.o: ../functions/functions.h ../functions/functionbase.h winix.o: ../core/notify.h ../templatesnotify/templatesnotify.h winix.o: ../core/mount.h ../templates/misc.h ../functions/functionparser.h winix.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h @@ -380,7 +456,6 @@ winix.o: ../functions/login.h ../functions/logout.h ../functions/ls.h winix.o: ../functions/mkdir.h ../functions/mv.h ../functions/node.h winix.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h winix.o: ../functions/run.h ../functions/subject.h ../functions/funthread.h -winix.o: ../core/thread.h ../functions/funticket.h ../core/ticket.h -winix.o: ../functions/template.h ../functions/tinymce.h ../functions/uname.h -winix.o: ../functions/upload.h ../functions/uptime.h ../functions/who.h -winix.o: ../core/htmlfilter.h +winix.o: ../functions/funticket.h ../functions/template.h +winix.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h +winix.o: ../functions/uptime.h ../functions/who.h ../core/htmlfilter.h diff --git a/templates/templates.cpp b/templates/templates.cpp index 480c66b..4b7c184 100755 --- a/templates/templates.cpp +++ b/templates/templates.cpp @@ -275,6 +275,7 @@ void Templates::CreateFunctions() ezc_functions.Insert("user_name", user_name); ezc_functions.Insert("user_logged", user_logged); ezc_functions.Insert("user_super_user", user_super_user); + ezc_functions.Insert("user_is_in_group", user_is_in_group); ezc_functions.Insert("user_can_use_html", user_can_use_html); ezc_functions.Insert("user_can_use_bbcode", user_can_use_bbcode); ezc_functions.Insert("user_can_use_raw", user_can_use_raw); diff --git a/templates/templates.h b/templates/templates.h index 616cb1c..8207a94 100755 --- a/templates/templates.h +++ b/templates/templates.h @@ -19,7 +19,7 @@ #include "indexpatterns.h" #include "core/config.h" #include "core/request.h" -#include "core/db.h" +#include "db/db.h" #include "core/system.h" #include "core/locale.h" #include "core/sessionmanager.h" @@ -238,6 +238,7 @@ namespace TemplatesFunctions void user_name(Info & i); void user_logged(Info & i); void user_super_user(Info & i); + void user_is_in_group(Info & i); void user_can_use_html(Info & i); void user_can_use_bbcode(Info & i); void user_can_use_raw(Info & i); diff --git a/templates/user.cpp b/templates/user.cpp index eb9ef6e..9154879 100755 --- a/templates/user.cpp +++ b/templates/user.cpp @@ -34,6 +34,17 @@ void user_name(Info & i) } +void user_is_in_group(Info & i) +{ + long gid = system->groups.GetGroupId(i.par); + + if( !request->session->puser || gid == -1 ) + return; + + i.res = request->session->puser->IsMemberOf(gid); +} + + void user_super_user(Info & i) { diff --git a/templatesnotify/Makefile.dep b/templatesnotify/Makefile.dep index c24a6f6..76eb028 100755 --- a/templatesnotify/Makefile.dep +++ b/templatesnotify/Makefile.dep @@ -8,11 +8,14 @@ notify.o: ../templatesnotify/templatesnotify.h ../core/request.h notify.o: ../core/requesttypes.h ../core/session.h ../core/item.h notify.o: ../core/error.h ../core/log.h ../core/user.h ../core/plugindata.h notify.o: ../core/rebus.h ../core/config.h ../core/system.h ../core/dirs.h -notify.o: ../core/dircontainer.h ../core/db.h ../core/group.h -notify.o: ../core/thread.h ../core/ugcontainer.h ../core/ticket.h -notify.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h -notify.o: ../core/users.h ../core/lastcontainer.h ../core/groups.h -notify.o: ../core/loadavg.h +notify.o: ../core/dircontainer.h ../db/db.h ../db/dbbase.h ../db/dbconn.h +notify.o: ../db/dbtextstream.h ../core/textstream.h ../db/dbitemquery.h +notify.o: ../core/item.h ../db/dbitemcolumns.h ../core/user.h ../core/group.h +notify.o: ../core/thread.h ../core/error.h ../core/dircontainer.h +notify.o: ../core/ugcontainer.h ../core/ticket.h ../core/mounts.h +notify.o: ../core/mount.h ../core/mountparser.h ../core/users.h +notify.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h +notify.o: ../core/group.h ../core/loadavg.h templatesnotify.o: templatesnotify.h ../../ezc/src/ezc.h ../core/mount.h templatesnotify.o: ../core/locale.h ../core/confparser.h ../core/config.h templatesnotify.o: ../core/htmlfilter.h ../templates/misc.h