added: plugin mechanism
files: core/plugin.h core/plugin.cpp core/pluginmsg.h added: directory 'main' with main.cpp (moved from 'core' directory) changed: the way of building nearly everything is in cmslu.so only main() is in cmslu and is dynamically linked with cmslu.so git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@516 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
7db71d43e0
commit
378cfc0c3d
28
Makefile
28
Makefile
|
@ -1,25 +1,27 @@
|
||||||
# Makefile for GNU make
|
# Makefile for GNU make
|
||||||
|
|
||||||
ifndef CXX
|
|
||||||
CXX = g++
|
CXX = g++
|
||||||
|
CXXFLAGS = -fPIC -Wall -pedantic -O2 -I/usr/local/include -I/home/tomek/roboczy/ezc/src -L/usr/local/lib
|
||||||
|
CXXFLAGSMAIN = -Wall -pedantic -O2 -I/usr/local/include -I/home/tomek/roboczy/ezc/src -L/usr/local/lib
|
||||||
|
|
||||||
export CXX
|
export CXX
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef CXXFLAGS
|
|
||||||
CXXFLAGS = -Wall -pedantic -g -I/usr/local/include -L/usr/local/lib
|
|
||||||
export CXXFLAGS
|
export CXXFLAGS
|
||||||
endif
|
export CXXFLAGSMAIN
|
||||||
|
|
||||||
|
|
||||||
all: cmslu.a
|
all: cmslu
|
||||||
|
|
||||||
cmslu.a: FORCE
|
cmslu: FORCE
|
||||||
@cd core ; $(MAKE) -e
|
@cd core ; $(MAKE) -e
|
||||||
@cd content ; $(MAKE) -e
|
@cd content ; $(MAKE) -e
|
||||||
@cd confparser ; $(MAKE) -e
|
@cd confparser ; $(MAKE) -e
|
||||||
@cd templates ; $(MAKE) -e
|
@cd templates ; $(MAKE) -e
|
||||||
@cd templatesnotify ; $(MAKE) -e
|
@cd templatesnotify ; $(MAKE) -e
|
||||||
ar rcs cmslu.a core/*.o content/*.o templates/*.o templatesnotify/*.o confparser/*.o
|
@cd ../ezc/src ; $(MAKE) -e
|
||||||
|
$(CXX) -shared -o cmslu.so $(CXXFLAGS) core/*.o content/*.o templates/*.o templatesnotify/*.o confparser/*.o ../ezc/src/ezc.a -lfcgi -lpq -lz
|
||||||
|
@cd main ; $(MAKE) -e
|
||||||
|
# use ./ with cmslu.so
|
||||||
|
$(CXX) -o cmslu $(CXXFLAGSMAIN) main/*.o ./cmslu.so
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@ -28,7 +30,10 @@ clean:
|
||||||
@cd confparser ; $(MAKE) -e clean
|
@cd confparser ; $(MAKE) -e clean
|
||||||
@cd templates ; $(MAKE) -e clean
|
@cd templates ; $(MAKE) -e clean
|
||||||
@cd templatesnotify ; $(MAKE) -e clean
|
@cd templatesnotify ; $(MAKE) -e clean
|
||||||
rm -f cmslu.a
|
@cd ../ezc/src ; $(MAKE) -e clean
|
||||||
|
@cd main ; $(MAKE) -e clean
|
||||||
|
rm -f cmslu.so
|
||||||
|
rm -f cmslu
|
||||||
|
|
||||||
|
|
||||||
FORCE:
|
FORCE:
|
||||||
|
@ -40,3 +45,6 @@ depend:
|
||||||
@cd confparser ; $(MAKE) -e depend
|
@cd confparser ; $(MAKE) -e depend
|
||||||
@cd templates ; $(MAKE) -e depend
|
@cd templates ; $(MAKE) -e depend
|
||||||
@cd templatesnotify ; $(MAKE) -e depend
|
@cd templatesnotify ; $(MAKE) -e depend
|
||||||
|
@cd ../ezc/src ; $(MAKE) -e depend
|
||||||
|
@cd main ; $(MAKE) -e depend
|
||||||
|
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
/*
|
|
||||||
* This file is a part of CMSLU -- Content Management System like Unix
|
|
||||||
* and is not publicly distributed
|
|
||||||
*
|
|
||||||
* Copyright (c) 2008-2009, Tomasz Sowa
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef headerfileapptemplates
|
|
||||||
#define headerfileapptemplates
|
|
||||||
|
|
||||||
|
|
||||||
#include "../../ezc/src/ezc.h"
|
|
||||||
|
|
||||||
|
|
||||||
namespace AppTemplateFunctions
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
//void CreateAppFunctions(Ezc::Functions & functions);
|
|
||||||
|
|
||||||
void ReadAppPatterns();
|
|
||||||
|
|
||||||
void CreateAppFunctions(Ezc::Functions & functions);
|
|
||||||
Ezc::Pattern * GetAppPattern();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -12,7 +12,7 @@ all: $(o)
|
||||||
|
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
makedepend $(DEPMACROS) -Y. -f- *.cpp > Makefile.dep
|
makedepend -Y. -f- *.cpp > Makefile.dep
|
||||||
echo -n "o = " > Makefile.o.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
|
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ all: $(o)
|
||||||
|
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
makedepend $(DEPMACROS) -Y. -f- *.cpp > Makefile.dep
|
makedepend -Y. -f- *.cpp > Makefile.dep
|
||||||
echo -n "o = " > Makefile.o.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
|
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,13 @@
|
||||||
# DO NOT DELETE
|
# DO NOT DELETE
|
||||||
|
|
||||||
cat.o: content.h ../core/item.h ../templates/templates.h ../../ezc/src/ezc.h
|
cat.o: content.h ../core/item.h ../templates/templates.h
|
||||||
cat.o: ../templates/patterncacher.h ../app/templates.h ../core/thread.h
|
cat.o: ../templates/patterncacher.h ../core/thread.h ../core/request.h
|
||||||
cat.o: ../core/request.h ../core/requesttypes.h ../core/session.h
|
cat.o: ../core/requesttypes.h ../core/session.h ../core/done.h ../core/item.h
|
||||||
cat.o: ../core/done.h ../core/item.h ../core/error.h ../core/log.h
|
cat.o: ../core/error.h ../core/log.h ../core/user.h ../core/function.h
|
||||||
cat.o: ../core/user.h ../core/function.h ../core/thread.h ../core/compress.h
|
cat.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h
|
||||||
cat.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
cat.o: ../core/acceptbaseparser.h ../core/error.h
|
||||||
cat.o: ../core/error.h
|
|
||||||
content.o: content.h ../core/item.h ../templates/templates.h
|
content.o: content.h ../core/item.h ../templates/templates.h
|
||||||
content.o: ../../ezc/src/ezc.h ../templates/patterncacher.h
|
content.o: ../templates/patterncacher.h ../core/thread.h ../core/request.h
|
||||||
content.o: ../app/templates.h ../core/thread.h ../core/request.h
|
|
||||||
content.o: ../core/requesttypes.h ../core/session.h ../core/done.h
|
content.o: ../core/requesttypes.h ../core/session.h ../core/done.h
|
||||||
content.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h
|
content.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h
|
||||||
content.o: ../core/function.h ../core/thread.h ../core/compress.h
|
content.o: ../core/function.h ../core/thread.h ../core/compress.h
|
||||||
|
@ -18,22 +16,20 @@ content.o: ../core/error.h ../core/db.h ../core/group.h
|
||||||
content.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/data.h
|
content.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/data.h
|
||||||
content.o: ../core/dirs.h ../core/users.h ../core/groups.h
|
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/functions.h ../core/lastcontainer.h ../core/mounts.h
|
||||||
content.o: ../core/mount.h ../app/content.h ../core/misc.h
|
content.o: ../core/mount.h ../core/misc.h
|
||||||
createthread.o: content.h ../core/item.h ../templates/templates.h
|
createthread.o: content.h ../core/item.h ../templates/templates.h
|
||||||
createthread.o: ../../ezc/src/ezc.h ../templates/patterncacher.h
|
createthread.o: ../templates/patterncacher.h ../core/thread.h
|
||||||
createthread.o: ../app/templates.h ../core/thread.h ../core/request.h
|
createthread.o: ../core/request.h ../core/requesttypes.h ../core/session.h
|
||||||
createthread.o: ../core/requesttypes.h ../core/session.h ../core/done.h
|
createthread.o: ../core/done.h ../core/item.h ../core/error.h ../core/log.h
|
||||||
createthread.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h
|
createthread.o: ../core/user.h ../core/function.h ../core/thread.h
|
||||||
createthread.o: ../core/function.h ../core/thread.h ../core/compress.h
|
createthread.o: ../core/compress.h ../core/acceptencodingparser.h
|
||||||
createthread.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
createthread.o: ../core/acceptbaseparser.h ../core/error.h ../core/db.h
|
||||||
createthread.o: ../core/error.h ../core/db.h ../core/group.h
|
createthread.o: ../core/group.h ../core/dircontainer.h ../core/ugcontainer.h
|
||||||
createthread.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/mount.h
|
createthread.o: ../core/mount.h ../core/data.h ../core/dirs.h ../core/users.h
|
||||||
createthread.o: ../core/data.h ../core/dirs.h ../core/users.h
|
|
||||||
createthread.o: ../core/groups.h ../core/functions.h ../core/lastcontainer.h
|
createthread.o: ../core/groups.h ../core/functions.h ../core/lastcontainer.h
|
||||||
createthread.o: ../core/mounts.h ../core/mount.h
|
createthread.o: ../core/mounts.h ../core/mount.h
|
||||||
default.o: content.h ../core/item.h ../templates/templates.h
|
default.o: content.h ../core/item.h ../templates/templates.h
|
||||||
default.o: ../../ezc/src/ezc.h ../templates/patterncacher.h
|
default.o: ../templates/patterncacher.h ../core/thread.h ../core/request.h
|
||||||
default.o: ../app/templates.h ../core/thread.h ../core/request.h
|
|
||||||
default.o: ../core/requesttypes.h ../core/session.h ../core/done.h
|
default.o: ../core/requesttypes.h ../core/session.h ../core/done.h
|
||||||
default.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h
|
default.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h
|
||||||
default.o: ../core/function.h ../core/thread.h ../core/compress.h
|
default.o: ../core/function.h ../core/thread.h ../core/compress.h
|
||||||
|
@ -44,102 +40,96 @@ 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/functions.h ../core/lastcontainer.h ../core/mounts.h
|
||||||
default.o: ../core/mount.h
|
default.o: ../core/mount.h
|
||||||
emacs.o: content.h ../core/item.h ../templates/templates.h
|
emacs.o: content.h ../core/item.h ../templates/templates.h
|
||||||
emacs.o: ../../ezc/src/ezc.h ../templates/patterncacher.h ../app/templates.h
|
emacs.o: ../templates/patterncacher.h ../core/thread.h ../core/request.h
|
||||||
emacs.o: ../core/thread.h ../core/request.h ../core/requesttypes.h
|
emacs.o: ../core/requesttypes.h ../core/session.h ../core/done.h
|
||||||
emacs.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
|
emacs.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h
|
||||||
emacs.o: ../core/log.h ../core/user.h ../core/function.h ../core/thread.h
|
emacs.o: ../core/function.h ../core/thread.h ../core/compress.h
|
||||||
emacs.o: ../core/compress.h ../core/acceptencodingparser.h
|
emacs.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
||||||
emacs.o: ../core/acceptbaseparser.h ../core/error.h ../core/db.h
|
emacs.o: ../core/error.h ../core/db.h ../core/group.h ../core/dircontainer.h
|
||||||
emacs.o: ../core/group.h ../core/dircontainer.h ../core/ugcontainer.h
|
emacs.o: ../core/ugcontainer.h ../core/data.h ../core/dirs.h ../core/users.h
|
||||||
emacs.o: ../core/data.h ../core/dirs.h ../core/users.h ../core/groups.h
|
emacs.o: ../core/groups.h ../core/functions.h ../core/lastcontainer.h
|
||||||
emacs.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h
|
emacs.o: ../core/mounts.h ../core/mount.h ../core/notify.h
|
||||||
emacs.o: ../core/mount.h ../core/notify.h
|
|
||||||
emacs.o: ../templatesnotify/templatesnotify.h ../core/mount.h
|
emacs.o: ../templatesnotify/templatesnotify.h ../core/mount.h
|
||||||
last.o: content.h ../core/item.h ../templates/templates.h ../../ezc/src/ezc.h
|
last.o: content.h ../core/item.h ../templates/templates.h
|
||||||
last.o: ../templates/patterncacher.h ../app/templates.h ../core/thread.h
|
last.o: ../templates/patterncacher.h ../core/thread.h
|
||||||
login.o: content.h ../core/item.h ../templates/templates.h
|
login.o: content.h ../core/item.h ../templates/templates.h
|
||||||
login.o: ../../ezc/src/ezc.h ../templates/patterncacher.h ../app/templates.h
|
login.o: ../templates/patterncacher.h ../core/thread.h ../core/request.h
|
||||||
login.o: ../core/thread.h ../core/request.h ../core/requesttypes.h
|
login.o: ../core/requesttypes.h ../core/session.h ../core/done.h
|
||||||
login.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
|
login.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h
|
||||||
login.o: ../core/log.h ../core/user.h ../core/function.h ../core/thread.h
|
login.o: ../core/function.h ../core/thread.h ../core/compress.h
|
||||||
login.o: ../core/compress.h ../core/acceptencodingparser.h
|
login.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
||||||
login.o: ../core/acceptbaseparser.h ../core/error.h ../core/db.h
|
login.o: ../core/error.h ../core/db.h ../core/group.h ../core/dircontainer.h
|
||||||
login.o: ../core/group.h ../core/dircontainer.h ../core/ugcontainer.h
|
login.o: ../core/ugcontainer.h ../core/data.h ../core/dirs.h ../core/users.h
|
||||||
login.o: ../core/data.h ../core/dirs.h ../core/users.h ../core/groups.h
|
login.o: ../core/groups.h ../core/functions.h ../core/lastcontainer.h
|
||||||
login.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h
|
login.o: ../core/mounts.h ../core/mount.h
|
||||||
login.o: ../core/mount.h
|
|
||||||
logout.o: content.h ../core/item.h ../templates/templates.h
|
logout.o: content.h ../core/item.h ../templates/templates.h
|
||||||
logout.o: ../../ezc/src/ezc.h ../templates/patterncacher.h ../app/templates.h
|
logout.o: ../templates/patterncacher.h ../core/thread.h ../core/request.h
|
||||||
logout.o: ../core/thread.h ../core/request.h ../core/requesttypes.h
|
logout.o: ../core/requesttypes.h ../core/session.h ../core/done.h
|
||||||
logout.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
|
logout.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h
|
||||||
logout.o: ../core/log.h ../core/user.h ../core/function.h ../core/thread.h
|
logout.o: ../core/function.h ../core/thread.h ../core/compress.h
|
||||||
logout.o: ../core/compress.h ../core/acceptencodingparser.h
|
logout.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
||||||
logout.o: ../core/acceptbaseparser.h ../core/data.h ../core/dirs.h
|
logout.o: ../core/data.h ../core/dirs.h ../core/dircontainer.h
|
||||||
logout.o: ../core/dircontainer.h ../core/users.h ../core/ugcontainer.h
|
logout.o: ../core/users.h ../core/ugcontainer.h ../core/groups.h
|
||||||
logout.o: ../core/groups.h ../core/group.h ../core/functions.h
|
logout.o: ../core/group.h ../core/functions.h ../core/lastcontainer.h
|
||||||
logout.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
|
logout.o: ../core/mounts.h ../core/mount.h
|
||||||
ls.o: content.h ../core/item.h ../templates/templates.h ../../ezc/src/ezc.h
|
ls.o: content.h ../core/item.h ../templates/templates.h
|
||||||
ls.o: ../templates/patterncacher.h ../app/templates.h ../core/thread.h
|
ls.o: ../templates/patterncacher.h ../core/thread.h ../core/request.h
|
||||||
ls.o: ../core/request.h ../core/requesttypes.h ../core/session.h
|
ls.o: ../core/requesttypes.h ../core/session.h ../core/done.h ../core/item.h
|
||||||
ls.o: ../core/done.h ../core/item.h ../core/error.h ../core/log.h
|
ls.o: ../core/error.h ../core/log.h ../core/user.h ../core/function.h
|
||||||
ls.o: ../core/user.h ../core/function.h ../core/thread.h ../core/compress.h
|
ls.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h
|
||||||
ls.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h ../core/db.h
|
ls.o: ../core/acceptbaseparser.h ../core/db.h ../core/group.h
|
||||||
ls.o: ../core/group.h ../core/dircontainer.h ../core/ugcontainer.h
|
ls.o: ../core/dircontainer.h ../core/ugcontainer.h
|
||||||
mkdir.o: content.h ../core/item.h ../templates/templates.h
|
mkdir.o: content.h ../core/item.h ../templates/templates.h
|
||||||
mkdir.o: ../../ezc/src/ezc.h ../templates/patterncacher.h ../app/templates.h
|
mkdir.o: ../templates/patterncacher.h ../core/thread.h ../core/request.h
|
||||||
mkdir.o: ../core/thread.h ../core/request.h ../core/requesttypes.h
|
mkdir.o: ../core/requesttypes.h ../core/session.h ../core/done.h
|
||||||
mkdir.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
|
mkdir.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h
|
||||||
mkdir.o: ../core/log.h ../core/user.h ../core/function.h ../core/thread.h
|
mkdir.o: ../core/function.h ../core/thread.h ../core/compress.h
|
||||||
mkdir.o: ../core/compress.h ../core/acceptencodingparser.h
|
mkdir.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
||||||
mkdir.o: ../core/acceptbaseparser.h ../core/error.h ../core/db.h
|
mkdir.o: ../core/error.h ../core/db.h ../core/group.h ../core/dircontainer.h
|
||||||
mkdir.o: ../core/group.h ../core/dircontainer.h ../core/ugcontainer.h
|
mkdir.o: ../core/ugcontainer.h ../core/data.h ../core/dirs.h ../core/users.h
|
||||||
mkdir.o: ../core/data.h ../core/dirs.h ../core/users.h ../core/groups.h
|
mkdir.o: ../core/groups.h ../core/functions.h ../core/lastcontainer.h
|
||||||
mkdir.o: ../core/functions.h ../core/lastcontainer.h ../core/mounts.h
|
mkdir.o: ../core/mounts.h ../core/mount.h ../core/notify.h
|
||||||
mkdir.o: ../core/mount.h ../core/notify.h
|
|
||||||
mkdir.o: ../templatesnotify/templatesnotify.h ../core/mount.h
|
mkdir.o: ../templatesnotify/templatesnotify.h ../core/mount.h
|
||||||
node.o: content.h ../core/item.h ../templates/templates.h ../../ezc/src/ezc.h
|
node.o: content.h ../core/item.h ../templates/templates.h
|
||||||
node.o: ../templates/patterncacher.h ../app/templates.h ../core/thread.h
|
node.o: ../templates/patterncacher.h ../core/thread.h ../core/request.h
|
||||||
node.o: ../core/request.h ../core/requesttypes.h ../core/session.h
|
node.o: ../core/requesttypes.h ../core/session.h ../core/done.h
|
||||||
node.o: ../core/done.h ../core/item.h ../core/error.h ../core/log.h
|
node.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h
|
||||||
node.o: ../core/user.h ../core/function.h ../core/thread.h ../core/compress.h
|
node.o: ../core/function.h ../core/thread.h ../core/compress.h
|
||||||
node.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
node.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
||||||
priv.o: content.h ../core/item.h ../templates/templates.h ../../ezc/src/ezc.h
|
priv.o: content.h ../core/item.h ../templates/templates.h
|
||||||
priv.o: ../templates/patterncacher.h ../app/templates.h ../core/thread.h
|
priv.o: ../templates/patterncacher.h ../core/thread.h ../core/request.h
|
||||||
priv.o: ../core/request.h ../core/requesttypes.h ../core/session.h
|
priv.o: ../core/requesttypes.h ../core/session.h ../core/done.h
|
||||||
priv.o: ../core/done.h ../core/item.h ../core/error.h ../core/log.h
|
priv.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h
|
||||||
priv.o: ../core/user.h ../core/function.h ../core/thread.h ../core/compress.h
|
priv.o: ../core/function.h ../core/thread.h ../core/compress.h
|
||||||
priv.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
priv.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
||||||
priv.o: ../core/error.h ../core/db.h ../core/group.h ../core/dircontainer.h
|
priv.o: ../core/error.h ../core/db.h ../core/group.h ../core/dircontainer.h
|
||||||
priv.o: ../core/ugcontainer.h ../core/data.h ../core/dirs.h ../core/users.h
|
priv.o: ../core/ugcontainer.h ../core/data.h ../core/dirs.h ../core/users.h
|
||||||
priv.o: ../core/groups.h ../core/functions.h ../core/lastcontainer.h
|
priv.o: ../core/groups.h ../core/functions.h ../core/lastcontainer.h
|
||||||
priv.o: ../core/mounts.h ../core/mount.h
|
priv.o: ../core/mounts.h ../core/mount.h
|
||||||
rm.o: content.h ../core/item.h ../templates/templates.h ../../ezc/src/ezc.h
|
rm.o: content.h ../core/item.h ../templates/templates.h
|
||||||
rm.o: ../templates/patterncacher.h ../app/templates.h ../core/thread.h
|
rm.o: ../templates/patterncacher.h ../core/thread.h ../core/request.h
|
||||||
rm.o: ../core/request.h ../core/requesttypes.h ../core/session.h
|
rm.o: ../core/requesttypes.h ../core/session.h ../core/done.h ../core/item.h
|
||||||
rm.o: ../core/done.h ../core/item.h ../core/error.h ../core/log.h
|
rm.o: ../core/error.h ../core/log.h ../core/user.h ../core/function.h
|
||||||
rm.o: ../core/user.h ../core/function.h ../core/thread.h ../core/compress.h
|
rm.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h
|
||||||
rm.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
rm.o: ../core/acceptbaseparser.h ../core/error.h ../core/db.h ../core/group.h
|
||||||
rm.o: ../core/error.h ../core/db.h ../core/group.h ../core/dircontainer.h
|
rm.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/data.h
|
||||||
rm.o: ../core/ugcontainer.h ../core/data.h ../core/dirs.h ../core/users.h
|
rm.o: ../core/dirs.h ../core/users.h ../core/groups.h ../core/functions.h
|
||||||
rm.o: ../core/groups.h ../core/functions.h ../core/lastcontainer.h
|
rm.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
|
||||||
rm.o: ../core/mounts.h ../core/mount.h
|
run.o: content.h ../core/item.h ../templates/templates.h
|
||||||
run.o: content.h ../core/item.h ../templates/templates.h ../../ezc/src/ezc.h
|
run.o: ../templates/patterncacher.h ../core/thread.h ../core/request.h
|
||||||
run.o: ../templates/patterncacher.h ../app/templates.h ../core/thread.h
|
run.o: ../core/requesttypes.h ../core/session.h ../core/done.h ../core/item.h
|
||||||
run.o: ../core/request.h ../core/requesttypes.h ../core/session.h
|
run.o: ../core/error.h ../core/log.h ../core/user.h ../core/function.h
|
||||||
run.o: ../core/done.h ../core/item.h ../core/error.h ../core/log.h
|
run.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h
|
||||||
run.o: ../core/user.h ../core/function.h ../core/thread.h ../core/compress.h
|
run.o: ../core/acceptbaseparser.h ../core/error.h
|
||||||
run.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
|
||||||
run.o: ../core/error.h
|
|
||||||
thread.o: content.h ../core/item.h ../templates/templates.h
|
thread.o: content.h ../core/item.h ../templates/templates.h
|
||||||
thread.o: ../../ezc/src/ezc.h ../templates/patterncacher.h ../app/templates.h
|
thread.o: ../templates/patterncacher.h ../core/thread.h ../core/request.h
|
||||||
thread.o: ../core/thread.h ../core/request.h ../core/requesttypes.h
|
thread.o: ../core/requesttypes.h ../core/session.h ../core/done.h
|
||||||
thread.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
|
thread.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h
|
||||||
thread.o: ../core/log.h ../core/user.h ../core/function.h ../core/thread.h
|
thread.o: ../core/function.h ../core/thread.h ../core/compress.h
|
||||||
thread.o: ../core/compress.h ../core/acceptencodingparser.h
|
thread.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
||||||
thread.o: ../core/acceptbaseparser.h ../core/db.h ../core/group.h
|
thread.o: ../core/db.h ../core/group.h ../core/dircontainer.h
|
||||||
thread.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/data.h
|
thread.o: ../core/ugcontainer.h ../core/data.h ../core/dirs.h ../core/users.h
|
||||||
thread.o: ../core/dirs.h ../core/users.h ../core/groups.h ../core/functions.h
|
thread.o: ../core/groups.h ../core/functions.h ../core/lastcontainer.h
|
||||||
thread.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
|
thread.o: ../core/mounts.h ../core/mount.h ../core/mount.h
|
||||||
thread.o: ../core/mount.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 ../core/thread.h
|
||||||
who.o: ../templates/patterncacher.h ../app/templates.h ../core/thread.h
|
|
||||||
|
|
|
@ -12,8 +12,9 @@
|
||||||
#include "../core/error.h"
|
#include "../core/error.h"
|
||||||
#include "../core/db.h"
|
#include "../core/db.h"
|
||||||
#include "../core/data.h"
|
#include "../core/data.h"
|
||||||
#include "../app/content.h"
|
|
||||||
#include "../core/misc.h"
|
#include "../core/misc.h"
|
||||||
|
#include "../core/plugin.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool Content::Init()
|
bool Content::Init()
|
||||||
|
@ -231,9 +232,6 @@ void Content::Make()
|
||||||
{
|
{
|
||||||
if( DirsHaveReadExecPerm() )
|
if( DirsHaveReadExecPerm() )
|
||||||
{
|
{
|
||||||
#ifdef APPPREPARE
|
|
||||||
AppContent::PrepareApp();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if( request.method == Request::post )
|
if( request.method == Request::post )
|
||||||
MakePost();
|
MakePost();
|
||||||
|
@ -251,16 +249,15 @@ void Content::Make()
|
||||||
if( request.result == Request::redirect )
|
if( request.result == Request::redirect )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
if( request.dir_table.empty() )
|
if( request.dir_table.empty() )
|
||||||
{
|
{
|
||||||
log << log1 << "Content: there is no a root dir (dir_table is empty -- after calling some standard functions)" << logend;
|
log << log1 << "Content: there is no a root dir (dir_table is empty -- after calling some standard functions)" << logend;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plugin.Call(CMSLU_CONTENT_MAKE);
|
||||||
templates.Generate();
|
templates.Generate();
|
||||||
|
|
||||||
|
|
||||||
//request.PrintGetTable();
|
//request.PrintGetTable();
|
||||||
//request.PrintEnv();
|
//request.PrintEnv();
|
||||||
//request.PrintIn();
|
//request.PrintIn();
|
||||||
|
|
|
@ -12,7 +12,7 @@ all: $(o)
|
||||||
|
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
makedepend $(DEPMACROS) -Y. -f- *.cpp > Makefile.dep
|
makedepend -Y. -f- *.cpp > Makefile.dep
|
||||||
echo -n "o = " > Makefile.o.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
|
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,9 @@ acceptbaseparser.o: acceptbaseparser.h
|
||||||
compress.o: compress.h log.h
|
compress.o: compress.h log.h
|
||||||
config.o: config.h ../confparser/confparser.h log.h data.h dirs.h item.h
|
config.o: config.h ../confparser/confparser.h log.h data.h dirs.h item.h
|
||||||
config.o: dircontainer.h users.h user.h ugcontainer.h groups.h group.h
|
config.o: dircontainer.h users.h user.h ugcontainer.h groups.h group.h
|
||||||
config.o: functions.h function.h lastcontainer.h mounts.h mount.h
|
config.o: functions.h function.h lastcontainer.h mounts.h mount.h plugin.h
|
||||||
|
config.o: request.h requesttypes.h session.h done.h error.h thread.h
|
||||||
|
config.o: compress.h acceptencodingparser.h acceptbaseparser.h pluginmsg.h
|
||||||
data.o: data.h dirs.h item.h dircontainer.h users.h user.h ugcontainer.h
|
data.o: data.h dirs.h item.h dircontainer.h users.h user.h ugcontainer.h
|
||||||
data.o: log.h groups.h group.h functions.h function.h lastcontainer.h
|
data.o: log.h groups.h group.h functions.h function.h lastcontainer.h
|
||||||
data.o: mounts.h mount.h
|
data.o: mounts.h mount.h
|
||||||
|
@ -20,28 +22,17 @@ done.o: done.h
|
||||||
error.o: error.h log.h
|
error.o: error.h log.h
|
||||||
function.o: function.h item.h
|
function.o: function.h item.h
|
||||||
functioncodeparser.o: functioncodeparser.h item.h function.h log.h
|
functioncodeparser.o: functioncodeparser.h item.h function.h log.h
|
||||||
functionparser.o: functionparser.h requesttypes.h ../app/content.h log.h
|
functionparser.o: functionparser.h requesttypes.h log.h item.h error.h data.h
|
||||||
functionparser.o: item.h error.h data.h dirs.h dircontainer.h users.h user.h
|
functionparser.o: dirs.h dircontainer.h users.h user.h ugcontainer.h groups.h
|
||||||
functionparser.o: ugcontainer.h groups.h group.h functions.h function.h
|
functionparser.o: group.h functions.h function.h lastcontainer.h mounts.h
|
||||||
functionparser.o: lastcontainer.h mounts.h mount.h db.h thread.h request.h
|
functionparser.o: mount.h db.h thread.h request.h session.h done.h compress.h
|
||||||
functionparser.o: session.h done.h compress.h acceptencodingparser.h
|
functionparser.o: acceptencodingparser.h acceptbaseparser.h
|
||||||
functionparser.o: acceptbaseparser.h
|
|
||||||
functions.o: functions.h function.h item.h
|
functions.o: functions.h function.h item.h
|
||||||
groups.o: groups.h group.h ugcontainer.h log.h db.h item.h user.h thread.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
|
groups.o: error.h dircontainer.h
|
||||||
httpsimpleparser.o: httpsimpleparser.h
|
httpsimpleparser.o: httpsimpleparser.h
|
||||||
lastcontainer.o: lastcontainer.h log.h
|
lastcontainer.o: lastcontainer.h log.h
|
||||||
log.o: log.h
|
log.o: log.h
|
||||||
main.o: requestcontroller.h ../content/content.h ../core/item.h
|
|
||||||
main.o: ../templates/templates.h ../../ezc/src/ezc.h
|
|
||||||
main.o: ../templates/patterncacher.h ../app/templates.h ../core/thread.h
|
|
||||||
main.o: sessionmanager.h sessioncontainer.h session.h done.h item.h error.h
|
|
||||||
main.o: log.h user.h functionparser.h requesttypes.h ../app/content.h data.h
|
|
||||||
main.o: dirs.h dircontainer.h users.h ugcontainer.h groups.h group.h
|
|
||||||
main.o: functions.h function.h lastcontainer.h mounts.h mount.h request.h
|
|
||||||
main.o: thread.h compress.h acceptencodingparser.h acceptbaseparser.h db.h
|
|
||||||
main.o: config.h ../confparser/confparser.h notify.h
|
|
||||||
main.o: ../templatesnotify/templatesnotify.h ../core/mount.h
|
|
||||||
misc.o: misc.h item.h log.h
|
misc.o: misc.h item.h log.h
|
||||||
mount.o: mount.h
|
mount.o: mount.h
|
||||||
mountparser.o: mountparser.h mount.h item.h error.h log.h data.h dirs.h
|
mountparser.o: mountparser.h mount.h item.h error.h log.h data.h dirs.h
|
||||||
|
@ -53,27 +44,31 @@ mounts.o: lastcontainer.h request.h requesttypes.h session.h done.h error.h
|
||||||
mounts.o: thread.h compress.h acceptencodingparser.h acceptbaseparser.h
|
mounts.o: thread.h compress.h acceptencodingparser.h acceptbaseparser.h
|
||||||
mounts.o: mountparser.h
|
mounts.o: mountparser.h
|
||||||
notify.o: log.h notify.h ../templatesnotify/templatesnotify.h ../core/mount.h
|
notify.o: log.h notify.h ../templatesnotify/templatesnotify.h ../core/mount.h
|
||||||
notify.o: ../../ezc/src/ezc.h data.h dirs.h item.h dircontainer.h users.h
|
notify.o: data.h dirs.h item.h dircontainer.h users.h user.h ugcontainer.h
|
||||||
notify.o: user.h ugcontainer.h groups.h group.h functions.h function.h
|
notify.o: groups.h group.h functions.h function.h lastcontainer.h mounts.h
|
||||||
notify.o: lastcontainer.h mounts.h mount.h misc.h request.h requesttypes.h
|
notify.o: mount.h misc.h request.h requesttypes.h session.h done.h error.h
|
||||||
notify.o: session.h done.h error.h thread.h compress.h acceptencodingparser.h
|
notify.o: thread.h compress.h acceptencodingparser.h acceptbaseparser.h
|
||||||
notify.o: acceptbaseparser.h
|
plugin.o: plugin.h request.h requesttypes.h session.h done.h item.h error.h
|
||||||
|
plugin.o: log.h user.h function.h thread.h compress.h acceptencodingparser.h
|
||||||
|
plugin.o: acceptbaseparser.h data.h dirs.h dircontainer.h users.h
|
||||||
|
plugin.o: ugcontainer.h groups.h group.h functions.h lastcontainer.h mounts.h
|
||||||
|
plugin.o: mount.h pluginmsg.h
|
||||||
request.o: request.h requesttypes.h session.h done.h item.h error.h log.h
|
request.o: request.h requesttypes.h session.h done.h item.h error.h log.h
|
||||||
request.o: user.h function.h thread.h compress.h acceptencodingparser.h
|
request.o: user.h function.h thread.h compress.h acceptencodingparser.h
|
||||||
request.o: acceptbaseparser.h getparser.h httpsimpleparser.h postparser.h
|
request.o: acceptbaseparser.h getparser.h httpsimpleparser.h postparser.h
|
||||||
request.o: cookieparser.h data.h dirs.h dircontainer.h users.h ugcontainer.h
|
request.o: cookieparser.h data.h dirs.h dircontainer.h users.h ugcontainer.h
|
||||||
request.o: groups.h group.h functions.h lastcontainer.h mounts.h mount.h
|
request.o: groups.h group.h functions.h lastcontainer.h mounts.h mount.h
|
||||||
|
request.o: plugin.h pluginmsg.h
|
||||||
requestcontroller.o: requestcontroller.h ../content/content.h ../core/item.h
|
requestcontroller.o: requestcontroller.h ../content/content.h ../core/item.h
|
||||||
requestcontroller.o: ../templates/templates.h ../../ezc/src/ezc.h
|
requestcontroller.o: ../templates/templates.h ../templates/patterncacher.h
|
||||||
requestcontroller.o: ../templates/patterncacher.h ../app/templates.h
|
|
||||||
requestcontroller.o: ../core/thread.h sessionmanager.h sessioncontainer.h
|
requestcontroller.o: ../core/thread.h sessionmanager.h sessioncontainer.h
|
||||||
requestcontroller.o: session.h done.h item.h error.h log.h user.h
|
requestcontroller.o: session.h done.h item.h error.h log.h user.h
|
||||||
requestcontroller.o: functionparser.h requesttypes.h ../app/content.h data.h
|
requestcontroller.o: functionparser.h requesttypes.h data.h dirs.h
|
||||||
requestcontroller.o: dirs.h dircontainer.h users.h ugcontainer.h groups.h
|
requestcontroller.o: dircontainer.h users.h ugcontainer.h groups.h group.h
|
||||||
requestcontroller.o: group.h functions.h function.h lastcontainer.h mounts.h
|
requestcontroller.o: functions.h function.h lastcontainer.h mounts.h mount.h
|
||||||
requestcontroller.o: mount.h request.h thread.h compress.h
|
requestcontroller.o: request.h thread.h compress.h acceptencodingparser.h
|
||||||
requestcontroller.o: acceptencodingparser.h acceptbaseparser.h postparser.h
|
requestcontroller.o: acceptbaseparser.h postparser.h httpsimpleparser.h
|
||||||
requestcontroller.o: httpsimpleparser.h cookieparser.h notify.h
|
requestcontroller.o: cookieparser.h notify.h
|
||||||
requestcontroller.o: ../templatesnotify/templatesnotify.h ../core/mount.h
|
requestcontroller.o: ../templatesnotify/templatesnotify.h ../core/mount.h
|
||||||
session.o: session.h done.h item.h error.h log.h user.h
|
session.o: session.h done.h item.h error.h log.h user.h
|
||||||
sessioncontainer.o: sessioncontainer.h session.h done.h item.h error.h log.h
|
sessioncontainer.o: sessioncontainer.h session.h done.h item.h error.h log.h
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
o = acceptbaseparser.o compress.o config.o data.o db.o db_itemcolumns.o dircontainer.o dirs.o done.o error.o function.o functioncodeparser.o functionparser.o functions.o groups.o httpsimpleparser.o lastcontainer.o log.o main.o misc.o mount.o mountparser.o mounts.o notify.o request.o requestcontroller.o session.o sessioncontainer.o sessionmanager.o users.o
|
o = acceptbaseparser.o compress.o config.o data.o db.o db_itemcolumns.o dircontainer.o dirs.o done.o error.o function.o functioncodeparser.o functionparser.o functions.o groups.o httpsimpleparser.o lastcontainer.o log.o misc.o mount.o mountparser.o mounts.o notify.o plugin.o request.o requestcontroller.o session.o sessioncontainer.o sessionmanager.o users.o
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "data.h"
|
#include "data.h"
|
||||||
|
#include "plugin.h"
|
||||||
|
|
||||||
|
|
||||||
Config::Config()
|
Config::Config()
|
||||||
|
@ -119,6 +120,9 @@ void Config::AssignValues()
|
||||||
|
|
||||||
data.session_max_iddle = Int("session_max_iddle");
|
data.session_max_iddle = Int("session_max_iddle");
|
||||||
data.compression = Bool("compression");
|
data.compression = Bool("compression");
|
||||||
|
|
||||||
|
std::string p = Text("plugin");
|
||||||
|
data.plugin_file.push_back(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,9 @@ public:
|
||||||
|
|
||||||
bool compression;
|
bool compression;
|
||||||
|
|
||||||
|
// plugins
|
||||||
|
std::vector<std::string> plugin_file;
|
||||||
|
|
||||||
// end config members
|
// end config members
|
||||||
// -----------------------------------------------------------------
|
// -----------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,6 @@
|
||||||
|
|
||||||
#include "requesttypes.h"
|
#include "requesttypes.h"
|
||||||
|
|
||||||
#ifdef APPFUNCTIONS
|
|
||||||
#include "../app/content.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class FunctionParser
|
class FunctionParser
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,127 @@
|
||||||
|
/*
|
||||||
|
* This file is a part of CMSLU -- Content Management System like Unix
|
||||||
|
* and is not publicly distributed
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008-2009, Tomasz Sowa
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <dlfcn.h>
|
||||||
|
#include "plugin.h"
|
||||||
|
#include "pluginmsg.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void Plugin::UnloadPlugins()
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
slots.clear();
|
||||||
|
|
||||||
|
for(i=0 ; i<plugins.size() ; ++i)
|
||||||
|
dlclose(plugins[i]);
|
||||||
|
|
||||||
|
plugins.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Plugin::Plugin()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Plugin::~Plugin()
|
||||||
|
{
|
||||||
|
UnloadPlugins();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Plugin::LoadPlugins(const std::vector<std::string> & plugins)
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
for(i=0 ; i<plugins.size() ; ++i)
|
||||||
|
{
|
||||||
|
LoadPlugin(plugins[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Plugin::LoadPlugin(const std::string & filename)
|
||||||
|
{
|
||||||
|
LoadPlugin(filename.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Plugin::LoadPlugin(const char * filename)
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
Fun fun = (Fun)dlfunc(p, "Init");
|
||||||
|
|
||||||
|
if( !fun )
|
||||||
|
{
|
||||||
|
log << log1 << "Pl: cannot load a plugin: " << filename << " (there is no Init() function)" << logend;
|
||||||
|
dlclose(p);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
arg.Clear();
|
||||||
|
|
||||||
|
if( fun(&arg) )
|
||||||
|
{
|
||||||
|
log << log1 << "Pl: plugin loaded: " << filename << logend;
|
||||||
|
plugins.push_back(p);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
log << log1 << "Pl: plugin Init() returned false (" << filename << ") " << logend;
|
||||||
|
dlclose(p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Arg * Plugin::Call(int message, void * a, void * a2, void * a3)
|
||||||
|
{
|
||||||
|
Slots::iterator i = slots.lower_bound(message);
|
||||||
|
arg.Clear();
|
||||||
|
arg.app = a;
|
||||||
|
arg.app2 = a2;
|
||||||
|
arg.app3 = a3;
|
||||||
|
|
||||||
|
for( ; i!=slots.end() && i->first==message ; ++i )
|
||||||
|
{
|
||||||
|
if( i->second(&arg) )
|
||||||
|
arg.ret_true++;
|
||||||
|
else
|
||||||
|
arg.ret_false++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return &arg;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void Plugin::Assign(int message, Fun fun)
|
||||||
|
{
|
||||||
|
slots.insert( std::make_pair(message, fun) );
|
||||||
|
}
|
|
@ -0,0 +1,91 @@
|
||||||
|
/*
|
||||||
|
* This file is a part of CMSLU -- Content Management System like Unix
|
||||||
|
* and is not publicly distributed
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008-2009, Tomasz Sowa
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef headerfilecmsluplugin
|
||||||
|
#define headerfilecmsluplugin
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
#include <map>
|
||||||
|
#include "request.h"
|
||||||
|
#include "data.h"
|
||||||
|
#include "pluginmsg.h"
|
||||||
|
#include "log.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class Plugin;
|
||||||
|
|
||||||
|
|
||||||
|
// plugin arguments
|
||||||
|
struct Arg
|
||||||
|
{
|
||||||
|
void * app; // used for some purposes
|
||||||
|
void * app2; // used for some purposes
|
||||||
|
void * app3; // used for some purposes
|
||||||
|
|
||||||
|
int ret_true; // how many plugins returned true
|
||||||
|
int ret_false; // how many plugins returned false
|
||||||
|
|
||||||
|
|
||||||
|
void Clear()
|
||||||
|
{
|
||||||
|
app = 0;
|
||||||
|
app2 = 0;
|
||||||
|
app3 = 0;
|
||||||
|
ret_true = 0;
|
||||||
|
ret_false = 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class Plugin
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
typedef bool (*Fun)(Arg *);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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 Assign(int message, Fun);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
|
||||||
|
typedef std::vector<void*> Plugins;
|
||||||
|
Plugins plugins;
|
||||||
|
|
||||||
|
typedef std::multimap<int, Fun> Slots;
|
||||||
|
Slots slots;
|
||||||
|
|
||||||
|
|
||||||
|
Arg arg;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
extern Plugin plugin;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -7,24 +7,24 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef headerfileappcontent
|
|
||||||
#define headerfileappcontent
|
#ifndef headerfilecmslupluginmsg
|
||||||
|
#define headerfilecmslupluginmsg
|
||||||
|
|
||||||
|
|
||||||
|
#define CMSLU_TEMPLATES_CREATEFUNCTIONS 999
|
||||||
|
#define CMSLU_REQUEST_CLEAR 1000
|
||||||
|
|
||||||
|
#define CMSLU_CONTENT_MAKE 2000
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace AppContent
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef APPPREPARE
|
|
||||||
|
|
||||||
void PrepareApp();
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -13,6 +13,10 @@
|
||||||
#include "cookieparser.h"
|
#include "cookieparser.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "data.h"
|
#include "data.h"
|
||||||
|
#include "plugin.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Request::Request() : char_empty(0)
|
Request::Request() : char_empty(0)
|
||||||
{
|
{
|
||||||
|
@ -81,6 +85,8 @@ void Request::Clear()
|
||||||
notify_code = 0;
|
notify_code = 0;
|
||||||
|
|
||||||
browser_msie = false;
|
browser_msie = false;
|
||||||
|
|
||||||
|
plugin.Call(CMSLU_REQUEST_CLEAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
include Makefile.o.dep
|
||||||
|
|
||||||
|
|
||||||
|
all: $(o)
|
||||||
|
|
||||||
|
|
||||||
|
.SUFFIXES: .cpp .o
|
||||||
|
|
||||||
|
.cpp.o:
|
||||||
|
$(CXX) -c $(CXXFLAGSMAIN) $<
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
depend:
|
||||||
|
makedepend -Y. -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
|
|
@ -0,0 +1,17 @@
|
||||||
|
# DO NOT DELETE
|
||||||
|
|
||||||
|
main.o: ../core/requestcontroller.h ../content/content.h ../core/item.h
|
||||||
|
main.o: ../templates/templates.h ../templates/patterncacher.h
|
||||||
|
main.o: ../core/thread.h ../core/sessionmanager.h ../core/sessioncontainer.h
|
||||||
|
main.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
|
||||||
|
main.o: ../core/log.h ../core/user.h ../core/functionparser.h
|
||||||
|
main.o: ../core/requesttypes.h ../core/data.h ../core/dirs.h
|
||||||
|
main.o: ../core/dircontainer.h ../core/users.h ../core/ugcontainer.h
|
||||||
|
main.o: ../core/groups.h ../core/group.h ../core/functions.h
|
||||||
|
main.o: ../core/function.h ../core/lastcontainer.h ../core/mounts.h
|
||||||
|
main.o: ../core/mount.h ../core/log.h ../core/request.h ../core/thread.h
|
||||||
|
main.o: ../core/compress.h ../core/acceptencodingparser.h
|
||||||
|
main.o: ../core/acceptbaseparser.h ../core/db.h ../core/config.h
|
||||||
|
main.o: ../confparser/confparser.h ../core/notify.h
|
||||||
|
main.o: ../templatesnotify/templatesnotify.h ../core/mount.h ../core/plugin.h
|
||||||
|
main.o: ../core/request.h ../core/data.h ../core/pluginmsg.h
|
|
@ -0,0 +1 @@
|
||||||
|
o = main.o
|
|
@ -12,13 +12,14 @@
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "requestcontroller.h"
|
#include "../core/requestcontroller.h"
|
||||||
#include "data.h"
|
#include "../core/data.h"
|
||||||
#include "log.h"
|
#include "../core/log.h"
|
||||||
#include "request.h"
|
#include "../core/request.h"
|
||||||
#include "db.h"
|
#include "../core/db.h"
|
||||||
#include "config.h"
|
#include "../core/config.h"
|
||||||
#include "notify.h"
|
#include "../core/notify.h"
|
||||||
|
#include "../core/plugin.h"
|
||||||
|
|
||||||
|
|
||||||
// singletons
|
// singletons
|
||||||
|
@ -31,7 +32,7 @@ Db db;
|
||||||
Config config;
|
Config config;
|
||||||
RequestController req_controller;
|
RequestController req_controller;
|
||||||
Notify notify;
|
Notify notify;
|
||||||
|
Plugin plugin;
|
||||||
|
|
||||||
|
|
||||||
void signal_term(int)
|
void signal_term(int)
|
||||||
|
@ -77,7 +78,6 @@ int main(int argv, char ** argc)
|
||||||
if( !config.ReadConfig(true) ) /* errors to stdout */
|
if( !config.ReadConfig(true) ) /* errors to stdout */
|
||||||
return 2;
|
return 2;
|
||||||
|
|
||||||
|
|
||||||
// closing descriptors only at the beginning
|
// closing descriptors only at the beginning
|
||||||
// !! temporary we do not close standard output for errors
|
// !! temporary we do not close standard output for errors
|
||||||
// client postgresql uses it for reporting warnings (I don't know why)
|
// client postgresql uses it for reporting warnings (I don't know why)
|
||||||
|
@ -93,6 +93,9 @@ int main(int argv, char ** argc)
|
||||||
log.Init(data.log_level, data.log_file, data.log_stdout);
|
log.Init(data.log_level, data.log_file, data.log_stdout);
|
||||||
nlog.Init(data.log_level, data.log_notify_file, false);
|
nlog.Init(data.log_level, data.log_notify_file, false);
|
||||||
db.Init(data.db_database, data.db_user, data.db_pass);
|
db.Init(data.db_database, data.db_user, data.db_pass);
|
||||||
|
|
||||||
|
plugin.LoadPlugins(data.plugin_file);
|
||||||
|
|
||||||
request.Init();
|
request.Init();
|
||||||
|
|
||||||
if( !req_controller.Init() )
|
if( !req_controller.Init() )
|
|
@ -12,7 +12,7 @@ all: $(o)
|
||||||
|
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
makedepend $(DEPMACROS) -Y. -f- *.cpp > Makefile.dep
|
makedepend -Y. -f- *.cpp > Makefile.dep
|
||||||
echo -n "o = " > Makefile.o.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
|
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
|
||||||
|
|
||||||
|
|
|
@ -1,124 +1,114 @@
|
||||||
# DO NOT DELETE
|
# DO NOT DELETE
|
||||||
|
|
||||||
dir.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h
|
dir.o: templates.h patterncacher.h ../core/item.h ../core/request.h
|
||||||
dir.o: ../app/templates.h ../core/request.h ../core/requesttypes.h
|
dir.o: ../core/requesttypes.h ../core/session.h ../core/done.h ../core/item.h
|
||||||
dir.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
|
dir.o: ../core/error.h ../core/log.h ../core/user.h ../core/function.h
|
||||||
dir.o: ../core/log.h ../core/user.h ../core/function.h ../core/thread.h
|
dir.o: ../core/thread.h ../core/compress.h ../core/acceptencodingparser.h
|
||||||
dir.o: ../core/compress.h ../core/acceptencodingparser.h
|
|
||||||
dir.o: ../core/acceptbaseparser.h ../core/data.h ../core/dirs.h
|
dir.o: ../core/acceptbaseparser.h ../core/data.h ../core/dirs.h
|
||||||
dir.o: ../core/dircontainer.h ../core/users.h ../core/ugcontainer.h
|
dir.o: ../core/dircontainer.h ../core/users.h ../core/ugcontainer.h
|
||||||
dir.o: ../core/groups.h ../core/group.h ../core/functions.h
|
dir.o: ../core/groups.h ../core/group.h ../core/functions.h
|
||||||
dir.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h ../core/db.h
|
dir.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h ../core/db.h
|
||||||
dir.o: ../core/log.h ../core/misc.h
|
dir.o: ../core/log.h ../core/misc.h
|
||||||
doc.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h
|
doc.o: templates.h patterncacher.h ../core/item.h ../core/data.h
|
||||||
doc.o: ../app/templates.h ../core/data.h ../core/dirs.h ../core/item.h
|
doc.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h ../core/users.h
|
||||||
doc.o: ../core/dircontainer.h ../core/users.h ../core/user.h
|
doc.o: ../core/user.h ../core/ugcontainer.h ../core/log.h ../core/groups.h
|
||||||
doc.o: ../core/ugcontainer.h ../core/log.h ../core/groups.h ../core/group.h
|
doc.o: ../core/group.h ../core/functions.h ../core/function.h
|
||||||
doc.o: ../core/functions.h ../core/function.h ../core/lastcontainer.h
|
doc.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
|
||||||
doc.o: ../core/mounts.h ../core/mount.h ../core/request.h
|
doc.o: ../core/request.h ../core/requesttypes.h ../core/session.h
|
||||||
doc.o: ../core/requesttypes.h ../core/session.h ../core/done.h
|
doc.o: ../core/done.h ../core/error.h ../core/thread.h ../core/compress.h
|
||||||
doc.o: ../core/error.h ../core/thread.h ../core/compress.h
|
|
||||||
doc.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
doc.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
||||||
doc.o: ../core/misc.h
|
doc.o: ../core/misc.h
|
||||||
done.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h
|
done.o: templates.h patterncacher.h ../core/item.h ../core/request.h
|
||||||
done.o: ../app/templates.h ../core/request.h ../core/requesttypes.h
|
done.o: ../core/requesttypes.h ../core/session.h ../core/done.h
|
||||||
done.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
|
done.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h
|
||||||
done.o: ../core/log.h ../core/user.h ../core/function.h ../core/thread.h
|
done.o: ../core/function.h ../core/thread.h ../core/compress.h
|
||||||
done.o: ../core/compress.h ../core/acceptencodingparser.h
|
done.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
||||||
done.o: ../core/acceptbaseparser.h ../core/misc.h
|
done.o: ../core/misc.h
|
||||||
item.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h
|
item.o: templates.h patterncacher.h ../core/item.h ../core/data.h
|
||||||
item.o: ../app/templates.h ../core/data.h ../core/dirs.h ../core/item.h
|
item.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h ../core/users.h
|
||||||
item.o: ../core/dircontainer.h ../core/users.h ../core/user.h
|
item.o: ../core/user.h ../core/ugcontainer.h ../core/log.h ../core/groups.h
|
||||||
item.o: ../core/ugcontainer.h ../core/log.h ../core/groups.h ../core/group.h
|
item.o: ../core/group.h ../core/functions.h ../core/function.h
|
||||||
item.o: ../core/functions.h ../core/function.h ../core/lastcontainer.h
|
item.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
|
||||||
item.o: ../core/mounts.h ../core/mount.h ../core/request.h
|
item.o: ../core/request.h ../core/requesttypes.h ../core/session.h
|
||||||
item.o: ../core/requesttypes.h ../core/session.h ../core/done.h
|
item.o: ../core/done.h ../core/error.h ../core/thread.h ../core/compress.h
|
||||||
item.o: ../core/error.h ../core/thread.h ../core/compress.h
|
|
||||||
item.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
item.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
||||||
item.o: ../core/misc.h
|
item.o: ../core/misc.h
|
||||||
last.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h
|
last.o: templates.h patterncacher.h ../core/item.h ../core/lastcontainer.h
|
||||||
last.o: ../app/templates.h ../core/lastcontainer.h ../core/data.h
|
last.o: ../core/data.h ../core/dirs.h ../core/item.h ../core/dircontainer.h
|
||||||
last.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h ../core/users.h
|
last.o: ../core/users.h ../core/user.h ../core/ugcontainer.h ../core/log.h
|
||||||
last.o: ../core/user.h ../core/ugcontainer.h ../core/log.h ../core/groups.h
|
last.o: ../core/groups.h ../core/group.h ../core/functions.h
|
||||||
last.o: ../core/group.h ../core/functions.h ../core/function.h
|
last.o: ../core/function.h ../core/lastcontainer.h ../core/mounts.h
|
||||||
last.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
|
last.o: ../core/mount.h ../core/request.h ../core/requesttypes.h
|
||||||
last.o: ../core/request.h ../core/requesttypes.h ../core/session.h
|
last.o: ../core/session.h ../core/done.h ../core/error.h ../core/thread.h
|
||||||
last.o: ../core/done.h ../core/error.h ../core/thread.h ../core/compress.h
|
last.o: ../core/compress.h ../core/acceptencodingparser.h
|
||||||
last.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
last.o: ../core/acceptbaseparser.h ../core/misc.h
|
||||||
last.o: ../core/misc.h
|
mount.o: templates.h patterncacher.h ../core/item.h ../core/data.h
|
||||||
mount.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h
|
mount.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h ../core/users.h
|
||||||
mount.o: ../app/templates.h ../core/data.h ../core/dirs.h ../core/item.h
|
mount.o: ../core/user.h ../core/ugcontainer.h ../core/log.h ../core/groups.h
|
||||||
mount.o: ../core/dircontainer.h ../core/users.h ../core/user.h
|
mount.o: ../core/group.h ../core/functions.h ../core/function.h
|
||||||
mount.o: ../core/ugcontainer.h ../core/log.h ../core/groups.h ../core/group.h
|
mount.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
|
||||||
mount.o: ../core/functions.h ../core/function.h ../core/lastcontainer.h
|
patterncacher.o: patterncacher.h ../core/item.h ../core/data.h ../core/dirs.h
|
||||||
mount.o: ../core/mounts.h ../core/mount.h
|
patterncacher.o: ../core/item.h ../core/dircontainer.h ../core/users.h
|
||||||
patterncacher.o: patterncacher.h ../core/item.h ../../ezc/src/ezc.h
|
patterncacher.o: ../core/user.h ../core/ugcontainer.h ../core/log.h
|
||||||
patterncacher.o: ../core/data.h ../core/dirs.h ../core/item.h
|
patterncacher.o: ../core/groups.h ../core/group.h ../core/functions.h
|
||||||
patterncacher.o: ../core/dircontainer.h ../core/users.h ../core/user.h
|
patterncacher.o: ../core/function.h ../core/lastcontainer.h ../core/mounts.h
|
||||||
patterncacher.o: ../core/ugcontainer.h ../core/log.h ../core/groups.h
|
patterncacher.o: ../core/mount.h ../core/log.h
|
||||||
patterncacher.o: ../core/group.h ../core/functions.h ../core/function.h
|
priv.o: templates.h patterncacher.h ../core/item.h ../core/data.h
|
||||||
patterncacher.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
|
priv.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h ../core/users.h
|
||||||
patterncacher.o: ../core/log.h
|
priv.o: ../core/user.h ../core/ugcontainer.h ../core/log.h ../core/groups.h
|
||||||
priv.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h
|
priv.o: ../core/group.h ../core/functions.h ../core/function.h
|
||||||
priv.o: ../app/templates.h ../core/data.h ../core/dirs.h ../core/item.h
|
priv.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
|
||||||
priv.o: ../core/dircontainer.h ../core/users.h ../core/user.h
|
priv.o: ../core/request.h ../core/requesttypes.h ../core/session.h
|
||||||
priv.o: ../core/ugcontainer.h ../core/log.h ../core/groups.h ../core/group.h
|
priv.o: ../core/done.h ../core/error.h ../core/thread.h ../core/compress.h
|
||||||
priv.o: ../core/functions.h ../core/function.h ../core/lastcontainer.h
|
|
||||||
priv.o: ../core/mounts.h ../core/mount.h ../core/request.h
|
|
||||||
priv.o: ../core/requesttypes.h ../core/session.h ../core/done.h
|
|
||||||
priv.o: ../core/error.h ../core/thread.h ../core/compress.h
|
|
||||||
priv.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
priv.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
||||||
priv.o: ../core/misc.h
|
priv.o: ../core/misc.h
|
||||||
sys.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h
|
sys.o: templates.h patterncacher.h ../core/item.h ../core/data.h
|
||||||
sys.o: ../app/templates.h ../core/data.h ../core/dirs.h ../core/item.h
|
sys.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h ../core/users.h
|
||||||
sys.o: ../core/dircontainer.h ../core/users.h ../core/user.h
|
sys.o: ../core/user.h ../core/ugcontainer.h ../core/log.h ../core/groups.h
|
||||||
sys.o: ../core/ugcontainer.h ../core/log.h ../core/groups.h ../core/group.h
|
sys.o: ../core/group.h ../core/functions.h ../core/function.h
|
||||||
sys.o: ../core/functions.h ../core/function.h ../core/lastcontainer.h
|
sys.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
|
||||||
sys.o: ../core/mounts.h ../core/mount.h ../core/request.h
|
sys.o: ../core/request.h ../core/requesttypes.h ../core/session.h
|
||||||
sys.o: ../core/requesttypes.h ../core/session.h ../core/done.h
|
sys.o: ../core/done.h ../core/error.h ../core/thread.h ../core/compress.h
|
||||||
sys.o: ../core/error.h ../core/thread.h ../core/compress.h
|
|
||||||
sys.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
sys.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
||||||
sys.o: ../core/misc.h
|
sys.o: ../core/misc.h
|
||||||
templates.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h
|
templates.o: templates.h patterncacher.h ../core/item.h ../core/data.h
|
||||||
templates.o: ../app/templates.h ../core/data.h ../core/dirs.h ../core/item.h
|
templates.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h
|
||||||
templates.o: ../core/dircontainer.h ../core/users.h ../core/user.h
|
templates.o: ../core/users.h ../core/user.h ../core/ugcontainer.h
|
||||||
templates.o: ../core/ugcontainer.h ../core/log.h ../core/groups.h
|
templates.o: ../core/log.h ../core/groups.h ../core/group.h
|
||||||
templates.o: ../core/group.h ../core/functions.h ../core/function.h
|
templates.o: ../core/functions.h ../core/function.h ../core/lastcontainer.h
|
||||||
templates.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
|
templates.o: ../core/mounts.h ../core/mount.h ../core/request.h
|
||||||
templates.o: ../core/request.h ../core/requesttypes.h ../core/session.h
|
templates.o: ../core/requesttypes.h ../core/session.h ../core/done.h
|
||||||
templates.o: ../core/done.h ../core/error.h ../core/thread.h
|
templates.o: ../core/error.h ../core/thread.h ../core/compress.h
|
||||||
templates.o: ../core/compress.h ../core/acceptencodingparser.h
|
templates.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
||||||
templates.o: ../core/acceptbaseparser.h ../core/misc.h
|
templates.o: ../core/misc.h ../core/plugin.h ../core/request.h ../core/data.h
|
||||||
thread.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h
|
templates.o: ../core/pluginmsg.h
|
||||||
thread.o: ../app/templates.h ../core/data.h ../core/dirs.h ../core/item.h
|
thread.o: templates.h patterncacher.h ../core/item.h ../core/data.h
|
||||||
thread.o: ../core/dircontainer.h ../core/users.h ../core/user.h
|
thread.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h
|
||||||
thread.o: ../core/ugcontainer.h ../core/log.h ../core/groups.h
|
thread.o: ../core/users.h ../core/user.h ../core/ugcontainer.h ../core/log.h
|
||||||
thread.o: ../core/group.h ../core/functions.h ../core/function.h
|
thread.o: ../core/groups.h ../core/group.h ../core/functions.h
|
||||||
thread.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
|
thread.o: ../core/function.h ../core/lastcontainer.h ../core/mounts.h
|
||||||
thread.o: ../core/request.h ../core/requesttypes.h ../core/session.h
|
thread.o: ../core/mount.h ../core/request.h ../core/requesttypes.h
|
||||||
thread.o: ../core/done.h ../core/error.h ../core/thread.h ../core/compress.h
|
thread.o: ../core/session.h ../core/done.h ../core/error.h ../core/thread.h
|
||||||
thread.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
thread.o: ../core/compress.h ../core/acceptencodingparser.h
|
||||||
thread.o: ../core/misc.h
|
thread.o: ../core/acceptbaseparser.h ../core/misc.h
|
||||||
user.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h
|
user.o: templates.h patterncacher.h ../core/item.h ../core/data.h
|
||||||
user.o: ../app/templates.h ../core/data.h ../core/dirs.h ../core/item.h
|
user.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h ../core/users.h
|
||||||
user.o: ../core/dircontainer.h ../core/users.h ../core/user.h
|
user.o: ../core/user.h ../core/ugcontainer.h ../core/log.h ../core/groups.h
|
||||||
user.o: ../core/ugcontainer.h ../core/log.h ../core/groups.h ../core/group.h
|
user.o: ../core/group.h ../core/functions.h ../core/function.h
|
||||||
user.o: ../core/functions.h ../core/function.h ../core/lastcontainer.h
|
user.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
|
||||||
user.o: ../core/mounts.h ../core/mount.h ../core/request.h
|
user.o: ../core/request.h ../core/requesttypes.h ../core/session.h
|
||||||
user.o: ../core/requesttypes.h ../core/session.h ../core/done.h
|
user.o: ../core/done.h ../core/error.h ../core/thread.h ../core/compress.h
|
||||||
user.o: ../core/error.h ../core/thread.h ../core/compress.h
|
|
||||||
user.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
user.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
||||||
user.o: ../core/misc.h
|
user.o: ../core/misc.h
|
||||||
who.o: templates.h ../../ezc/src/ezc.h patterncacher.h ../core/item.h
|
who.o: templates.h patterncacher.h ../core/item.h ../core/sessioncontainer.h
|
||||||
who.o: ../app/templates.h ../core/sessioncontainer.h ../core/session.h
|
who.o: ../core/session.h ../core/done.h ../core/item.h ../core/error.h
|
||||||
who.o: ../core/done.h ../core/item.h ../core/error.h ../core/log.h
|
who.o: ../core/log.h ../core/user.h ../core/requestcontroller.h
|
||||||
who.o: ../core/user.h ../core/requestcontroller.h ../content/content.h
|
who.o: ../content/content.h ../templates/templates.h ../core/thread.h
|
||||||
who.o: ../templates/templates.h ../core/thread.h ../core/sessionmanager.h
|
who.o: ../core/sessionmanager.h ../core/sessioncontainer.h
|
||||||
who.o: ../core/sessioncontainer.h ../core/functionparser.h
|
who.o: ../core/functionparser.h ../core/requesttypes.h ../core/data.h
|
||||||
who.o: ../core/requesttypes.h ../app/content.h ../core/data.h ../core/dirs.h
|
who.o: ../core/dirs.h ../core/dircontainer.h ../core/users.h
|
||||||
who.o: ../core/dircontainer.h ../core/users.h ../core/ugcontainer.h
|
who.o: ../core/ugcontainer.h ../core/groups.h ../core/group.h
|
||||||
who.o: ../core/groups.h ../core/group.h ../core/functions.h
|
who.o: ../core/functions.h ../core/function.h ../core/lastcontainer.h
|
||||||
who.o: ../core/function.h ../core/lastcontainer.h ../core/mounts.h
|
who.o: ../core/mounts.h ../core/mount.h ../core/request.h ../core/thread.h
|
||||||
who.o: ../core/mount.h ../core/request.h ../core/thread.h ../core/compress.h
|
who.o: ../core/compress.h ../core/acceptencodingparser.h
|
||||||
who.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
who.o: ../core/acceptbaseparser.h ../core/misc.h
|
||||||
who.o: ../core/misc.h
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
#include "../core/item.h"
|
#include "../core/item.h"
|
||||||
#include "../../ezc/src/ezc.h"
|
#include "ezc.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include "../core/data.h"
|
#include "../core/data.h"
|
||||||
#include "../core/request.h"
|
#include "../core/request.h"
|
||||||
#include "../core/misc.h"
|
#include "../core/misc.h"
|
||||||
|
#include "../core/plugin.h"
|
||||||
|
|
||||||
|
|
||||||
namespace TemplatesFunctions
|
namespace TemplatesFunctions
|
||||||
|
@ -48,14 +48,6 @@ PatternCacher pattern_cacher;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// !! tymczasowa funkcja
|
|
||||||
void is_group_tv(Info & i)
|
|
||||||
{
|
|
||||||
long gid = data.groups.GetGroupId("tv");
|
|
||||||
|
|
||||||
if( request.session->puser && request.session->puser->IsMemberOf(gid) )
|
|
||||||
i.result = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -384,13 +376,8 @@ void Templates::CreateFunctions()
|
||||||
functions.Insert("mount_is_cms", mount_is_cms);
|
functions.Insert("mount_is_cms", mount_is_cms);
|
||||||
|
|
||||||
|
|
||||||
// !! tymczasowa
|
|
||||||
functions.Insert("is_group_tv", is_group_tv);
|
|
||||||
|
|
||||||
|
plugin.Call(CMSLU_TEMPLATES_CREATEFUNCTIONS, &functions);
|
||||||
#ifdef APPTEMPLATES
|
|
||||||
AppTemplateFunctions::CreateAppFunctions(functions);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -463,10 +450,6 @@ void Templates::Read()
|
||||||
|
|
||||||
|
|
||||||
CreateFunctions();
|
CreateFunctions();
|
||||||
|
|
||||||
#ifdef APPTEMPLATES
|
|
||||||
AppTemplateFunctions::ReadAppPatterns();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,14 +13,10 @@
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
#include "../../ezc/src/ezc.h"
|
#include "ezc.h"
|
||||||
#include "patterncacher.h"
|
#include "patterncacher.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef APPTEMPLATES
|
|
||||||
#include "../app/templates.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
namespace TemplatesFunctions
|
namespace TemplatesFunctions
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,7 +12,7 @@ all: $(o)
|
||||||
|
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
makedepend $(DEPMACROS) -Y. -f- *.cpp > Makefile.dep
|
makedepend -Y. -f- *.cpp > Makefile.dep
|
||||||
echo -n "o = " > Makefile.o.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
|
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# DO NOT DELETE
|
# DO NOT DELETE
|
||||||
|
|
||||||
notify.o: templatesnotify.h ../core/mount.h ../../ezc/src/ezc.h
|
notify.o: templatesnotify.h ../core/mount.h ../core/notify.h
|
||||||
notify.o: ../core/notify.h ../templatesnotify/templatesnotify.h
|
notify.o: ../templatesnotify/templatesnotify.h
|
||||||
templatesnotify.o: templatesnotify.h ../core/mount.h ../../ezc/src/ezc.h
|
templatesnotify.o: templatesnotify.h ../core/mount.h ../core/misc.h
|
||||||
templatesnotify.o: ../core/misc.h ../core/item.h
|
templatesnotify.o: ../core/item.h
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "../core/mount.h"
|
#include "../core/mount.h"
|
||||||
#include "../../ezc/src/ezc.h"
|
#include "ezc.h"
|
||||||
|
|
||||||
|
|
||||||
struct NotifyMsg
|
struct NotifyMsg
|
||||||
|
|
Loading…
Reference in New Issue