changed: the way how plugins work

all your plugin functions can have signature either:
void my_function(PluginInfo & info); or
void my_function();
only the main Init should have:
extern "C" void Init(PluginFunction & info);

added: directory 'plugins' for plugins
added: 'stats' plugin
		  


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@624 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
Tomasz Sowa 2010-07-27 20:41:56 +00:00
parent e4683b9a05
commit 031ace3fe5
33 changed files with 1268 additions and 399 deletions

View File

@ -22,6 +22,7 @@ winix: FORCE
@cd confparser ; $(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 content/*.o templates/*.o templatesnotify/*.o confparser/*.o ../ezc/src/ezc.a -lfcgi -lpq -lz -lpthread
@cd main ; $(MAKE) -e
@ -35,6 +36,7 @@ clean:
@cd confparser ; $(MAKE) -e clean
@cd templates ; $(MAKE) -e clean
@cd templatesnotify ; $(MAKE) -e clean
@cd plugins/stats ; $(MAKE) -e clean
@cd ../ezc/src ; $(MAKE) -e clean
@cd main ; $(MAKE) -e clean
rm -f winix.so
@ -50,6 +52,7 @@ depend:
@cd confparser ; $(MAKE) -e depend
@cd templates ; $(MAKE) -e depend
@cd templatesnotify ; $(MAKE) -e depend
@cd plugins/stats ; $(MAKE) -e depend
@cd ../ezc/src ; $(MAKE) -e depend
@cd main ; $(MAKE) -e depend

View File

@ -12,7 +12,7 @@ all: $(o)
depend:
makedepend -Y. -f- *.cpp > Makefile.dep
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

View File

@ -12,7 +12,7 @@ all: $(o)
depend:
makedepend -Y. -f- *.cpp > Makefile.dep
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

View File

@ -1,8 +1,8 @@
# DO NOT DELETE
adduser.o: content.h ../core/item.h ../templates/templates.h
adduser.o: ../templates/patterncacher.h ../templates/misc.h
adduser.o: ../templates/localefilter.h ../core/locale.h
adduser.o: ../../ezc/src/ezc.h ../templates/patterncacher.h
adduser.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h
adduser.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
adduser.o: ../core/httpsimpleparser.h ../core/log.h
adduser.o: ../templates/indexpatterns.h ../core/thread.h ../core/ticket.h
@ -17,7 +17,7 @@ adduser.o: ../core/postmultiparser.h ../core/data.h ../core/dirs.h
adduser.o: ../core/users.h ../core/groups.h ../core/functions.h
adduser.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
adduser.o: ../core/loadavg.h
cat.o: content.h ../core/item.h ../templates/templates.h
cat.o: content.h ../core/item.h ../templates/templates.h ../../ezc/src/ezc.h
cat.o: ../templates/patterncacher.h ../templates/misc.h
cat.o: ../templates/localefilter.h ../core/locale.h
cat.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
@ -34,8 +34,8 @@ cat.o: ../core/dirs.h ../core/users.h ../core/groups.h ../core/functions.h
cat.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
cat.o: ../core/loadavg.h
content.o: content.h ../core/item.h ../templates/templates.h
content.o: ../templates/patterncacher.h ../templates/misc.h
content.o: ../templates/localefilter.h ../core/locale.h
content.o: ../../ezc/src/ezc.h ../templates/patterncacher.h
content.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h
content.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
content.o: ../core/httpsimpleparser.h ../core/log.h
content.o: ../templates/indexpatterns.h ../core/thread.h ../core/ticket.h
@ -51,7 +51,7 @@ content.o: ../core/dirs.h ../core/users.h ../core/groups.h
content.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h
content.o: ../core/mount.h ../core/loadavg.h ../core/misc.h ../core/plugin.h
content.o: ../core/request.h ../core/data.h ../core/pluginmsg.h
cp.o: content.h ../core/item.h ../templates/templates.h
cp.o: content.h ../core/item.h ../templates/templates.h ../../ezc/src/ezc.h
cp.o: ../templates/patterncacher.h ../templates/misc.h
cp.o: ../templates/localefilter.h ../core/locale.h ../confparser/confparser.h
cp.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
@ -67,11 +67,11 @@ cp.o: ../core/postmultiparser.h ../core/data.h ../core/dirs.h ../core/users.h
cp.o: ../core/groups.h ../core/functions.h ../core/lastcontainer.h
cp.o: ../core/mounts.h ../core/mount.h ../core/loadavg.h ../core/misc.h
createthread.o: content.h ../core/item.h ../templates/templates.h
createthread.o: ../templates/patterncacher.h ../templates/misc.h
createthread.o: ../templates/localefilter.h ../core/locale.h
createthread.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
createthread.o: ../core/httpsimpleparser.h ../core/log.h
createthread.o: ../templates/indexpatterns.h ../core/thread.h
createthread.o: ../../ezc/src/ezc.h ../templates/patterncacher.h
createthread.o: ../templates/misc.h ../templates/localefilter.h
createthread.o: ../core/locale.h ../confparser/confparser.h
createthread.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
createthread.o: ../core/log.h ../templates/indexpatterns.h ../core/thread.h
createthread.o: ../core/ticket.h ../core/db.h ../core/item.h ../core/user.h
createthread.o: ../core/group.h ../core/thread.h ../core/error.h
createthread.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h
@ -85,11 +85,11 @@ createthread.o: ../core/users.h ../core/groups.h ../core/functions.h
createthread.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
createthread.o: ../core/loadavg.h
createticket.o: content.h ../core/item.h ../templates/templates.h
createticket.o: ../templates/patterncacher.h ../templates/misc.h
createticket.o: ../templates/localefilter.h ../core/locale.h
createticket.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
createticket.o: ../core/httpsimpleparser.h ../core/log.h
createticket.o: ../templates/indexpatterns.h ../core/thread.h
createticket.o: ../../ezc/src/ezc.h ../templates/patterncacher.h
createticket.o: ../templates/misc.h ../templates/localefilter.h
createticket.o: ../core/locale.h ../confparser/confparser.h
createticket.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
createticket.o: ../core/log.h ../templates/indexpatterns.h ../core/thread.h
createticket.o: ../core/ticket.h ../core/db.h ../core/item.h ../core/user.h
createticket.o: ../core/group.h ../core/thread.h ../core/error.h
createticket.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h
@ -103,8 +103,8 @@ createticket.o: ../core/users.h ../core/groups.h ../core/functions.h
createticket.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
createticket.o: ../core/loadavg.h
default.o: content.h ../core/item.h ../templates/templates.h
default.o: ../templates/patterncacher.h ../templates/misc.h
default.o: ../templates/localefilter.h ../core/locale.h
default.o: ../../ezc/src/ezc.h ../templates/patterncacher.h
default.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h
default.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
default.o: ../core/httpsimpleparser.h ../core/log.h
default.o: ../templates/indexpatterns.h ../core/thread.h ../core/ticket.h
@ -120,8 +120,8 @@ default.o: ../core/dirs.h ../core/users.h ../core/groups.h
default.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h
default.o: ../core/mount.h ../core/loadavg.h
download.o: content.h ../core/item.h ../templates/templates.h
download.o: ../templates/patterncacher.h ../templates/misc.h
download.o: ../templates/localefilter.h ../core/locale.h
download.o: ../../ezc/src/ezc.h ../templates/patterncacher.h
download.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h
download.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
download.o: ../core/httpsimpleparser.h ../core/log.h
download.o: ../templates/indexpatterns.h ../core/thread.h ../core/ticket.h
@ -137,13 +137,13 @@ download.o: ../core/users.h ../core/groups.h ../core/functions.h
download.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
download.o: ../core/loadavg.h
editticket.o: content.h ../core/item.h ../templates/templates.h
editticket.o: ../templates/patterncacher.h ../templates/misc.h
editticket.o: ../templates/localefilter.h ../core/locale.h
editticket.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
editticket.o: ../core/httpsimpleparser.h ../core/log.h
editticket.o: ../templates/indexpatterns.h ../core/thread.h ../core/ticket.h
editticket.o: ../core/db.h ../core/item.h ../core/user.h ../core/group.h
editticket.o: ../core/thread.h ../core/error.h ../core/log.h
editticket.o: ../../ezc/src/ezc.h ../templates/patterncacher.h
editticket.o: ../templates/misc.h ../templates/localefilter.h
editticket.o: ../core/locale.h ../confparser/confparser.h
editticket.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
editticket.o: ../core/log.h ../templates/indexpatterns.h ../core/thread.h
editticket.o: ../core/ticket.h ../core/db.h ../core/item.h ../core/user.h
editticket.o: ../core/group.h ../core/thread.h ../core/error.h ../core/log.h
editticket.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/ticket.h
editticket.o: ../core/request.h ../core/requesttypes.h ../core/session.h
editticket.o: ../core/rebus.h ../core/plugindata.h ../core/function.h
@ -154,7 +154,7 @@ editticket.o: ../core/data.h ../core/dirs.h ../core/users.h ../core/groups.h
editticket.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h
editticket.o: ../core/mount.h ../core/loadavg.h
emacs.o: content.h ../core/item.h ../templates/templates.h
emacs.o: ../templates/patterncacher.h ../templates/misc.h
emacs.o: ../../ezc/src/ezc.h ../templates/patterncacher.h ../templates/misc.h
emacs.o: ../templates/localefilter.h ../core/locale.h
emacs.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
emacs.o: ../core/httpsimpleparser.h ../core/log.h
@ -172,7 +172,7 @@ emacs.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
emacs.o: ../core/loadavg.h ../core/notify.h
emacs.o: ../templatesnotify/templatesnotify.h ../core/mount.h
emacs.o: ../templates/misc.h ../core/misc.h
last.o: content.h ../core/item.h ../templates/templates.h
last.o: content.h ../core/item.h ../templates/templates.h ../../ezc/src/ezc.h
last.o: ../templates/patterncacher.h ../templates/misc.h
last.o: ../templates/localefilter.h ../core/locale.h
last.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
@ -182,7 +182,7 @@ 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
last.o: ../core/ticket.h
login.o: content.h ../core/item.h ../templates/templates.h
login.o: ../templates/patterncacher.h ../templates/misc.h
login.o: ../../ezc/src/ezc.h ../templates/patterncacher.h ../templates/misc.h
login.o: ../templates/localefilter.h ../core/locale.h
login.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
login.o: ../core/httpsimpleparser.h ../core/log.h
@ -199,8 +199,8 @@ login.o: ../core/dirs.h ../core/users.h ../core/groups.h ../core/functions.h
login.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
login.o: ../core/loadavg.h
logout.o: content.h ../core/item.h ../templates/templates.h
logout.o: ../templates/patterncacher.h ../templates/misc.h
logout.o: ../templates/localefilter.h ../core/locale.h
logout.o: ../../ezc/src/ezc.h ../templates/patterncacher.h
logout.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h
logout.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
logout.o: ../core/httpsimpleparser.h ../core/log.h
logout.o: ../templates/indexpatterns.h ../core/thread.h ../core/ticket.h
@ -215,7 +215,7 @@ logout.o: ../core/postmultiparser.h ../core/data.h ../core/dirs.h
logout.o: ../core/users.h ../core/groups.h ../core/functions.h
logout.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
logout.o: ../core/loadavg.h
ls.o: content.h ../core/item.h ../templates/templates.h
ls.o: content.h ../core/item.h ../templates/templates.h ../../ezc/src/ezc.h
ls.o: ../templates/patterncacher.h ../templates/misc.h
ls.o: ../templates/localefilter.h ../core/locale.h ../confparser/confparser.h
ls.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
@ -229,8 +229,8 @@ ls.o: ../core/compress.h ../core/acceptencodingparser.h
ls.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
ls.o: ../core/postmultiparser.h
misc_item.o: content.h ../core/item.h ../templates/templates.h
misc_item.o: ../templates/patterncacher.h ../templates/misc.h
misc_item.o: ../templates/localefilter.h ../core/locale.h
misc_item.o: ../../ezc/src/ezc.h ../templates/patterncacher.h
misc_item.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h
misc_item.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
misc_item.o: ../core/httpsimpleparser.h ../core/log.h
misc_item.o: ../templates/indexpatterns.h ../core/thread.h ../core/ticket.h
@ -243,9 +243,9 @@ misc_item.o: ../core/compress.h ../core/acceptencodingparser.h
misc_item.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
misc_item.o: ../core/postmultiparser.h ../core/misc.h
misc_specialfile.o: content.h ../core/item.h ../templates/templates.h
misc_specialfile.o: ../templates/patterncacher.h ../templates/misc.h
misc_specialfile.o: ../templates/localefilter.h ../core/locale.h
misc_specialfile.o: ../confparser/confparser.h
misc_specialfile.o: ../../ezc/src/ezc.h ../templates/patterncacher.h
misc_specialfile.o: ../templates/misc.h ../templates/localefilter.h
misc_specialfile.o: ../core/locale.h ../confparser/confparser.h
misc_specialfile.o: ../templates/ckeditorgetparser.h
misc_specialfile.o: ../core/httpsimpleparser.h ../core/log.h
misc_specialfile.o: ../templates/indexpatterns.h ../core/thread.h
@ -262,7 +262,7 @@ misc_specialfile.o: ../core/users.h ../core/groups.h ../core/functions.h
misc_specialfile.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
misc_specialfile.o: ../core/loadavg.h
mkdir.o: content.h ../core/item.h ../templates/templates.h
mkdir.o: ../templates/patterncacher.h ../templates/misc.h
mkdir.o: ../../ezc/src/ezc.h ../templates/patterncacher.h ../templates/misc.h
mkdir.o: ../templates/localefilter.h ../core/locale.h
mkdir.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
mkdir.o: ../core/httpsimpleparser.h ../core/log.h
@ -280,7 +280,7 @@ mkdir.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
mkdir.o: ../core/loadavg.h ../core/notify.h
mkdir.o: ../templatesnotify/templatesnotify.h ../core/mount.h
mkdir.o: ../templates/misc.h
mv.o: content.h ../core/item.h ../templates/templates.h
mv.o: content.h ../core/item.h ../templates/templates.h ../../ezc/src/ezc.h
mv.o: ../templates/patterncacher.h ../templates/misc.h
mv.o: ../templates/localefilter.h ../core/locale.h ../confparser/confparser.h
mv.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
@ -295,7 +295,7 @@ mv.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
mv.o: ../core/postmultiparser.h ../core/data.h ../core/dirs.h ../core/users.h
mv.o: ../core/groups.h ../core/functions.h ../core/lastcontainer.h
mv.o: ../core/mounts.h ../core/mount.h ../core/loadavg.h
node.o: content.h ../core/item.h ../templates/templates.h
node.o: content.h ../core/item.h ../templates/templates.h ../../ezc/src/ezc.h
node.o: ../templates/patterncacher.h ../templates/misc.h
node.o: ../templates/localefilter.h ../core/locale.h
node.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
@ -308,7 +308,7 @@ node.o: ../core/session.h ../core/rebus.h ../core/plugindata.h
node.o: ../core/function.h ../core/compress.h ../core/acceptencodingparser.h
node.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
node.o: ../core/postmultiparser.h
priv.o: content.h ../core/item.h ../templates/templates.h
priv.o: content.h ../core/item.h ../templates/templates.h ../../ezc/src/ezc.h
priv.o: ../templates/patterncacher.h ../templates/misc.h
priv.o: ../templates/localefilter.h ../core/locale.h
priv.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
@ -325,8 +325,8 @@ priv.o: ../core/dirs.h ../core/users.h ../core/groups.h ../core/functions.h
priv.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
priv.o: ../core/loadavg.h
reload.o: content.h ../core/item.h ../templates/templates.h
reload.o: ../templates/patterncacher.h ../templates/misc.h
reload.o: ../templates/localefilter.h ../core/locale.h
reload.o: ../../ezc/src/ezc.h ../templates/patterncacher.h
reload.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h
reload.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
reload.o: ../core/httpsimpleparser.h ../core/log.h
reload.o: ../templates/indexpatterns.h ../core/thread.h ../core/ticket.h
@ -340,7 +340,7 @@ reload.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
reload.o: ../core/postmultiparser.h ../core/error.h ../core/notify.h
reload.o: ../templatesnotify/templatesnotify.h ../core/mount.h
reload.o: ../templates/misc.h
rm.o: content.h ../core/item.h ../templates/templates.h
rm.o: content.h ../core/item.h ../templates/templates.h ../../ezc/src/ezc.h
rm.o: ../templates/patterncacher.h ../templates/misc.h
rm.o: ../templates/localefilter.h ../core/locale.h ../confparser/confparser.h
rm.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
@ -355,8 +355,9 @@ rm.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
rm.o: ../core/postmultiparser.h ../core/error.h ../core/data.h ../core/dirs.h
rm.o: ../core/users.h ../core/groups.h ../core/functions.h
rm.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
rm.o: ../core/loadavg.h
run.o: content.h ../core/item.h ../templates/templates.h
rm.o: ../core/loadavg.h ../core/plugin.h ../core/request.h ../core/data.h
rm.o: ../core/pluginmsg.h
run.o: content.h ../core/item.h ../templates/templates.h ../../ezc/src/ezc.h
run.o: ../templates/patterncacher.h ../templates/misc.h
run.o: ../templates/localefilter.h ../core/locale.h
run.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
@ -370,8 +371,8 @@ run.o: ../core/function.h ../core/compress.h ../core/acceptencodingparser.h
run.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
run.o: ../core/postmultiparser.h ../core/error.h
subject.o: content.h ../core/item.h ../templates/templates.h
subject.o: ../templates/patterncacher.h ../templates/misc.h
subject.o: ../templates/localefilter.h ../core/locale.h
subject.o: ../../ezc/src/ezc.h ../templates/patterncacher.h
subject.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h
subject.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
subject.o: ../core/httpsimpleparser.h ../core/log.h
subject.o: ../templates/indexpatterns.h ../core/thread.h ../core/ticket.h
@ -384,8 +385,8 @@ subject.o: ../core/compress.h ../core/acceptencodingparser.h
subject.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
subject.o: ../core/postmultiparser.h
thread.o: content.h ../core/item.h ../templates/templates.h
thread.o: ../templates/patterncacher.h ../templates/misc.h
thread.o: ../templates/localefilter.h ../core/locale.h
thread.o: ../../ezc/src/ezc.h ../templates/patterncacher.h
thread.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h
thread.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
thread.o: ../core/httpsimpleparser.h ../core/log.h
thread.o: ../templates/indexpatterns.h ../core/thread.h ../core/ticket.h
@ -401,8 +402,8 @@ thread.o: ../core/users.h ../core/groups.h ../core/functions.h
thread.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
thread.o: ../core/loadavg.h ../core/mount.h
ticket.o: content.h ../core/item.h ../templates/templates.h
ticket.o: ../templates/patterncacher.h ../templates/misc.h
ticket.o: ../templates/localefilter.h ../core/locale.h
ticket.o: ../../ezc/src/ezc.h ../templates/patterncacher.h
ticket.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h
ticket.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
ticket.o: ../core/httpsimpleparser.h ../core/log.h
ticket.o: ../templates/indexpatterns.h ../core/thread.h ../core/ticket.h
@ -418,7 +419,7 @@ ticket.o: ../core/users.h ../core/groups.h ../core/functions.h
ticket.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
ticket.o: ../core/loadavg.h ../core/mount.h
uname.o: content.h ../core/item.h ../templates/templates.h
uname.o: ../templates/patterncacher.h ../templates/misc.h
uname.o: ../../ezc/src/ezc.h ../templates/patterncacher.h ../templates/misc.h
uname.o: ../templates/localefilter.h ../core/locale.h
uname.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
uname.o: ../core/httpsimpleparser.h ../core/log.h
@ -427,8 +428,8 @@ uname.o: ../core/db.h ../core/item.h ../core/user.h ../core/group.h
uname.o: ../core/thread.h ../core/error.h ../core/log.h
uname.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/ticket.h
upload.o: content.h ../core/item.h ../templates/templates.h
upload.o: ../templates/patterncacher.h ../templates/misc.h
upload.o: ../templates/localefilter.h ../core/locale.h
upload.o: ../../ezc/src/ezc.h ../templates/patterncacher.h
upload.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h
upload.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
upload.o: ../core/httpsimpleparser.h ../core/log.h
upload.o: ../templates/indexpatterns.h ../core/thread.h ../core/ticket.h
@ -443,7 +444,7 @@ upload.o: ../core/postmultiparser.h ../core/data.h ../core/dirs.h
upload.o: ../core/users.h ../core/groups.h ../core/functions.h
upload.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
upload.o: ../core/loadavg.h ../core/misc.h
who.o: content.h ../core/item.h ../templates/templates.h
who.o: content.h ../core/item.h ../templates/templates.h ../../ezc/src/ezc.h
who.o: ../templates/patterncacher.h ../templates/misc.h
who.o: ../templates/localefilter.h ../core/locale.h
who.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h

View File

@ -344,6 +344,7 @@ void Content::Make()
plugin.Call(WINIX_CONTENT_MAKE);
MakePage();
// !! dodac parametr do konfiga wlaczajacy te informacje
//request.PrintGetTable();
//request.PrintEnv();
//request.PrintIn();

View File

@ -10,10 +10,10 @@
#include <cstdio>
#include <errno.h>
#include "content.h"
#include "../core/request.h"
#include "../core/error.h"
#include "../core/data.h"
#include "core/request.h"
#include "core/error.h"
#include "core/data.h"
#include "core/plugin.h"
bool Content::RemoveCheckAccess()
@ -65,6 +65,8 @@ void Content::RemoveAllDirs(long dir_id)
RemoveAllDirs(p->second->id);
}
plugin.Call(WINIX_DIR_PREPARE_TO_REMOVE, dir_id);
rm_auth_iq.WhereParentId(dir_id);
db.GetItems(request.item_table, rm_auth_iq);
@ -77,6 +79,8 @@ void Content::RemoveAllDirs(long dir_id)
db.RemoveThread(dir_id);
db.RemoveTicket(dir_id);
plugin.Call(WINIX_DIR_REMOVED, dir_id);
}
}
@ -167,6 +171,8 @@ void Content::RemoveFile()
log << log2 << "Content: deleted item: subject: " << request.item.subject << ", id: " << request.item.id << logend;
TemplatesFunctions::pattern_cacher.DeletePattern(request.item);
plugin.Call(WINIX_FILE_REMOVED, request.item.id);
if( data.mounts.pmount->type == Mount::thread )
db.EditThreadRemoveItem(request.item.parent_id);
else

View File

@ -12,7 +12,7 @@ all: $(o)
depend:
makedepend -Y. -f- *.cpp > Makefile.dep
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

View File

@ -57,12 +57,12 @@ mounts.o: acceptencodingparser.h acceptbaseparser.h htmlfilter.h
mounts.o: postmultiparser.h ticket.h mountparser.h db.h
notify.o: log.h notify.h ../templatesnotify/templatesnotify.h ../core/mount.h
notify.o: ../core/locale.h ../confparser/confparser.h ../templates/misc.h
notify.o: ../templates/localefilter.h data.h dirs.h item.h dircontainer.h
notify.o: users.h user.h ugcontainer.h groups.h group.h functions.h
notify.o: function.h lastcontainer.h mounts.h mount.h error.h rebus.h
notify.o: loadavg.h misc.h request.h requesttypes.h session.h plugindata.h
notify.o: thread.h compress.h acceptencodingparser.h acceptbaseparser.h
notify.o: htmlfilter.h postmultiparser.h ticket.h
notify.o: ../templates/localefilter.h ../../ezc/src/ezc.h data.h dirs.h
notify.o: item.h dircontainer.h users.h user.h ugcontainer.h groups.h group.h
notify.o: functions.h function.h lastcontainer.h mounts.h mount.h error.h
notify.o: rebus.h loadavg.h misc.h request.h requesttypes.h session.h
notify.o: plugindata.h thread.h compress.h acceptencodingparser.h
notify.o: acceptbaseparser.h htmlfilter.h postmultiparser.h ticket.h
plugin.o: plugin.h request.h requesttypes.h session.h item.h error.h log.h
plugin.o: user.h rebus.h plugindata.h function.h thread.h compress.h
plugin.o: acceptencodingparser.h acceptbaseparser.h htmlfilter.h
@ -88,8 +88,9 @@ request.o: postparser.h cookieparser.h data.h dirs.h dircontainer.h users.h
request.o: ugcontainer.h groups.h group.h functions.h lastcontainer.h
request.o: mounts.h mount.h loadavg.h plugin.h pluginmsg.h misc.h db.h
requestcontroller.o: requestcontroller.h ../content/content.h ../core/item.h
requestcontroller.o: ../templates/templates.h ../templates/patterncacher.h
requestcontroller.o: misc.h item.h ../templates/ckeditorgetparser.h
requestcontroller.o: ../templates/templates.h ../../ezc/src/ezc.h
requestcontroller.o: ../templates/patterncacher.h misc.h item.h
requestcontroller.o: ../templates/ckeditorgetparser.h
requestcontroller.o: ../core/httpsimpleparser.h ../core/log.h
requestcontroller.o: ../core/locale.h ../confparser/confparser.h
requestcontroller.o: ../templates/indexpatterns.h ../templates/localefilter.h

View File

@ -79,7 +79,6 @@ bool Config::ReadConfig(bool errors_to_stdout_)
if( status == ConfParser::ok )
{
AssignValues();
data.SetAdditionalVariables();
return true;
}
@ -151,7 +150,7 @@ void Config::AssignValues()
data.title_separator = Text("title_separator", " / ");
ListText(data.plugin_file, "plugin");
ListText(data.plugin_file, "plugins");
}

View File

@ -11,11 +11,11 @@
#define headerfilecmslucoreconfig
#include <string>
#include "../confparser/confparser.h"
class Config
{
@ -24,14 +24,6 @@ public:
bool ReadConfig(bool errors_to_stdout_);
private:
ConfParser conf_parser;
void ShowError();
void AssignValues();
std::string Text(const char * name);
std::string Text(const char * name, const char * def);
std::string Text(const std::string & name, const std::string & def);
@ -47,17 +39,27 @@ private:
void ListText(std::vector<std::string> & list, const char * name);
void ListText(std::vector<std::string> & list, const std::string & name);
void NoLastSlash(std::string & s);
void NoFirstHttp(std::string & s);
private:
ConfParser conf_parser;
void ShowError();
void AssignValues();
std::string default_str;
int default_int;
bool default_bool;
bool errors_to_stdout;
void NoLastSlash(std::string & s);
void NoFirstHttp(std::string & s);
};
extern Config config;
#endif

View File

@ -791,24 +791,27 @@ return result;
PGresult * Db::GetItemsQuery(const ItemQuery & iq)
PGresult * Db::GetItemsQuery(const ItemQuery & iq, bool skip_other_sel)
{
std::ostringstream query;
query << "select item.id";
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( !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";
}
query << " from core.item";
if( iq.sel_content ) query << " left join core.content on item.content_id = content.id";
@ -857,8 +860,6 @@ void Db::GetItems(std::vector<Item> & item_table, const ItemQuery & item_query)
item_table.clear();
PGresult * r = 0;
item_table.clear();
try
{
AssertConnection();
@ -886,6 +887,35 @@ void Db::GetItems(std::vector<Item> & item_table, const ItemQuery & item_query)
}
void Db::GetItems(std::vector<long> & item_table, const ItemQuery & item_query)
{
item_table.clear();
PGresult * r = 0;
try
{
AssertConnection();
r = GetItemsQuery(item_query, true);
AssertResultStatus(r, PGRES_TUPLES_OK);
int rows = PQntuples(r);
for(int i = 0 ; i<rows ; ++i)
{
long id = atol( AssertValue(r, i, 0) );
item_table.push_back(id);
}
}
catch(const Error &)
{
}
ClearResult(r);
}
// how many items there are in a 'parent_id' directory
long Db::Size(long parent_id, Item::Type type)
{

View File

@ -82,7 +82,7 @@ public:
bool sort_asc;
void SetAll(bool sel, bool where_)
void SetAllSel(bool sel)
{
sel_parent_id = sel;
sel_user_id = sel;
@ -96,13 +96,22 @@ public:
sel_type = sel;
sel_default_item= sel;
sel_auth = 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_; }
@ -125,8 +134,7 @@ public:
void GetItems(std::vector<Item> & item_table, const ItemQuery & item_query);
void GetItems(std::vector<long> & item_table, const ItemQuery & item_query);
// !! pobiera tylko jeden item (cos wymyslec innego z nazwa albo argumentem)
@ -213,7 +221,7 @@ protected:
void CheckAllUrlSubjectModifyItem(Item & item);
PGresult * GetItemsQuery(const ItemQuery & iq);
PGresult * GetItemsQuery(const ItemQuery & iq, bool skip_other_sel = false);
bool DelItemDelItem(const Item & item);
void DelItemDelContent(const Item & item);

View File

@ -324,6 +324,20 @@ return DateToStr(ptm);
}
const char * DateToStrWithoutHours(tm * ptm)
{
return DateToStr(ptm->tm_year + 1900, ptm->tm_mon+1, ptm->tm_mday);
}
const char * DateToStrWithoutHours(time_t t)
{
tm * ptm = std::localtime(&t);
return DateToStrWithoutHours(ptm);
}
// this format is used with cookies
const char * DateToStrCookie(int year, int month, int day, int hour, int min, int sec)

View File

@ -36,6 +36,8 @@ const char * DateToStr(int year, int month, int day);
const char * DateToStr(int year, int month, int day, int hour, int min, int sec);
const char * DateToStr(tm * ptm);
const char * DateToStr(time_t t);
const char * DateToStrWithoutHours(tm * ptm);
const char * DateToStrWithoutHours(time_t t);
const char * DateToStrCookie(int year, int month, int day, int hour, int min, int sec);
const char * DateToStrCookie(tm * ptm);

View File

@ -21,7 +21,7 @@ size_t i;
slots.clear();
for(i=0 ; i<plugins.size() ; ++i)
dlclose(plugins[i]);
dlclose(plugins[i].handle);
plugins.clear();
}
@ -54,88 +54,158 @@ void Plugin::LoadPlugin(const std::string & filename)
}
void Plugin::LoadPlugin(const char * filename)
void * Plugin::LoadInitFun(const char * filename, Fun1 & fun_init)
{
void * p = dlopen(filename, RTLD_NOW | RTLD_LOCAL);
if( !p )
{
log << log1 << "Pl: cannot load a plugin: " << filename << logend;
/*
const char * t = dlerror();
if( t )
log << log1 << t << logend;
*/
return;
log << log1 << "Plugin: cannot load a plugin: " << filename << logend;
return 0;
}
Fun fun = (Fun)dlfunc(p, "Init");
fun_init = (Fun1)dlfunc(p, "Init");
if( !fun )
if( !fun_init )
{
log << log1 << "Pl: cannot load a plugin: " << filename << " (there is no Init() function)" << logend;
log << log1 << "Plugin: cannot load a plugin: " << filename
<< " (there is no Init() function)" << logend;
dlclose(p);
return 0;
}
log << log1 << "Plugin: plugin loaded"
<< ", file: " << filename
<< ", index: " << plugins.size() << logend;
return p;
}
void Plugin::LoadPlugin(const char * filename)
{
Fun1 fun_init;
void * plugin_handle;
int old_current_plugin;
if( !(plugin_handle = LoadInitFun(filename, fun_init)) )
return;
}
arg.Clear();
int old_current_plugin = current_plugin;
info.Clear();
old_current_plugin = current_plugin;
current_plugin = (int)plugins.size();
info.plugin_id = current_plugin;
current_plugin = (int)plugins.size();
arg.plugin_id = current_plugin;
fun_init(info);
if( fun(&arg) )
{
log << log1 << "Pl: plugin loaded: " << filename << ", index: " << plugins.size() << logend;
plugins.push_back(p);
}
else
{
log << log1 << "Pl: plugin Init() returned false (" << filename << ") " << logend;
dlclose(p);
}
PluginsItem item;
item.handle = plugin_handle;
item.plugin_name = (const char *)info.p1;
plugins.push_back(item);
current_plugin = old_current_plugin;
}
void Plugin::Call(int message, Slots::iterator & slot)
{
current_plugin = slot->second.index;
info.plugin_id = current_plugin;
Arg * Plugin::Call(int message, void * a, void * a2, void * a3)
if( request.session && current_plugin != -1 )
info.plugin_data_base = request.session->plugin_data.Get(current_plugin);
else
info.plugin_data_base = 0;
if( !slot->second.is_running )
{
slot->second.is_running = true;
if( slot->second.fun1 )
slot->second.fun1(info);
if( slot->second.fun2 )
slot->second.fun2();
slot->second.is_running = false;
}
else
{
log << log1 << "Plugin: id: " << slot->second.index
<< ", message: " << message
<< ", recurrences are not allowed" << logend;
}
}
void Plugin::Call(int message, void * p1_, void * p2_, long l1_, long l2_)
{
Slots::iterator i = slots.lower_bound(message);
arg.Clear();
int old_current_plugin = current_plugin;
for( ; i!=slots.end() && i->first==message ; ++i )
{
arg.app = a;
arg.app2 = a2;
arg.app3 = a3;
current_plugin = i->second.index;
arg.plugin_id = current_plugin;
info.Clear();
info.p1 = p1_;
info.p2 = p2_;
info.l1 = l1_;
info.l2 = l2_;
if( request.session && current_plugin != -1 )
arg.plugin_data_base = request.session->plugin_data.Get(current_plugin);
else
arg.plugin_data_base = 0;
if( i->second.fun(&arg) )
arg.ret_true++;
else
arg.ret_false++;
Call(message, i);
}
current_plugin = old_current_plugin;
return &arg;
}
void Plugin::Call(int message)
{
Call(message, 0, 0, 0, 0);
}
void Plugin::Call(int message, void * p1_)
{
Call(message, p1_, 0, 0, 0);
}
void Plugin::Call(int message, void * p1_, void * p2_)
{
Call(message, p1_, p2_, 0, 0);
}
void Plugin::Call(int message, long l1_)
{
Call(message, 0, 0, l1_, 0);
}
void Plugin::Call(int message, long l1_, long l2_)
{
Call(message, 0, 0, l1_, l2_);
}
void Plugin::Call(int message, void * p1_, long l1_)
{
Call(message, p1_, 0, l1_, 0);
}
void Plugin::Call(int message, void * p1_, long l1_, long l2_)
{
Call(message, p1_, 0, l1_, l2_);
}
void Plugin::Call(int message, void * p1_, void * p2_, long l1_)
{
Call(message, p1_, p2_, l1_, 0);
}
size_t Plugin::Size()
{
return plugins.size();
@ -143,14 +213,26 @@ size_t Plugin::Size()
void Plugin::Assign(int message, Fun fun)
void Plugin::Assign(int message, Fun1 fun1)
{
Slot s;
Slot s;
s.fun = fun;
s.fun1 = fun1;
s.index = current_plugin;
slots.insert( std::make_pair(message, s) );
log << log3 << "Plugin: added function for message: " << message << ", plugin index: " << s.index << logend;
}
void Plugin::Assign(int message, Fun2 fun2)
{
Slot s;
s.fun2 = fun2;
s.index = current_plugin;
slots.insert( std::make_pair(message, s) );
log << log3 << "Plugin: added function for message: " << message << ", plugin index: " << s.index << logend;
}

View File

@ -21,30 +21,56 @@
#include "plugindata.h"
// plugin arguments
struct Arg
/*
all your plugin functions can have signature either:
void my_function(PluginInfo & info); or
void my_function();
only the main Init should have:
extern "C" void Init(PluginFunction & info);
in the Init you can add your own functions by using plugin.Assign() method
and you can set the name of the plugin by setting info.p1 pointer
to a string buffer (const char *)
(this buffer will not be copied so it should not be destroyed after Init finishes)
*/
struct PluginInfo
{
void * app; // used for some purposes
void * app2; // used for some purposes
void * app3; // used for some purposes
// these variables are used for some purposes
// depending on a hook in which they are used
void * p1;
void * p2;
long l1;
long l2;
// unique plugin identifier
int plugin_id;
int plugin_id; // unique plugin identifier
// pointer to the plugin session (can be null if not set by the plugin)
// you should use WINIX_SESSION_CREATED and WINIX_SESSION_REMOVE
// to create your plugin's session data
PluginDataBase * plugin_data_base;
PluginDataBase * plugin_data_base; // pointer to the plugin session
int ret_true; // how many plugins returned true
int ret_false; // how many plugins returned false
// function return status
// default: false (if not set by the plugin)
bool ret;
void Clear()
{
app = 0;
app2 = 0;
app3 = 0;
ret_true = 0;
ret_false = 0;
p1 = 0;
p2 = 0;
l1 = 0;
l2 = 0;
plugin_id = -1;
plugin_data_base = 0;
ret = false;
}
};
@ -58,46 +84,73 @@ public:
// normally: -1
int current_plugin;
// Fun is a type of a function you should provide in your plugin
typedef void (*Fun1)(PluginInfo &);
typedef void (*Fun2)(void);
// !! zmienic sygnature funkcji (niech nie zwraca zadnej wartosci, bo to tylko wkurwia)
// albo dodac jeszcze inna sygnature (niech nie pobiera zadnego argumentu)
typedef bool (*Fun)(Arg *);
//typedef void (*Fun2)();
struct Slot
{
Fun fun;
// Fun2 fun2; // dla drugiej sygnatury
int index; // plugin index
Fun1 fun1;
Fun2 fun2;
int index; // plugin index (which plugin has inserted the slot)
bool is_running;
Slot()
{
fun1 = 0;
fun2 = 0;
index = -1;
is_running = false;
}
};
Plugin();
~Plugin();
void LoadPlugin(const char * filename);
void LoadPlugin(const std::string & filename);
void LoadPlugins(const std::vector<std::string> & plugins);
void UnloadPlugins();
Arg * Call(int message, void * a=0, void * a2=0, void * a3=0);
void Call(int message);
void Call(int message, void * p1_);
void Call(int message, void * p1_, void * p2_);
void Call(int message, long l1_);
void Call(int message, long l1_, long l2_);
void Call(int message, void * p1_, long l1_);
void Call(int message, void * p1_, long l1_, long l2_);
void Call(int message, void * p1_, void * p2_, long l1_);
void Call(int message, void * p1_, void * p2_, long l1_, long l2_);
// how many plugins there are
size_t Size();
void Assign(int message, Fun);
// assign a function to a message
// you can assign more than one function to a specific message
void Assign(int message, Fun1);
void Assign(int message, Fun2);
private:
typedef std::vector<void*> Plugins;
struct PluginsItem
{
void * handle;
const char * plugin_name; // plugin name (can be null if was not set by the plugin)
};
typedef std::vector<PluginsItem> Plugins;
Plugins plugins;
typedef std::multimap<int, Slot> Slots;
Slots slots;
Arg arg;
PluginInfo info;
void * LoadInitFun(const char * filename, Fun1 & fun_init);
void Call(int message, Slots::iterator & slot);
};

View File

@ -11,8 +11,10 @@
#ifndef headerfilecmslupluginmsg
#define headerfilecmslupluginmsg
// here you can add your own EZC functions ([function])
// PluginInfo.p1 is a pointer to Ezc::Functions object
#define WINIX_TEMPLATES_CREATEFUNCTIONS 999
#define WINIX_REQUEST_CLEAR 1000
#define WINIX_CONTENT_MAKE 2000
@ -28,11 +30,23 @@
// when a session is changed (you can save a pointer to your data here)
#define WINIX_SESSION_CHANGED 3002
// all plugins have been started, now you can init
#define WINIX_PLUGIN_INIT 3003
// the winix is closing
#define WINIX_CLOSE 3004
// item was removed (rm function)
// PluginInfo::l1 is the file (item) id
#define WINIX_FILE_REMOVED 3005
// directory was removed (rm function)
// PluginInfo::l1 is the dir id
#define WINIX_DIR_REMOVED 3006
// preparing to remove a directory (rm function)
// PluginInfo::l1 is the dir id
#define WINIX_DIR_PREPARE_TO_REMOVE 3007

View File

@ -12,7 +12,7 @@ all: $(o)
depend:
makedepend -Y. -f- *.cpp > Makefile.dep
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

View File

@ -1,8 +1,9 @@
# DO NOT DELETE
main.o: ../core/requestcontroller.h ../content/content.h ../core/item.h
main.o: ../templates/templates.h ../templates/patterncacher.h
main.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h
main.o: ../templates/templates.h ../../ezc/src/ezc.h
main.o: ../templates/patterncacher.h ../templates/misc.h
main.o: ../templates/localefilter.h ../core/locale.h
main.o: ../confparser/confparser.h ../templates/ckeditorgetparser.h
main.o: ../core/httpsimpleparser.h ../core/log.h ../templates/indexpatterns.h
main.o: ../core/thread.h ../core/ticket.h ../core/db.h ../core/item.h

View File

@ -38,6 +38,8 @@ Plugin plugin;
void signal_term(int)
{
plugin.Call(WINIX_CLOSE);
req_controller.SaveSessions();
req_controller.DeleteAllPluginsData();
log << log1 << "cmslu stopped" << logend << logsave;
@ -103,6 +105,7 @@ int main(int argv, char ** argc)
// load plugins before loading sessions - req_controller.LoadSessions()
plugin.LoadPlugins(data.plugin_file);
plugin.Call(WINIX_PLUGIN_INIT);
request.Init();

27
plugins/stats/Makefile Executable file
View File

@ -0,0 +1,27 @@
include Makefile.o.dep
name = stats.so
all: $(o)
$(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.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
rm -f $(name)
include Makefile.dep

18
plugins/stats/Makefile.dep Executable file
View File

@ -0,0 +1,18 @@
# DO NOT DELETE
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/rebus.h
init.o: ../../core/plugindata.h ../../core/function.h ../../core/thread.h
init.o: ../../core/compress.h ../../core/acceptencodingparser.h
init.o: ../../core/acceptbaseparser.h ../../core/htmlfilter.h
init.o: ../../core/postmultiparser.h ../../core/ticket.h ../../core/config.h
init.o: ../../confparser/confparser.h ../../core/db.h ../../core/group.h
init.o: ../../core/dircontainer.h ../../core/ugcontainer.h stats.h
init.o: templates.h ../../core/plugin.h ../../core/request.h data.h
init.o: ../../core/plugindata.h ../../core/pluginmsg.h
stats.o: stats.h data.h ../../core/plugindata.h ../../core/log.h
templates.o: templates.h ../../core/plugin.h ../../core/request.h data.h
templates.o: stats.h ../../core/plugindata.h ../../core/pluginmsg.h
templates.o: ../../core/log.h ../../core/plugindata.h ../../../ezc/src/ezc.h
templates.o: ../../core/misc.h ../../core/item.h

1
plugins/stats/Makefile.o.dep Executable file
View File

@ -0,0 +1 @@
o = init.o stats.o templates.o