Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 495499d12f | |||
| 8d9a021eab | |||
| be6e09c5af | |||
| 293e426ed4 | |||
| 60f2337b73 | |||
| ce8152de2f | |||
| 496a1979d2 | |||
| fd698ca7b9 | |||
| b4b368d324 | |||
| 825694c880 | |||
| 32750a7d50 | |||
| 0045c6c72c | |||
| 4809016b78 | |||
| 6e2ba65524 | |||
| 8033ac66c4 | |||
| 9ef3736989 |
4
Makefile
4
Makefile
@@ -6,7 +6,7 @@ CXX = g++
|
||||
endif
|
||||
|
||||
ifndef CXXFLAGS
|
||||
CXXFLAGS = -fPIC -Wall -O2 -pthread -I/usr/local/include -I/home/tomek/roboczy/winix -I/home/tomek/roboczy/ezc/src -I/home/tomek/roboczy/tito/src -I/home/tomek/roboczy/pikotools -DEZC_USE_WINIX_LOGGER -DEZC_HAS_SPECIAL_STREAM
|
||||
CXXFLAGS = -fPIC -Wall -O2 -pthread -I/usr/local/include -I/home/tomek/roboczy/prog/winix -I/home/tomek/roboczy/prog/ezc/src -I/home/tomek/roboczy/prog/tito/src -I/home/tomek/roboczy/prog/pikotools -DEZC_USE_WINIX_LOGGER -DEZC_HAS_SPECIAL_STREAM
|
||||
endif
|
||||
|
||||
ifndef LDFLAGS
|
||||
@@ -38,7 +38,7 @@ winix.so: FORCE
|
||||
winix: winix.so FORCE
|
||||
@cd main ; $(MAKE) -e
|
||||
# use the full path with winix.so
|
||||
$(CXX) -o winix $(CXXFLAGS) $(LDFLAGS) main/*.o /home/tomek/roboczy/winix/winix.so
|
||||
$(CXX) -o winix $(CXXFLAGS) $(LDFLAGS) main/*.o /home/tomek/roboczy/prog/winix/winix.so
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -34,13 +34,13 @@ app.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
|
||||
app.o: ../functions/privchanger.h ../functions/chown.h
|
||||
app.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h
|
||||
app.o: ../functions/download.h ../functions/emacs.h ../functions/env.h
|
||||
app.o: ../functions/last.h ../functions/login.h ../functions/logout.h
|
||||
app.o: ../functions/ln.h ../functions/ls.h ../functions/man.h
|
||||
app.o: ../functions/meta.h ../functions/mkdir.h ../functions/mv.h
|
||||
app.o: ../functions/nicedit.h ../functions/node.h ../functions/passwd.h
|
||||
app.o: ../functions/priv.h ../functions/pw.h ../functions/reload.h
|
||||
app.o: ../functions/rm.h ../functions/rmuser.h ../functions/sort.h
|
||||
app.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
app.o: ../functions/imgcrop.h ../functions/last.h ../functions/login.h
|
||||
app.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
app.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
|
||||
app.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
|
||||
app.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
|
||||
app.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
|
||||
app.o: ../functions/sort.h ../functions/specialdefault.h ../functions/stat.h
|
||||
app.o: ../functions/subject.h ../functions/template.h ../functions/tinymce.h
|
||||
app.o: ../functions/uname.h ../functions/upload.h ../functions/uptime.h
|
||||
app.o: ../functions/who.h ../functions/vim.h ../core/htmlfilter.h
|
||||
@@ -100,14 +100,14 @@ config.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
|
||||
config.o: ../functions/privchanger.h ../functions/chown.h
|
||||
config.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h
|
||||
config.o: ../functions/download.h ../functions/emacs.h ../functions/env.h
|
||||
config.o: ../functions/last.h ../functions/login.h ../functions/logout.h
|
||||
config.o: ../functions/ln.h ../functions/ls.h ../functions/man.h
|
||||
config.o: ../functions/meta.h ../functions/mkdir.h ../functions/mv.h
|
||||
config.o: ../functions/nicedit.h ../functions/node.h ../functions/passwd.h
|
||||
config.o: ../functions/priv.h ../functions/pw.h ../functions/reload.h
|
||||
config.o: ../functions/rm.h ../functions/rmuser.h ../functions/sort.h
|
||||
config.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
config.o: ../functions/subject.h ../functions/template.h
|
||||
config.o: ../functions/imgcrop.h ../functions/last.h ../functions/login.h
|
||||
config.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
config.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
|
||||
config.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
|
||||
config.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
|
||||
config.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
|
||||
config.o: ../functions/sort.h ../functions/specialdefault.h
|
||||
config.o: ../functions/stat.h ../functions/subject.h ../functions/template.h
|
||||
config.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
|
||||
config.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
config.o: ../core/htmlfilter.h ../templates/templates.h
|
||||
@@ -215,20 +215,20 @@ image.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
|
||||
image.o: ../functions/privchanger.h ../functions/chown.h
|
||||
image.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h
|
||||
image.o: ../functions/download.h ../functions/emacs.h ../functions/env.h
|
||||
image.o: ../functions/last.h ../functions/login.h ../functions/logout.h
|
||||
image.o: ../functions/ln.h ../functions/ls.h ../functions/man.h
|
||||
image.o: ../functions/meta.h ../functions/mkdir.h ../functions/mv.h
|
||||
image.o: ../functions/nicedit.h ../functions/node.h ../functions/passwd.h
|
||||
image.o: ../functions/priv.h ../functions/pw.h ../functions/reload.h
|
||||
image.o: ../functions/rm.h ../functions/rmuser.h ../functions/sort.h
|
||||
image.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
image.o: ../functions/subject.h ../functions/template.h
|
||||
image.o: ../functions/imgcrop.h ../functions/last.h ../functions/login.h
|
||||
image.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
image.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
|
||||
image.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
|
||||
image.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
|
||||
image.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
|
||||
image.o: ../functions/sort.h ../functions/specialdefault.h
|
||||
image.o: ../functions/stat.h ../functions/subject.h ../functions/template.h
|
||||
image.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
|
||||
image.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
image.o: ../core/htmlfilter.h ../templates/templates.h
|
||||
image.o: ../templates/patterncacher.h ../templates/indexpatterns.h
|
||||
image.o: ../templates/patterns.h ../templates/changepatterns.h
|
||||
image.o: ../templates/htmltextstream.h ../core/sessionmanager.h
|
||||
image.o: ../templates/htmltextstream.h ../core/sessionmanager.h lock.h
|
||||
ipbancontainer.o: ipbancontainer.h ipban.h log.h textstream.h
|
||||
ipbancontainer.o: logmanipulators.h ../../pikotools/textstream/textstream.h
|
||||
ipbancontainer.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
|
||||
@@ -285,13 +285,13 @@ job.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
|
||||
job.o: ../functions/privchanger.h ../functions/chown.h
|
||||
job.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h
|
||||
job.o: ../functions/download.h ../functions/emacs.h ../functions/env.h
|
||||
job.o: ../functions/last.h ../functions/login.h ../functions/logout.h
|
||||
job.o: ../functions/ln.h ../functions/ls.h ../functions/man.h
|
||||
job.o: ../functions/meta.h ../functions/mkdir.h ../functions/mv.h
|
||||
job.o: ../functions/nicedit.h ../functions/node.h ../functions/passwd.h
|
||||
job.o: ../functions/priv.h ../functions/pw.h ../functions/reload.h
|
||||
job.o: ../functions/rm.h ../functions/rmuser.h ../functions/sort.h
|
||||
job.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
job.o: ../functions/imgcrop.h ../functions/last.h ../functions/login.h
|
||||
job.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
job.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
|
||||
job.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
|
||||
job.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
|
||||
job.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
|
||||
job.o: ../functions/sort.h ../functions/specialdefault.h ../functions/stat.h
|
||||
job.o: ../functions/subject.h ../functions/template.h ../functions/tinymce.h
|
||||
job.o: ../functions/uname.h ../functions/upload.h ../functions/uptime.h
|
||||
job.o: ../functions/who.h ../functions/vim.h ../core/htmlfilter.h
|
||||
@@ -433,14 +433,15 @@ mounts.o: ../functions/functionparser.h ../core/cur.h ../functions/adduser.h
|
||||
mounts.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h
|
||||
mounts.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h
|
||||
mounts.o: ../functions/default.h ../functions/download.h ../functions/emacs.h
|
||||
mounts.o: ../functions/env.h ../functions/last.h ../functions/login.h
|
||||
mounts.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
mounts.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
|
||||
mounts.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
|
||||
mounts.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
|
||||
mounts.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
|
||||
mounts.o: ../functions/sort.h ../functions/specialdefault.h
|
||||
mounts.o: ../functions/stat.h ../functions/subject.h ../functions/template.h
|
||||
mounts.o: ../functions/env.h ../functions/imgcrop.h ../functions/last.h
|
||||
mounts.o: ../functions/login.h ../functions/logout.h ../functions/ln.h
|
||||
mounts.o: ../functions/ls.h ../functions/man.h ../functions/meta.h
|
||||
mounts.o: ../functions/mkdir.h ../functions/mv.h ../functions/nicedit.h
|
||||
mounts.o: ../functions/node.h ../functions/passwd.h ../functions/priv.h
|
||||
mounts.o: ../functions/pw.h ../functions/reload.h ../functions/rm.h
|
||||
mounts.o: ../functions/rmuser.h ../functions/sort.h
|
||||
mounts.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
mounts.o: ../functions/subject.h ../functions/template.h
|
||||
mounts.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
|
||||
mounts.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
mounts.o: ../core/htmlfilter.h ../templates/templates.h
|
||||
@@ -482,14 +483,14 @@ plugin.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
|
||||
plugin.o: ../functions/privchanger.h ../functions/chown.h
|
||||
plugin.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h
|
||||
plugin.o: ../functions/download.h ../functions/emacs.h ../functions/env.h
|
||||
plugin.o: ../functions/last.h ../functions/login.h ../functions/logout.h
|
||||
plugin.o: ../functions/ln.h ../functions/ls.h ../functions/man.h
|
||||
plugin.o: ../functions/meta.h ../functions/mkdir.h ../functions/mv.h
|
||||
plugin.o: ../functions/nicedit.h ../functions/node.h ../functions/passwd.h
|
||||
plugin.o: ../functions/priv.h ../functions/pw.h ../functions/reload.h
|
||||
plugin.o: ../functions/rm.h ../functions/rmuser.h ../functions/sort.h
|
||||
plugin.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
plugin.o: ../functions/subject.h ../functions/template.h
|
||||
plugin.o: ../functions/imgcrop.h ../functions/last.h ../functions/login.h
|
||||
plugin.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
plugin.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
|
||||
plugin.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
|
||||
plugin.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
|
||||
plugin.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
|
||||
plugin.o: ../functions/sort.h ../functions/specialdefault.h
|
||||
plugin.o: ../functions/stat.h ../functions/subject.h ../functions/template.h
|
||||
plugin.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
|
||||
plugin.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
plugin.o: ../core/htmlfilter.h ../templates/templates.h
|
||||
@@ -532,22 +533,22 @@ plugindata.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
|
||||
plugindata.o: ../functions/privchanger.h ../functions/chown.h
|
||||
plugindata.o: ../functions/ckeditor.h ../functions/cp.h
|
||||
plugindata.o: ../functions/default.h ../functions/download.h
|
||||
plugindata.o: ../functions/emacs.h ../functions/env.h ../functions/last.h
|
||||
plugindata.o: ../functions/login.h ../functions/logout.h ../functions/ln.h
|
||||
plugindata.o: ../functions/ls.h ../functions/man.h ../functions/meta.h
|
||||
plugindata.o: ../functions/mkdir.h ../functions/mv.h ../functions/nicedit.h
|
||||
plugindata.o: ../functions/node.h ../functions/passwd.h ../functions/priv.h
|
||||
plugindata.o: ../functions/pw.h ../functions/reload.h ../functions/rm.h
|
||||
plugindata.o: ../functions/rmuser.h ../functions/sort.h
|
||||
plugindata.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
plugindata.o: ../functions/subject.h ../functions/template.h
|
||||
plugindata.o: ../functions/tinymce.h ../functions/uname.h
|
||||
plugindata.o: ../functions/upload.h ../functions/uptime.h ../functions/who.h
|
||||
plugindata.o: ../functions/vim.h ../core/htmlfilter.h
|
||||
plugindata.o: ../templates/templates.h ../templates/patterncacher.h
|
||||
plugindata.o: ../templates/indexpatterns.h ../templates/patterns.h
|
||||
plugindata.o: ../templates/changepatterns.h ../templates/htmltextstream.h
|
||||
plugindata.o: ../core/sessionmanager.h
|
||||
plugindata.o: ../functions/emacs.h ../functions/env.h ../functions/imgcrop.h
|
||||
plugindata.o: ../functions/last.h ../functions/login.h ../functions/logout.h
|
||||
plugindata.o: ../functions/ln.h ../functions/ls.h ../functions/man.h
|
||||
plugindata.o: ../functions/meta.h ../functions/mkdir.h ../functions/mv.h
|
||||
plugindata.o: ../functions/nicedit.h ../functions/node.h
|
||||
plugindata.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
|
||||
plugindata.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
|
||||
plugindata.o: ../functions/sort.h ../functions/specialdefault.h
|
||||
plugindata.o: ../functions/stat.h ../functions/subject.h
|
||||
plugindata.o: ../functions/template.h ../functions/tinymce.h
|
||||
plugindata.o: ../functions/uname.h ../functions/upload.h
|
||||
plugindata.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
plugindata.o: ../core/htmlfilter.h ../templates/templates.h
|
||||
plugindata.o: ../templates/patterncacher.h ../templates/indexpatterns.h
|
||||
plugindata.o: ../templates/patterns.h ../templates/changepatterns.h
|
||||
plugindata.o: ../templates/htmltextstream.h ../core/sessionmanager.h
|
||||
postmultiparser.o: postmultiparser.h error.h requesttypes.h
|
||||
postmultiparser.o: ../../pikotools/textstream/textstream.h
|
||||
postmultiparser.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
|
||||
@@ -610,14 +611,14 @@ request.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
|
||||
request.o: ../functions/privchanger.h ../functions/chown.h
|
||||
request.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h
|
||||
request.o: ../functions/download.h ../functions/emacs.h ../functions/env.h
|
||||
request.o: ../functions/last.h ../functions/login.h ../functions/logout.h
|
||||
request.o: ../functions/ln.h ../functions/ls.h ../functions/man.h
|
||||
request.o: ../functions/meta.h ../functions/mkdir.h ../functions/mv.h
|
||||
request.o: ../functions/nicedit.h ../functions/node.h ../functions/passwd.h
|
||||
request.o: ../functions/priv.h ../functions/pw.h ../functions/reload.h
|
||||
request.o: ../functions/rm.h ../functions/rmuser.h ../functions/sort.h
|
||||
request.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
request.o: ../functions/subject.h ../functions/template.h
|
||||
request.o: ../functions/imgcrop.h ../functions/last.h ../functions/login.h
|
||||
request.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
request.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
|
||||
request.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
|
||||
request.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
|
||||
request.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
|
||||
request.o: ../functions/sort.h ../functions/specialdefault.h
|
||||
request.o: ../functions/stat.h ../functions/subject.h ../functions/template.h
|
||||
request.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
|
||||
request.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
request.o: ../core/htmlfilter.h ../templates/templates.h
|
||||
@@ -702,7 +703,8 @@ sessionmanager.o: ../functions/chmod.h ../functions/privchanger.h
|
||||
sessionmanager.o: ../functions/chown.h ../functions/ckeditor.h
|
||||
sessionmanager.o: ../functions/cp.h ../functions/default.h
|
||||
sessionmanager.o: ../functions/download.h ../functions/emacs.h
|
||||
sessionmanager.o: ../functions/env.h ../functions/last.h ../functions/login.h
|
||||
sessionmanager.o: ../functions/env.h ../functions/imgcrop.h
|
||||
sessionmanager.o: ../functions/last.h ../functions/login.h
|
||||
sessionmanager.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
sessionmanager.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
|
||||
sessionmanager.o: ../functions/mv.h ../functions/nicedit.h
|
||||
@@ -784,14 +786,15 @@ system.o: ../functions/functionparser.h ../functions/adduser.h
|
||||
system.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h
|
||||
system.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h
|
||||
system.o: ../functions/default.h ../functions/download.h ../functions/emacs.h
|
||||
system.o: ../functions/env.h ../functions/last.h ../functions/login.h
|
||||
system.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
system.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
|
||||
system.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
|
||||
system.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
|
||||
system.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
|
||||
system.o: ../functions/sort.h ../functions/specialdefault.h
|
||||
system.o: ../functions/stat.h ../functions/subject.h ../functions/template.h
|
||||
system.o: ../functions/env.h ../functions/imgcrop.h ../functions/last.h
|
||||
system.o: ../functions/login.h ../functions/logout.h ../functions/ln.h
|
||||
system.o: ../functions/ls.h ../functions/man.h ../functions/meta.h
|
||||
system.o: ../functions/mkdir.h ../functions/mv.h ../functions/nicedit.h
|
||||
system.o: ../functions/node.h ../functions/passwd.h ../functions/priv.h
|
||||
system.o: ../functions/pw.h ../functions/reload.h ../functions/rm.h
|
||||
system.o: ../functions/rmuser.h ../functions/sort.h
|
||||
system.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
system.o: ../functions/subject.h ../functions/template.h
|
||||
system.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
|
||||
system.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
system.o: plugin.h pluginmsg.h sessionmanager.h sessioncontainer.h
|
||||
@@ -867,14 +870,14 @@ users.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
|
||||
users.o: ../functions/privchanger.h ../functions/chown.h
|
||||
users.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h
|
||||
users.o: ../functions/download.h ../functions/emacs.h ../functions/env.h
|
||||
users.o: ../functions/last.h ../functions/login.h ../functions/logout.h
|
||||
users.o: ../functions/ln.h ../functions/ls.h ../functions/man.h
|
||||
users.o: ../functions/meta.h ../functions/mkdir.h ../functions/mv.h
|
||||
users.o: ../functions/nicedit.h ../functions/node.h ../functions/passwd.h
|
||||
users.o: ../functions/priv.h ../functions/pw.h ../functions/reload.h
|
||||
users.o: ../functions/rm.h ../functions/rmuser.h ../functions/sort.h
|
||||
users.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
users.o: ../functions/subject.h ../functions/template.h
|
||||
users.o: ../functions/imgcrop.h ../functions/last.h ../functions/login.h
|
||||
users.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
users.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
|
||||
users.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
|
||||
users.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
|
||||
users.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
|
||||
users.o: ../functions/sort.h ../functions/specialdefault.h
|
||||
users.o: ../functions/stat.h ../functions/subject.h ../functions/template.h
|
||||
users.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
|
||||
users.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
users.o: ../core/htmlfilter.h ../templates/templates.h
|
||||
|
||||
69
core/app.cpp
69
core/app.cpp
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010-2012, Tomasz Sowa
|
||||
* Copyright (c) 2010-2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -366,6 +366,7 @@ void App::ProcessRequest()
|
||||
// simple operations which should not throw an exception
|
||||
templates.RequestEnd();
|
||||
cur.request->Clear();
|
||||
cur.session->ClearOnEndRequest();
|
||||
cur.session = session_manager.GetTmpSession();
|
||||
log << logendrequest;
|
||||
}
|
||||
@@ -437,6 +438,7 @@ bool sent = false;
|
||||
|
||||
if( cur.request->ajax_serializer )
|
||||
{
|
||||
log << log3 << "App: sending JSON" << logend;
|
||||
std::wstring & ajax_content = cur.request->ajax.Add(L"content", L"");
|
||||
ajax_content = cur.request->page.Str();
|
||||
cur.request->ajax_serializer->Serialize(cur.request->ajax, cur.request->ajaxpage, true);
|
||||
@@ -523,6 +525,13 @@ void App::Make()
|
||||
return;
|
||||
}
|
||||
|
||||
if( !cur.request->ajax_serializer && cur.request->ParamValue(L"reqtype") == L"json")
|
||||
{
|
||||
log << log3 << "App: using generic JSON serializer" << logend;
|
||||
ajax_generic_serializer.Clear();
|
||||
cur.request->ajax_serializer = &ajax_generic_serializer;
|
||||
}
|
||||
|
||||
plugin.Call(WINIX_CONTENT_MAKE);
|
||||
MakePage();
|
||||
|
||||
@@ -800,21 +809,29 @@ void App::SendHeadersStatic()
|
||||
}
|
||||
|
||||
|
||||
|
||||
void App::SendHeaderContentType()
|
||||
{
|
||||
switch( config.content_type_header )
|
||||
if( cur.request->ajax_serializer )
|
||||
{
|
||||
case 1:
|
||||
FCGX_PutS("Content-Type: application/xhtml+xml", fcgi_request.out);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
FCGX_PutS("Content-Type: application/xml", fcgi_request.out);
|
||||
break;
|
||||
FCGX_PutS("Content-Type: application/json", fcgi_request.out);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch( config.content_type_header )
|
||||
{
|
||||
case 1:
|
||||
FCGX_PutS("Content-Type: application/xhtml+xml", fcgi_request.out);
|
||||
break;
|
||||
|
||||
case 0:
|
||||
default:
|
||||
FCGX_PutS("Content-Type: text/html", fcgi_request.out);
|
||||
case 2:
|
||||
FCGX_PutS("Content-Type: application/xml", fcgi_request.out);
|
||||
break;
|
||||
|
||||
case 0:
|
||||
default:
|
||||
FCGX_PutS("Content-Type: text/html", fcgi_request.out);
|
||||
}
|
||||
}
|
||||
|
||||
if( config.utf8 )
|
||||
@@ -829,7 +846,6 @@ void App::SendHeadersForbidden()
|
||||
{
|
||||
FCGX_PutS("Status: 403 Forbidden\r\n", fcgi_request.out);
|
||||
SendHeaderContentType();
|
||||
log << log2 << "App: response: 403 Forbidden" << logend;
|
||||
}
|
||||
|
||||
|
||||
@@ -892,7 +908,6 @@ void App::SendHeadersNormal(Header header)
|
||||
case h_404:
|
||||
FCGX_PutS("Status: 404 Not Found\r\n", fcgi_request.out);
|
||||
SendHeaderContentType();
|
||||
log << log2 << "App: response: 404 Not Found" << logend;
|
||||
break;
|
||||
|
||||
case h_403:
|
||||
@@ -970,6 +985,9 @@ void App::FilterCompressSend(bool compressing, int compress_encoding, const std:
|
||||
else
|
||||
AssignString(*source, source_a);
|
||||
|
||||
if( config.log_server_answer )
|
||||
log << log1 << "App: the server's answer is:\n" << source_a << "\nApp: end of the server's answer" << logend;
|
||||
|
||||
if( compressing )
|
||||
compress.CompressAndPut(source_a.c_str(), source_a.length(), fcgi_request.out, compress_encoding);
|
||||
else
|
||||
@@ -1088,10 +1106,22 @@ int compress_encoding;
|
||||
SelectCompression(source->length(), compressing, compress_encoding);
|
||||
|
||||
if( status == WINIX_ERR_NO_ITEM || status == WINIX_ERR_NO_FUNCTION || status == WINIX_ERR_UNKNOWN_PARAM )
|
||||
{
|
||||
header = h_404;
|
||||
log << log2 << "App: http response: 404 Not Found" << logend;
|
||||
}
|
||||
|
||||
if( status == WINIX_ERR_PERMISSION_DENIED || status == WINIX_ERR_CANT_CHANGE_USER || status == WINIX_ERR_CANT_CHANGE_GROUP )
|
||||
{
|
||||
header = h_403;
|
||||
log << log2 << "App: http response: 403 Forbidden" << logend;
|
||||
}
|
||||
|
||||
if( cur.request->use_200_status_for_not_found_and_permission_denied && (header == h_404 || header == h_403) )
|
||||
{
|
||||
log << log3 << "App: changing the http response to: 200 OK" << logend;
|
||||
header = h_200;
|
||||
}
|
||||
|
||||
SendHeaders(compressing, compress_encoding, header);
|
||||
|
||||
@@ -1113,24 +1143,13 @@ void App::SendData(const BinaryPage & page, FCGX_Stream * out)
|
||||
BinaryPage::const_iterator i = page.begin();
|
||||
BinaryPage::const_iterator end = page.end();
|
||||
|
||||
// log << log1 << "size: " << page.size() << logend;
|
||||
|
||||
// for(size_t x=0 ; x<page.size() ; ++x)
|
||||
// log << int((unsigned char)page[x]) << ' ';
|
||||
|
||||
// log << logend;
|
||||
|
||||
while( i != end )
|
||||
{
|
||||
size_t s = 0;
|
||||
|
||||
for( ; i != end && s < buf_size ; ++i, ++s)
|
||||
{
|
||||
send_data_buf[s] = *i;
|
||||
|
||||
// log << "swinka: " << int((unsigned char)*i) << logend;
|
||||
}
|
||||
|
||||
if( s > 0 )
|
||||
FCGX_PutStr(send_data_buf.c_str(), s, fcgi_request.out);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010-2012, Tomasz Sowa
|
||||
* Copyright (c) 2010-2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -122,6 +122,7 @@ private:
|
||||
std::string sendh_t, sendh_t2, sendh_t3;
|
||||
std::string sendfilea, sendfile2a;
|
||||
std::string send_data_buf;
|
||||
PT::SpaceToJSON ajax_generic_serializer;
|
||||
|
||||
bool CheckAccessFromPlugins();
|
||||
void ProcessRequestThrow();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2012, Tomasz Sowa
|
||||
* Copyright (c) 2008-2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -113,6 +113,7 @@ void Config::AssignValues(bool stdout_is_closed)
|
||||
log_request = Int(L"log_request", 1);
|
||||
log_save_each_line = Bool(L"log_save_each_line", false);
|
||||
log_time_zone_id = Size(L"log_time_zone_id", 34);
|
||||
log_server_answer = Bool(L"log_server_answer", false);
|
||||
log_stdout = Bool(L"log_stdout", false);
|
||||
log_db_query = Bool(L"log_db_query", false);
|
||||
log_plugin_call = Bool(L"log_plugin_call", false);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2012, Tomasz Sowa
|
||||
* Copyright (c) 2008-2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -71,6 +71,10 @@ public:
|
||||
// default: 34 (Coordinated Universal Time UTC+00:00)
|
||||
size_t log_time_zone_id;
|
||||
|
||||
// put to log what server is sending back to the client (html/json etc)
|
||||
// default: false
|
||||
bool log_server_answer;
|
||||
|
||||
// logging db queries
|
||||
// default: false
|
||||
bool log_db_query;
|
||||
|
||||
389
core/image.cpp
389
core/image.cpp
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010-2012, Tomasz Sowa
|
||||
* Copyright (c) 2010-2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "log.h"
|
||||
#include "system.h"
|
||||
#include "plugin.h"
|
||||
#include "lock.h"
|
||||
|
||||
|
||||
|
||||
@@ -35,15 +36,91 @@ void Image::SetSystem(System * psystem)
|
||||
}
|
||||
|
||||
|
||||
|
||||
// first thread (objects locked)
|
||||
void Image::Resize(const Item & item, size_t cx, size_t cy, int aspect_mode, int quality)
|
||||
Image::Scale Image::GetImageScale(long dir_id)
|
||||
{
|
||||
item_temp.type = WINIX_IMAGE_TYPE_RESIZE;
|
||||
item_temp.file = item;
|
||||
item_temp.cx = cx;
|
||||
item_temp.cy = cy;
|
||||
item_temp.aspect_mode = aspect_mode;
|
||||
item_temp.quality = quality;
|
||||
Scale scale;
|
||||
|
||||
Mount * m = system->mounts.CalcMount(dir_id);
|
||||
scale.cx = config->image_cx;
|
||||
scale.cy = config->image_cy;
|
||||
scale.aspect_mode = config->image_mode;
|
||||
scale.quality = config->image_quality;
|
||||
|
||||
// reading width and height from the mount point (if exists)
|
||||
int index = system->mounts.MountParImageSize();
|
||||
|
||||
if( m && m->param[index].defined && m->param[index].arg.size() == 2 )
|
||||
{
|
||||
scale.cx = Tol(m->param[index].arg[0]);
|
||||
scale.cy = Tol(m->param[index].arg[1]);
|
||||
}
|
||||
|
||||
// reading image mode from the mount point (if exists)
|
||||
index = system->mounts.MountParImageMode();
|
||||
|
||||
if( m && m->param[index].defined && m->param[index].arg.size() == 1 )
|
||||
scale.aspect_mode = Toi(m->param[index].arg[0]);
|
||||
|
||||
// reading image quality from the mount point (if exists)
|
||||
index = system->mounts.MountParImageQuality();
|
||||
|
||||
if( m && m->param[index].defined && m->param[index].arg.size() == 1 )
|
||||
scale.quality = Toi(m->param[index].arg[0]);
|
||||
|
||||
return scale;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// first thread (objects locked)
|
||||
Image::Scale Image::GetThumbScale(long dir_id)
|
||||
{
|
||||
Scale scale;
|
||||
|
||||
Mount * m = system->mounts.CalcMount(dir_id);
|
||||
scale.cx = config->thumb_cx;
|
||||
scale.cy = config->thumb_cy;
|
||||
scale.aspect_mode = config->thumb_mode;
|
||||
scale.quality = config->thumb_quality;
|
||||
|
||||
// reading width and height from the mount point (if exists)
|
||||
int index = system->mounts.MountParThumbSize();
|
||||
|
||||
if( m && m->param[index].defined && m->param[index].arg.size() == 2 )
|
||||
{
|
||||
scale.cx = Tol(m->param[index].arg[0]);
|
||||
scale.cy = Tol(m->param[index].arg[1]);
|
||||
}
|
||||
|
||||
// reading thumb mode from the mount point (if exists)
|
||||
index = system->mounts.MountParThumbMode();
|
||||
|
||||
if( m && m->param[index].defined && m->param[index].arg.size() == 1 )
|
||||
scale.aspect_mode = Toi(m->param[index].arg[0]);
|
||||
|
||||
// reading image quality from the mount point (if exists)
|
||||
index = system->mounts.MountParThumbQuality();
|
||||
|
||||
if( m && m->param[index].defined && m->param[index].arg.size() == 1 )
|
||||
scale.quality = Toi(m->param[index].arg[0]);
|
||||
|
||||
return scale;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// first thread (objects locked)
|
||||
void Image::Resize(long file_id, size_t cx, size_t cy, int aspect_mode, int quality)
|
||||
{
|
||||
item_temp.type = WINIX_IMAGE_TYPE_RESIZE;
|
||||
item_temp.file_id = file_id;
|
||||
item_temp.cx = cx;
|
||||
item_temp.cy = cy;
|
||||
item_temp.aspect_mode = aspect_mode;
|
||||
item_temp.quality = quality;
|
||||
|
||||
CheckParam(item_temp);
|
||||
image_tab.insert(image_tab.end(), item_temp);
|
||||
@@ -51,15 +128,16 @@ void Image::Resize(const Item & item, size_t cx, size_t cy, int aspect_mode, int
|
||||
}
|
||||
|
||||
|
||||
|
||||
// first thread (objects locked)
|
||||
void Image::CreateThumb(const Item & item, size_t cx, size_t cy, int aspect_mode, int quality)
|
||||
void Image::CreateThumb(long file_id, size_t thumb_cx, size_t thumb_cy, int aspect_mode, int quality)
|
||||
{
|
||||
item_temp.type = WINIX_IMAGE_TYPE_CREATE_THUMB;
|
||||
item_temp.file = item;
|
||||
item_temp.cx = cx;
|
||||
item_temp.cy = cy;
|
||||
item_temp.aspect_mode = aspect_mode;
|
||||
item_temp.quality = quality;
|
||||
item_temp.type = WINIX_IMAGE_TYPE_CREATE_THUMB;
|
||||
item_temp.file_id = file_id;
|
||||
item_temp.thumb_cx = thumb_cx;
|
||||
item_temp.thumb_cy = thumb_cy;
|
||||
item_temp.aspect_mode = aspect_mode;
|
||||
item_temp.quality = quality;
|
||||
|
||||
CheckParam(item_temp);
|
||||
image_tab.insert(image_tab.end(), item_temp);
|
||||
@@ -68,31 +146,75 @@ void Image::CreateThumb(const Item & item, size_t cx, size_t cy, int aspect_mode
|
||||
|
||||
|
||||
|
||||
// first thread (objects locked)
|
||||
void Image::Crop(long file_id, size_t xoffset, size_t yoffset, size_t cx, size_t cy, int quality)
|
||||
{
|
||||
item_temp.type = WINIX_IMAGE_TYPE_CROP;
|
||||
item_temp.file_id = file_id;
|
||||
item_temp.xoffset = xoffset;
|
||||
item_temp.yoffset = yoffset;
|
||||
item_temp.cx = cx;
|
||||
item_temp.cy = cy;
|
||||
item_temp.quality = quality;
|
||||
|
||||
CheckParam(item_temp);
|
||||
image_tab.insert(image_tab.end(), item_temp);
|
||||
WakeUpThread();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// first thread (objects locked)
|
||||
void Image::CropThumb(long file_id, size_t xoffset, size_t yoffset, size_t cx, size_t cy, int quality)
|
||||
{
|
||||
item_temp.type = WINIX_IMAGE_TYPE_CROP_THUMB;
|
||||
item_temp.file_id = file_id;
|
||||
item_temp.xoffset = xoffset;
|
||||
item_temp.yoffset = yoffset;
|
||||
item_temp.cx = cx;
|
||||
item_temp.cy = cy;
|
||||
item_temp.quality = quality;
|
||||
|
||||
CheckParam(item_temp);
|
||||
image_tab.insert(image_tab.end(), item_temp);
|
||||
WakeUpThread();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// first thread (objects locked)
|
||||
void Image::CropNewThumb(long file_id, size_t xoffset, size_t yoffset, size_t cx, size_t cy,
|
||||
size_t thumb_cx, size_t thumb_cy, int aspect_mode, int quality)
|
||||
{
|
||||
item_temp.type = WINIX_IMAGE_TYPE_CREATE_CROP_NEW_THUMB;
|
||||
item_temp.file_id = file_id;
|
||||
item_temp.xoffset = xoffset;
|
||||
item_temp.yoffset = yoffset;
|
||||
item_temp.cx = cx;
|
||||
item_temp.cy = cy;
|
||||
item_temp.thumb_cx = thumb_cx;
|
||||
item_temp.thumb_cy = thumb_cy;
|
||||
item_temp.aspect_mode = aspect_mode;
|
||||
item_temp.quality = quality;
|
||||
|
||||
CheckParam(item_temp);
|
||||
image_tab.insert(image_tab.end(), item_temp);
|
||||
WakeUpThread();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void Image::CheckParam(ImageItem & item)
|
||||
{
|
||||
if( item.aspect_mode < 1 )
|
||||
item.aspect_mode = 1;
|
||||
|
||||
if( item.aspect_mode > 7 )
|
||||
item.aspect_mode = 7;
|
||||
|
||||
if( item.quality < 0 )
|
||||
item.quality = 0;
|
||||
|
||||
if( item.quality > 100 )
|
||||
item.quality = 100;
|
||||
|
||||
if( item_temp.cx < 5 )
|
||||
item_temp.cx = 5;
|
||||
|
||||
if( item_temp.cy < 5 )
|
||||
item_temp.cy = 5;
|
||||
|
||||
if( item_temp.cx > 10000 )
|
||||
item_temp.cx = 10000;
|
||||
|
||||
if( item_temp.cy > 10000 )
|
||||
item_temp.cy = 10000;
|
||||
SetMinMax(item.aspect_mode, 1, 7);
|
||||
SetMinMax(item.quality, 0, 100);
|
||||
SetMinMax(item.cx, 1, 30000);
|
||||
SetMinMax(item.cy, 1, 30000);
|
||||
SetMinMax(item.thumb_cx, 1, 30000);
|
||||
SetMinMax(item.thumb_cy, 1, 30000);
|
||||
SetMinMax(item.xoffset, 0, 30000);
|
||||
SetMinMax(item.yoffset, 0, 30000);
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +239,7 @@ bool end;
|
||||
|
||||
do
|
||||
{
|
||||
Lock();
|
||||
class Lock lock_object(synchro);
|
||||
|
||||
if( i != image_tab.end() )
|
||||
{
|
||||
@@ -130,7 +252,7 @@ bool end;
|
||||
end = true;
|
||||
}
|
||||
|
||||
Unlock();
|
||||
lock_object.Unlock();
|
||||
|
||||
if( !end )
|
||||
CreateImage();
|
||||
@@ -163,7 +285,8 @@ void Image::EscapePath(const std::string & path, TextStream<std::string> & out,
|
||||
if( path[i] == '"' )
|
||||
out << '\\';
|
||||
|
||||
out << path[i];
|
||||
if( path[i] != 0 )
|
||||
out << path[i];
|
||||
}
|
||||
|
||||
out << '\"';
|
||||
@@ -184,37 +307,37 @@ widthxheight! Width and height emphatically given, original aspect ratio ignor
|
||||
widthxheight> Change as per widthxheight but only if an image dimension exceeds a specified dimension.
|
||||
widthxheight< Change dimensions only if both image dimensions exceed specified dimensions.
|
||||
*/
|
||||
void Image::SelectAspect()
|
||||
void Image::SelectAspect(size_t cx, size_t cy)
|
||||
{
|
||||
switch( item_work.aspect_mode )
|
||||
{
|
||||
case WINIX_IMAGE_MODE_1:
|
||||
command << item_work.cx;
|
||||
command << cx;
|
||||
break;
|
||||
|
||||
case WINIX_IMAGE_MODE_3:
|
||||
command << item_work.cx << "x" << item_work.cy;
|
||||
command << cx << "x" << cy;
|
||||
break;
|
||||
|
||||
case WINIX_IMAGE_MODE_4:
|
||||
command << '"' << item_work.cx << "x" << item_work.cy << "^\"";
|
||||
command << '"' << cx << "x" << cy << "^\"";
|
||||
break;
|
||||
|
||||
case WINIX_IMAGE_MODE_5:
|
||||
command << '"' << item_work.cx << "x" << item_work.cy << "!\"";
|
||||
command << '"' << cx << "x" << cy << "!\"";
|
||||
break;
|
||||
|
||||
case WINIX_IMAGE_MODE_6:
|
||||
command << '"' << item_work.cx << "x" << item_work.cy << ">\"";
|
||||
command << '"' << cx << "x" << cy << ">\"";
|
||||
break;
|
||||
|
||||
case WINIX_IMAGE_MODE_7:
|
||||
command << '"' << item_work.cx << "x" << item_work.cy << "<\"";
|
||||
command << '"' << cx << "x" << cy << "<\"";
|
||||
break;
|
||||
|
||||
case WINIX_IMAGE_MODE_2:
|
||||
default:
|
||||
command << "x" << item_work.cy;
|
||||
command << "x" << cy;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -224,7 +347,17 @@ void Image::SelectAspect()
|
||||
// second thread (objects locked)
|
||||
bool Image::CreateInputFileName()
|
||||
{
|
||||
if( system->MakeFilePath(item_work.file, src_path) )
|
||||
bool thumb = (item_work.type == WINIX_IMAGE_TYPE_CROP_THUMB);
|
||||
|
||||
if( thumb && !file_work.has_thumb )
|
||||
{
|
||||
log << log1 << "Image: file id: " << file_work.id << ", url: " << file_work.url
|
||||
<< " doesn't have a thumbnail yet (skipping)" << logend;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if( system->MakeFilePath(file_work, src_path, thumb) )
|
||||
{
|
||||
PT::WideToUTF8(src_path, input_file_name);
|
||||
return true;
|
||||
@@ -237,6 +370,7 @@ bool Image::CreateInputFileName()
|
||||
}
|
||||
|
||||
|
||||
|
||||
// second thread (objects locked)
|
||||
void Image::CreateTmpFileName()
|
||||
{
|
||||
@@ -250,26 +384,17 @@ void Image::CreateTmpFileName()
|
||||
// second thread (objects are not locked)
|
||||
bool Image::CreateCommand()
|
||||
{
|
||||
Lock();
|
||||
class Lock lock_object(synchro);
|
||||
|
||||
iq.SetAll(true, false);
|
||||
iq.WhereId(item_work.file.id);
|
||||
|
||||
// !! skoro teraz i tak wczytujemy caly obiekt
|
||||
// to teraz w kolejce wystarczy zapamietywac tylko samo item.id (a nie caly obiekt item)
|
||||
iq.WhereId(item_work.file_id);
|
||||
|
||||
// the file could have been changed especially when there is a long queue of files
|
||||
if( db->GetItem(item_work.file, iq) != WINIX_ERR_OK )
|
||||
{
|
||||
Unlock();
|
||||
if( db->GetItem(file_work, iq) != WINIX_ERR_OK )
|
||||
return false;
|
||||
}
|
||||
|
||||
if( !CreateInputFileName() )
|
||||
{
|
||||
Unlock();
|
||||
return false;
|
||||
}
|
||||
|
||||
command.Clear();
|
||||
Add(config->convert_cmd, command);
|
||||
@@ -279,11 +404,38 @@ bool Image::CreateCommand()
|
||||
command << " -quiet -quality " << item_work.quality;
|
||||
|
||||
if( item_work.type == WINIX_IMAGE_TYPE_RESIZE )
|
||||
{
|
||||
command << " -resize ";
|
||||
SelectAspect(item_work.cx, item_work.cy);
|
||||
}
|
||||
else
|
||||
if( item_work.type == WINIX_IMAGE_TYPE_CREATE_THUMB )
|
||||
{
|
||||
command << " -strip -thumbnail ";
|
||||
SelectAspect(item_work.thumb_cx, item_work.thumb_cy);
|
||||
}
|
||||
else
|
||||
if( item_work.type == WINIX_IMAGE_TYPE_CROP )
|
||||
{
|
||||
command << " -crop " << item_work.cx << "x" << item_work.cy
|
||||
<< "+" << item_work.xoffset << "+" << item_work.yoffset << " +repage ";
|
||||
}
|
||||
else
|
||||
if( item_work.type == WINIX_IMAGE_TYPE_CROP_THUMB )
|
||||
{
|
||||
command << " -strip -crop " << item_work.cx << "x" << item_work.cy
|
||||
<< "+" << item_work.xoffset << "+" << item_work.yoffset
|
||||
<< " +repage ";
|
||||
}
|
||||
else
|
||||
if( item_work.type == WINIX_IMAGE_TYPE_CREATE_CROP_NEW_THUMB )
|
||||
{
|
||||
command << " -strip -crop " << item_work.cx << "x" << item_work.cy
|
||||
<< "+" << item_work.xoffset << "+" << item_work.yoffset
|
||||
<< " +repage -thumbnail ";
|
||||
SelectAspect(item_work.thumb_cx, item_work.thumb_cy);
|
||||
}
|
||||
|
||||
SelectAspect();
|
||||
CreateTmpFileName();
|
||||
|
||||
command << " ";
|
||||
@@ -291,7 +443,6 @@ bool Image::CreateCommand()
|
||||
|
||||
log << log4 << "Image: running: " << command.Str() << logend;
|
||||
|
||||
Unlock();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -299,43 +450,77 @@ return true;
|
||||
|
||||
|
||||
|
||||
// second thread (objects are locked)
|
||||
void Image::ImageSavedCorrectly()
|
||||
{
|
||||
if( item_work.type == WINIX_IMAGE_TYPE_CREATE_THUMB )
|
||||
{
|
||||
if( !file_work.has_thumb )
|
||||
{
|
||||
file_work.has_thumb = true;
|
||||
db->EditHasThumbById(true, file_work.id);
|
||||
}
|
||||
|
||||
log << log3 << "Image: generated a thumbnail: " << dst_path << logend;
|
||||
plugin.Call((Session*)0, WINIX_CREATED_THUMB, &file_work);
|
||||
}
|
||||
else
|
||||
if( item_work.type == WINIX_IMAGE_TYPE_RESIZE )
|
||||
{
|
||||
log << log3 << "Image: image resized: " << dst_path << logend;
|
||||
plugin.Call((Session*)0, WINIX_IMAGE_RESIZED, &file_work);
|
||||
}
|
||||
else
|
||||
if( item_work.type == WINIX_IMAGE_TYPE_CROP )
|
||||
{
|
||||
log << log3 << "Image: image cropped: " << dst_path << logend;
|
||||
// !! IMPROVE ME add a correct message
|
||||
//plugin.Call((Session*)0, WINIX_IMAGE_RESIZED, &file_work);
|
||||
}
|
||||
else
|
||||
if( item_work.type == WINIX_IMAGE_TYPE_CROP_THUMB )
|
||||
{
|
||||
log << log3 << "Image: image thumbnail cropped: " << dst_path << logend;
|
||||
// !! IMPROVE ME add a correct message
|
||||
//plugin.Call((Session*)0, WINIX_IMAGE_RESIZED, &file_work);
|
||||
}
|
||||
else
|
||||
if( item_work.type == WINIX_IMAGE_TYPE_CREATE_CROP_NEW_THUMB )
|
||||
{
|
||||
log << log3 << "Image: a new thumbnail from an original image was cropped: " << dst_path << logend;
|
||||
// !! IMPROVE ME add a correct message
|
||||
//plugin.Call((Session*)0, WINIX_IMAGE_RESIZED, &file_work);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// second thread (objects are not locked)
|
||||
void Image::SaveImage()
|
||||
{
|
||||
bool moved = false;
|
||||
|
||||
Lock();
|
||||
class Lock lock_object(synchro);
|
||||
|
||||
// the file could have been changed especially when creating the image lasted too long
|
||||
iq.SetAll(true, false);
|
||||
iq.WhereId(item_work.file.id);
|
||||
iq.WhereId(item_work.file_id);
|
||||
|
||||
if( db->GetItem(item_work.file, iq) == WINIX_ERR_OK )
|
||||
if( db->GetItem(file_work, iq) == WINIX_ERR_OK )
|
||||
{
|
||||
bool thumb = (item_work.type == WINIX_IMAGE_TYPE_CREATE_THUMB);
|
||||
bool thumb = (item_work.type == WINIX_IMAGE_TYPE_CREATE_THUMB ||
|
||||
item_work.type == WINIX_IMAGE_TYPE_CROP_THUMB ||
|
||||
item_work.type == WINIX_IMAGE_TYPE_CREATE_CROP_NEW_THUMB );
|
||||
|
||||
if( system->MakeFilePath(item_work.file, dst_path, thumb, true, config->upload_dirs_chmod) )
|
||||
if( system->MakeFilePath(file_work, dst_path, thumb, true, config->upload_dirs_chmod) )
|
||||
{
|
||||
if( RenameFile(stream_tmp_path.Str(), dst_path) )
|
||||
{
|
||||
if( thumb )
|
||||
{
|
||||
item_work.file.has_thumb = true;
|
||||
db->EditHasThumbById(true, item_work.file.id);
|
||||
log << log3 << "Image: generated a thumbnail: " << dst_path << logend;
|
||||
plugin.Call((Session*)0, WINIX_CREATED_THUMB, &item_work.file);
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log3 << "Image: image resized: " << dst_path << logend;
|
||||
plugin.Call((Session*)0, WINIX_IMAGE_RESIZED, &item_work.file);
|
||||
}
|
||||
|
||||
moved = true;
|
||||
ImageSavedCorrectly();
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log1 << "Image: cannot move a temporary file: " << stream_tmp_path.Str() << ", to: " << dst_path << logend;
|
||||
log << log1 << "Image: cannot move a temporary file: " << stream_tmp_path.Str()
|
||||
<< ", to: " << dst_path << logend;
|
||||
|
||||
::RemoveFile(stream_tmp_path.Str());
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -343,11 +528,6 @@ bool moved = false;
|
||||
log << log1 << "Image: cannot create a destination path" << logend;
|
||||
}
|
||||
}
|
||||
|
||||
if( !moved )
|
||||
::RemoveFile(stream_tmp_path.Str());
|
||||
|
||||
Unlock();
|
||||
}
|
||||
|
||||
|
||||
@@ -355,21 +535,20 @@ bool moved = false;
|
||||
// second thread (objects are not locked)
|
||||
void Image::CreateImage()
|
||||
{
|
||||
if( !CreateCommand() )
|
||||
return;
|
||||
|
||||
int res = std::system(command.CStr());
|
||||
|
||||
if( res == 0 )
|
||||
if( CreateCommand() )
|
||||
{
|
||||
SaveImage();
|
||||
}
|
||||
else
|
||||
{
|
||||
Lock();
|
||||
log << log3 << "Image: some problems with creating an image"
|
||||
<< ", 'convert' process returned: " << res << logend;
|
||||
Unlock();
|
||||
int res = std::system(command.CStr());
|
||||
|
||||
if( res == 0 )
|
||||
{
|
||||
SaveImage();
|
||||
}
|
||||
else
|
||||
{
|
||||
class Lock lock_object(synchro);
|
||||
log << log3 << "Image: some problems with creating an image"
|
||||
<< ", 'convert' process returned: " << res << logend;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
80
core/image.h
80
core/image.h
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010-2011, Tomasz Sowa
|
||||
* Copyright (c) 2010-2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -22,7 +22,7 @@
|
||||
class System;
|
||||
|
||||
|
||||
|
||||
// aspect modes:
|
||||
// Width given, height automagically selected to preserve aspect ratio.
|
||||
#define WINIX_IMAGE_MODE_1 1
|
||||
|
||||
@@ -45,25 +45,74 @@ class System;
|
||||
#define WINIX_IMAGE_MODE_7 7
|
||||
|
||||
|
||||
|
||||
|
||||
// resizing
|
||||
#define WINIX_IMAGE_TYPE_RESIZE 1
|
||||
|
||||
// generating a thumbnail
|
||||
#define WINIX_IMAGE_TYPE_CREATE_THUMB 2
|
||||
|
||||
// cropping an image
|
||||
#define WINIX_IMAGE_TYPE_CROP 3
|
||||
|
||||
// cropping an thumbnail
|
||||
#define WINIX_IMAGE_TYPE_CROP_THUMB 4
|
||||
|
||||
// creating by cropping a new thumbnail (from an original image)
|
||||
#define WINIX_IMAGE_TYPE_CREATE_CROP_NEW_THUMB 5
|
||||
|
||||
|
||||
/*
|
||||
|
||||
*/
|
||||
class Image : public BaseThread
|
||||
{
|
||||
public:
|
||||
|
||||
struct Scale
|
||||
{
|
||||
size_t cx;
|
||||
size_t cy;
|
||||
int aspect_mode;
|
||||
int quality;
|
||||
|
||||
Scale()
|
||||
{
|
||||
cx = cy = 1;
|
||||
aspect_mode = 2;
|
||||
quality = 100;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
void SetDb(Db * pdb);
|
||||
void SetConfig(Config * pconfig);
|
||||
void SetSystem(System * psystem);
|
||||
|
||||
void Resize(const Item & item, size_t cx, size_t cy, int aspect_mode, int quality);
|
||||
void CreateThumb(const Item & item, size_t cx, size_t cy, int aspect_mode, int quality);
|
||||
|
||||
// returning scale info for a directory
|
||||
Scale GetImageScale(long dir_id);
|
||||
|
||||
// returning scale info (for thumbnails) for a directory
|
||||
Scale GetThumbScale(long dir_id);
|
||||
|
||||
|
||||
|
||||
void Resize(long file_id, size_t cx, size_t cy, int aspect_mode, int quality);
|
||||
|
||||
// creating a new thumbnail from an original image
|
||||
void CreateThumb(long file_id, size_t thumb_cx, size_t thumb_cy, int aspect_mode, int quality);
|
||||
|
||||
// cropping an image (the thumbnail is not changed)
|
||||
void Crop(long file_id, size_t xoffset, size_t yoffset, size_t cx, size_t cy, int quality);
|
||||
|
||||
// cropping an existing thumbnail
|
||||
void CropThumb(long file_id, size_t xoffset, size_t yoffset, size_t cx, size_t cy, int quality);
|
||||
|
||||
// creating and cropping a new thumbnail (from an original image)
|
||||
void CropNewThumb(long file_id, size_t xoffset, size_t yoffset, size_t cx, size_t cy,
|
||||
size_t thumb_cx, size_t thumb_cy, int aspect_mode, int quality);
|
||||
|
||||
|
||||
private:
|
||||
@@ -75,13 +124,29 @@ private:
|
||||
struct ImageItem
|
||||
{
|
||||
int type; // WINIX_IMAGE_TYPE_*
|
||||
Item file;
|
||||
long file_id;
|
||||
size_t cx;
|
||||
size_t cy;
|
||||
size_t xoffset; // xoffset and yoffset are used when cropping
|
||||
size_t yoffset;
|
||||
size_t thumb_cx;
|
||||
size_t thumb_cy;
|
||||
int aspect_mode;
|
||||
int quality;
|
||||
};
|
||||
|
||||
|
||||
template<typename int_type>
|
||||
void SetMinMax(int_type & var, int var_min, int var_max)
|
||||
{
|
||||
if( static_cast<int>(var) < var_min )
|
||||
var = var_min;
|
||||
|
||||
if( static_cast<int>(var) > var_max )
|
||||
var = var_max;
|
||||
}
|
||||
|
||||
|
||||
// queue of thumbnails to create
|
||||
typedef std::list<ImageItem> ImageTab;
|
||||
ImageTab image_tab;
|
||||
@@ -96,6 +161,7 @@ private:
|
||||
std::string add_tempa;
|
||||
std::string input_file_name;
|
||||
std::string tmp_file_name;
|
||||
Item file_work;
|
||||
|
||||
virtual bool SignalReceived();
|
||||
virtual void Do();
|
||||
@@ -104,10 +170,12 @@ private:
|
||||
void CreateTmpFileName();
|
||||
void SaveImage();
|
||||
void CreateImage();
|
||||
void SelectAspect();
|
||||
void SelectAspect(size_t cx, size_t cy);
|
||||
void EscapePath(const std::string & path, TextStream<std::string> & out, bool clear_stream = true);
|
||||
void CheckParam(ImageItem & item);
|
||||
void Add(const std::wstring & in, TextStream<std::string> & out);
|
||||
void ImageSavedCorrectly();
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
IPBanContainer::IPBanContainer()
|
||||
{
|
||||
is_ipban_tab_sorted = false;
|
||||
is_ipban_tab_sorted = true; // an empty list is sorted
|
||||
soft_max_size = 100;
|
||||
max_size = 110;
|
||||
}
|
||||
@@ -49,6 +49,7 @@ IPBan & IPBanContainer::AddIP(int ip)
|
||||
RemoveOldRecords();
|
||||
|
||||
ipban_tab.push_back(ip_ban);
|
||||
is_ipban_tab_sorted = false;
|
||||
return ipban_tab.back();
|
||||
}
|
||||
else
|
||||
@@ -58,12 +59,35 @@ IPBan & IPBanContainer::AddIP(int ip)
|
||||
}
|
||||
|
||||
|
||||
void IPBanContainer::RemoveIP(int ip)
|
||||
{
|
||||
IPBan * ipban = FindIP(ip);
|
||||
|
||||
if( ipban )
|
||||
{
|
||||
size_t index = ipban - &ipban_tab[0];
|
||||
ipban_tab.erase(ipban_tab.begin() + index);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool IPBanContainer::IsSorted()
|
||||
{
|
||||
return is_ipban_tab_sorted;
|
||||
}
|
||||
|
||||
|
||||
void IPBanContainer::Clear()
|
||||
{
|
||||
ipban_tab.clear();
|
||||
is_ipban_tab_sorted = true;
|
||||
}
|
||||
|
||||
|
||||
// we need to remove some old records for the size of the container
|
||||
// to be less or equal to soft_max_size
|
||||
void IPBanContainer::RemoveOldRecords()
|
||||
{
|
||||
PrintTab();
|
||||
|
||||
size_t to_remove = 0;
|
||||
|
||||
if( ipban_tab.size() >= soft_max_size )
|
||||
@@ -71,35 +95,22 @@ void IPBanContainer::RemoveOldRecords()
|
||||
|
||||
if( to_remove > 0 )
|
||||
{
|
||||
log << log4 << "we are going to remove: " << to_remove << " records" << logend;
|
||||
|
||||
sort_helper_tab.resize(ipban_tab.size());
|
||||
|
||||
for(size_t i=0 ; i<ipban_tab.size() ; ++i)
|
||||
sort_helper_tab[i] = i;
|
||||
|
||||
std::sort(sort_helper_tab.begin(), sort_helper_tab.end(), SortByLastUsedHelper(this));
|
||||
PrintTab2();
|
||||
sort_helper_tab.resize(to_remove);
|
||||
std::sort(sort_helper_tab.begin(), sort_helper_tab.end());
|
||||
PrintTab2();
|
||||
|
||||
|
||||
while( to_remove-- > 0 )
|
||||
{
|
||||
log << log4 << "removing record index: " << sort_helper_tab[to_remove] << ", last_used: ";
|
||||
PT::Date date(ipban_tab[sort_helper_tab[to_remove]].last_used);
|
||||
log << date << logend;
|
||||
|
||||
ipban_tab.erase(ipban_tab.begin() + sort_helper_tab[to_remove]);
|
||||
}
|
||||
|
||||
log << log4 << "after removing we have: " << logend;
|
||||
PrintTab();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// for debug purposes
|
||||
void IPBanContainer::PrintTab()
|
||||
{
|
||||
log << log4 << "ipban_tab (size: " << ipban_tab.size() << ")" << logend;
|
||||
@@ -116,6 +127,8 @@ void IPBanContainer::PrintTab()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// for debug purposes
|
||||
void IPBanContainer::PrintTab2()
|
||||
{
|
||||
log << log4 << "sort_helper_tab (size: " << sort_helper_tab.size() << ")" << logend;
|
||||
|
||||
@@ -27,7 +27,9 @@ public:
|
||||
size_t Size();
|
||||
IPBan & GetIPBan(size_t index);
|
||||
void SetMaxSize(size_t soft_size, size_t size);
|
||||
|
||||
void RemoveIP(int ip);
|
||||
void Clear();
|
||||
bool IsSorted();
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ void Item::Clear()
|
||||
html_template.clear();
|
||||
sort_index = 0;
|
||||
meta.Clear();
|
||||
ameta.Clear();
|
||||
|
||||
SetDateToNow();
|
||||
}
|
||||
|
||||
@@ -98,6 +98,7 @@ struct Item
|
||||
|
||||
// meta information
|
||||
PT::Space meta;
|
||||
PT::Space ameta;
|
||||
|
||||
|
||||
// methods
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2012, Tomasz Sowa
|
||||
* Copyright (c) 2008-2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fstream>
|
||||
#include <cstdlib>
|
||||
#include "misc.h"
|
||||
#include "log.h"
|
||||
#include "templates/templates.h"
|
||||
@@ -77,6 +78,34 @@ long Tol(const wchar_t * str, int base)
|
||||
|
||||
|
||||
|
||||
double Tod(const std::string & str)
|
||||
{
|
||||
return strtod(str.c_str(), 0);
|
||||
}
|
||||
|
||||
|
||||
double Tod(const std::wstring & str)
|
||||
{
|
||||
return wcstold(str.c_str(), 0);
|
||||
}
|
||||
|
||||
|
||||
double Tod(const char * str)
|
||||
{
|
||||
return strtod(str, 0);
|
||||
}
|
||||
|
||||
|
||||
double Tod(const wchar_t * str)
|
||||
{
|
||||
return wcstold(str, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const wchar_t * Toa(unsigned int value, int base)
|
||||
{
|
||||
|
||||
62
core/misc.h
62
core/misc.h
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2012, Tomasz Sowa
|
||||
* Copyright (c) 2008-2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -38,6 +38,11 @@ long Tol(const std::wstring & str, int base = 10);
|
||||
long Tol(const char * str, int base = 10);
|
||||
long Tol(const wchar_t * str, int base = 10);
|
||||
|
||||
double Tod(const std::string & str);
|
||||
double Tod(const std::wstring & str);
|
||||
double Tod(const char * str);
|
||||
double Tod(const wchar_t * str);
|
||||
|
||||
|
||||
// if the buffer is too small it will be terminated at the beginning (empty string)
|
||||
// and the function returns false
|
||||
@@ -234,6 +239,7 @@ PT::WTextStream IPToStr(unsigned int ip);
|
||||
PT::WTextStream IPToStr(int ip);
|
||||
|
||||
|
||||
|
||||
bool IsWhite(wchar_t s);
|
||||
bool IsWhite(const wchar_t * str, bool treat_new_line_as_white = false);
|
||||
bool IsWhite(const std::wstring & str, bool treat_new_line_as_white = false);
|
||||
@@ -271,7 +277,24 @@ typename StringType::size_type i;
|
||||
|
||||
|
||||
template<class StringType>
|
||||
void Trim(StringType & s, wchar_t c)
|
||||
void TrimFirst(StringType & s, wchar_t c)
|
||||
{
|
||||
typename StringType::size_type i;
|
||||
|
||||
if( s.empty() )
|
||||
return;
|
||||
|
||||
// looking for the 'c' characters at the beginning
|
||||
for(i=0 ; i<s.size() && s[i]==c ; ++i);
|
||||
|
||||
// deleting the 'c' characters at the beginning
|
||||
if( i != 0 )
|
||||
s.erase(0, i);
|
||||
}
|
||||
|
||||
|
||||
template<class StringType>
|
||||
void TrimLast(StringType & s, wchar_t c)
|
||||
{
|
||||
typename StringType::size_type i;
|
||||
|
||||
@@ -291,16 +314,23 @@ typename StringType::size_type i;
|
||||
// deleting 'c' characters at the end
|
||||
if( i != s.size() - 1 )
|
||||
s.erase(i+1, StringType::npos);
|
||||
|
||||
// looking for the 'c' characters at the beginning
|
||||
for(i=0 ; i<s.size() && s[i]==c ; ++i);
|
||||
|
||||
// deleting the 'c' characters at the beginning
|
||||
if( i != 0 )
|
||||
s.erase(0, i);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<class StringType>
|
||||
void Trim(StringType & s, wchar_t c)
|
||||
{
|
||||
if( s.empty() )
|
||||
return;
|
||||
|
||||
TrimLast(s, c);
|
||||
TrimFirst(s, c);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
template<class StringType>
|
||||
void MaxSize(StringType & str, size_t max_size)
|
||||
{
|
||||
@@ -970,4 +1000,18 @@ size_t i1, i2;
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename IntType>
|
||||
void SetMinMax(IntType & val, IntType min_val, IntType max_val)
|
||||
{
|
||||
if( val < min_val )
|
||||
val = min_val;
|
||||
|
||||
if( val > max_val )
|
||||
val = max_val;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -149,7 +149,9 @@ bool Rebus::CheckRebus()
|
||||
if( IsAnswerOk(cur->session->rebus_item, cur->request->PostVar(L"rebus")) )
|
||||
return true;
|
||||
|
||||
log << log1 << "Rebus: rebus has an incorrect answer" << logend;
|
||||
log << log1 << "Rebus: rebus has an incorrect answer, expected: "
|
||||
<< cur->session->rebus_item->answer << logend;
|
||||
|
||||
// don't add cur->session->spam_score when the rebus has incorrect answer
|
||||
// a user could have made a mistake
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2012, Tomasz Sowa
|
||||
* Copyright (c) 2008-2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -129,6 +129,7 @@ void Request::Clear()
|
||||
gen_use_special_chars = false;
|
||||
|
||||
ip = 0;
|
||||
use_200_status_for_not_found_and_permission_denied = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2012, Tomasz Sowa
|
||||
* Copyright (c) 2008-2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -160,12 +160,17 @@ struct Request
|
||||
// used as a JSON output (when ajax_serializer is defined)
|
||||
// it will be serialized and have at least:
|
||||
// 'content' string - the whole html content
|
||||
// 'http_status' integer - http status code (e.g. 200)
|
||||
// 'http_status' integer - http status code (e.g. 200) !! FIXME this is not added at the moment
|
||||
PT::Space ajax;
|
||||
|
||||
// if not null then the request will have a JSON as an output
|
||||
PT::SpaceToJSON * ajax_serializer;
|
||||
|
||||
// if this variable is true then winix always return 200 OK header
|
||||
// when the status would be 404 (not found) or 403 (permission denied)
|
||||
// default: false
|
||||
bool use_200_status_for_not_found_and_permission_denied;
|
||||
|
||||
// options used by ezc generators
|
||||
bool gen_trim_white;
|
||||
bool gen_skip_new_line;
|
||||
|
||||
@@ -85,3 +85,10 @@ void Session::Clear(bool clear_plugin_data)
|
||||
}
|
||||
|
||||
|
||||
// clearing some variables when a request is ended (just for safety)
|
||||
void Session::ClearOnEndRequest()
|
||||
{
|
||||
// ip_ban list can be sorted by SessionManager (in the special thread)
|
||||
ip_ban = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ struct Session
|
||||
|
||||
void SetTimesTo(time_t time);
|
||||
void Clear(bool clear_plugin_data = true);
|
||||
void ClearOnEndRequest();
|
||||
|
||||
|
||||
// 0 - means that there is a temporary session
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2012, Tomasz Sowa
|
||||
* Copyright (c) 2008-2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -89,7 +89,7 @@ long id;
|
||||
{
|
||||
if( sizeof(long) == 8 )
|
||||
{
|
||||
id = ((unsigned long)std::rand()) << 32 + std::rand();
|
||||
id = (((unsigned long)std::rand()) << 32) + std::rand();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -460,8 +460,16 @@ IPBan & SessionManager::GetIPBan(size_t index)
|
||||
}
|
||||
|
||||
|
||||
void SessionManager::RemoveIPBan(int ip)
|
||||
{
|
||||
ban_tab.RemoveIP(ip);
|
||||
}
|
||||
|
||||
|
||||
void SessionManager::ClearIPBanList()
|
||||
{
|
||||
ban_tab.Clear();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@@ -488,6 +496,7 @@ SessionContainer::Iterator i;
|
||||
{
|
||||
Lock();
|
||||
|
||||
CheckWheterIPListIsSorted();
|
||||
CheckSession(i);
|
||||
exit = synchro->was_stop_signal;
|
||||
|
||||
@@ -496,6 +505,17 @@ SessionContainer::Iterator i;
|
||||
}
|
||||
|
||||
|
||||
// objects locked
|
||||
void SessionManager::CheckWheterIPListIsSorted()
|
||||
{
|
||||
if( !ban_tab.IsSorted() )
|
||||
{
|
||||
log << log4 << "SM: sorting the ban list" << logend;
|
||||
ban_tab.Sort();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// it's called from the other thread (with Lock and Unlock)
|
||||
void SessionManager::CheckSession(SessionContainer::Iterator & i)
|
||||
{
|
||||
|
||||
@@ -62,7 +62,8 @@ public:
|
||||
IPBan & AddIPToBanList(int ip);
|
||||
size_t BanListSize();
|
||||
IPBan & GetIPBan(size_t index);
|
||||
|
||||
void RemoveIPBan(int ip);
|
||||
void ClearIPBanList();
|
||||
|
||||
private:
|
||||
|
||||
@@ -96,6 +97,7 @@ private:
|
||||
void CheckSession(SessionContainer::Iterator & i);
|
||||
bool IsSessionOutdated(const Session & s) const;
|
||||
void DeleteSession(Session * del_session);
|
||||
void CheckWheterIPListIsSorted();
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ bool ssl = false;
|
||||
/*
|
||||
postfix will not be UrlEncoded
|
||||
*/
|
||||
void System::RedirectTo(const Item & item, const wchar_t * postfix)
|
||||
void System::RedirectTo(const Item & item, const wchar_t * postfix, bool use_reqtype)
|
||||
{
|
||||
PutUrlProto(config->use_ssl, cur->request->redirect_to);
|
||||
|
||||
@@ -176,6 +176,12 @@ void System::RedirectTo(const Item & item, const wchar_t * postfix)
|
||||
|
||||
if( postfix )
|
||||
cur->request->redirect_to += postfix;
|
||||
|
||||
if( use_reqtype && cur->request->IsParam(L"reqtype") )
|
||||
{
|
||||
cur->request->redirect_to += L"/-/reqtype:";
|
||||
cur->request->redirect_to += cur->request->ParamValue(L"reqtype");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -183,7 +189,7 @@ void System::RedirectTo(const Item & item, const wchar_t * postfix)
|
||||
/*
|
||||
postfix will not be UrlEncoded
|
||||
*/
|
||||
void System::RedirectTo(long item_id, const wchar_t * postfix)
|
||||
void System::RedirectTo(long item_id, const wchar_t * postfix, bool use_reqtype)
|
||||
{
|
||||
PutUrlProto(config->use_ssl, cur->request->redirect_to);
|
||||
|
||||
@@ -224,6 +230,12 @@ void System::RedirectTo(long item_id, const wchar_t * postfix)
|
||||
|
||||
if( postfix )
|
||||
cur->request->redirect_to += postfix;
|
||||
|
||||
if( use_reqtype && cur->request->IsParam(L"reqtype") )
|
||||
{
|
||||
cur->request->redirect_to += L"/-/reqtype:";
|
||||
cur->request->redirect_to += cur->request->ParamValue(L"reqtype");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -231,7 +243,7 @@ void System::RedirectTo(long item_id, const wchar_t * postfix)
|
||||
/*
|
||||
url will not be UrlEncoded
|
||||
*/
|
||||
void System::RedirectTo(const wchar_t * url)
|
||||
void System::RedirectTo(const wchar_t * url, bool use_reqtype)
|
||||
{
|
||||
PutUrlProto(config->use_ssl, cur->request->redirect_to);
|
||||
|
||||
@@ -262,15 +274,21 @@ void System::RedirectTo(const wchar_t * url)
|
||||
cur->request->redirect_to += url;
|
||||
}
|
||||
}
|
||||
|
||||
if( use_reqtype && cur->request->IsParam(L"reqtype") )
|
||||
{
|
||||
cur->request->redirect_to += L"/-/reqtype:";
|
||||
cur->request->redirect_to += cur->request->ParamValue(L"reqtype");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
url will not be UrlEncoded
|
||||
*/
|
||||
void System::RedirectTo(const std::wstring & url)
|
||||
void System::RedirectTo(const std::wstring & url, bool use_reqtype)
|
||||
{
|
||||
RedirectTo(url.c_str());
|
||||
RedirectTo(url.c_str(), use_reqtype);
|
||||
}
|
||||
|
||||
|
||||
@@ -324,20 +342,54 @@ void System::RedirectWithFunctionAndParamsTo(const std::wstring & url)
|
||||
}
|
||||
|
||||
|
||||
void System::RedirectToLastDir()
|
||||
void System::RedirectToLastDir(const wchar_t * postfix, bool use_reqtype)
|
||||
{
|
||||
if( !cur->request->dir_tab.empty() )
|
||||
RedirectTo( *cur->request->dir_tab.back() );
|
||||
RedirectTo( *cur->request->dir_tab.back(), postfix, use_reqtype);
|
||||
}
|
||||
|
||||
|
||||
void System::RedirectToLastItem()
|
||||
void System::RedirectToLastItem(const wchar_t * postfix, bool use_reqtype)
|
||||
{
|
||||
if( cur->request->last_item )
|
||||
RedirectTo( *cur->request->last_item );
|
||||
RedirectTo( *cur->request->last_item, postfix, use_reqtype );
|
||||
}
|
||||
|
||||
|
||||
void System::RedirectToLastFunction(const wchar_t * postfix, bool use_reqtype)
|
||||
{
|
||||
RedirectToLastDir(0, false);
|
||||
TrimLast(cur->request->redirect_to, '/');
|
||||
|
||||
if( cur->request->is_item )
|
||||
{
|
||||
cur->request->redirect_to += '/';
|
||||
cur->request->redirect_to += cur->request->item.url;
|
||||
}
|
||||
|
||||
if( cur->request->function )
|
||||
{
|
||||
cur->request->redirect_to += '/';
|
||||
cur->request->redirect_to += cur->request->function->fun.url;
|
||||
}
|
||||
|
||||
if( postfix )
|
||||
{
|
||||
cur->request->redirect_to += '/';
|
||||
cur->request->redirect_to += postfix;
|
||||
}
|
||||
|
||||
if( use_reqtype && cur->request->IsParam(L"reqtype") )
|
||||
{
|
||||
if( !cur->request->function && !postfix )
|
||||
cur->request->redirect_to += L"/-";
|
||||
|
||||
cur->request->redirect_to += L"/reqtype:";
|
||||
cur->request->redirect_to += cur->request->ParamValue(L"reqtype");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
bool System::CanChangeUser(const Item & item, long new_user_id)
|
||||
{
|
||||
|
||||
@@ -90,14 +90,16 @@ public:
|
||||
void AddParams(const ParamTab & param_tab, std::wstring & str, bool clear_str = true);
|
||||
|
||||
void PutUrlProto(bool can_use_ssl, std::wstring & str, bool clear_str = true);
|
||||
void RedirectTo(const Item & item, const wchar_t * postfix = 0);
|
||||
void RedirectTo(long item_id, const wchar_t * postfix = 0);
|
||||
void RedirectTo(const wchar_t * url);
|
||||
void RedirectTo(const std::wstring & url);
|
||||
void RedirectTo(const Item & item, const wchar_t * postfix = 0, bool use_reqtype = true);
|
||||
void RedirectTo(long item_id, const wchar_t * postfix = 0, bool use_reqtype = true);
|
||||
void RedirectTo(const wchar_t * url, bool use_reqtype = true);
|
||||
void RedirectTo(const std::wstring & url, bool use_reqtype = true);
|
||||
void RedirectWithFunctionAndParamsTo(const wchar_t * url);
|
||||
void RedirectWithFunctionAndParamsTo(const std::wstring & url);
|
||||
void RedirectToLastDir();
|
||||
void RedirectToLastItem(); // redirect to an item if exists or to the last directory
|
||||
void RedirectToLastDir(const wchar_t * postfix = 0, bool use_reqtype = true);
|
||||
void RedirectToLastItem(const wchar_t * postfix = 0, bool use_reqtype = true); // redirect to an item if exists or to the last directory
|
||||
void RedirectToLastFunction(const wchar_t * postfix = 0, bool use_reqtype = true);
|
||||
|
||||
|
||||
bool CanChangeUser(const Item & item, long new_user_id);
|
||||
bool CanChangeGroup(const Item & item, long new_group_id);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2012, Tomasz Sowa
|
||||
* Copyright (c) 2008-2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#define WINIX_VER_MAJOR 0
|
||||
#define WINIX_VER_MINOR 5
|
||||
#define WINIX_VER_REVISION 1
|
||||
#define WINIX_VER_REVISION 4
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
25
db/db.cpp
25
db/db.cpp
@@ -311,7 +311,7 @@ Error Db::AddItemIntoItem(Item & item)
|
||||
query.Clear();
|
||||
query << R("insert into core.item (user_id, modification_user_id, group_id, privileges, "
|
||||
"date_creation, date_modification, type, parent_id, content_id, "
|
||||
"link_to, link_redirect, subject, guest_name, template, sort_index, meta, url) values (")
|
||||
"link_to, link_redirect, subject, guest_name, template, sort_index, meta, ameta, url) values (")
|
||||
<< item.user_id
|
||||
<< item.modification_user_id
|
||||
<< item.group_id
|
||||
@@ -327,7 +327,8 @@ Error Db::AddItemIntoItem(Item & item)
|
||||
<< item.guest_name
|
||||
<< item.html_template
|
||||
<< item.sort_index
|
||||
<< item.meta;
|
||||
<< item.meta
|
||||
<< item.ameta;
|
||||
|
||||
url_without_id = AddItemCreateUrlSubject(item);
|
||||
|
||||
@@ -469,7 +470,7 @@ Error Db::EditItemInItem(Item & item, bool with_url)
|
||||
query.Clear();
|
||||
query << R("update core.item set (user_id, modification_user_id, group_id, privileges, "
|
||||
"date_creation, date_modification, type, link_to, link_redirect, parent_id, subject, "
|
||||
"guest_name, template, sort_index, meta");
|
||||
"guest_name, template, sort_index, meta, ameta");
|
||||
|
||||
if( with_url )
|
||||
query << R(", url");
|
||||
@@ -489,7 +490,8 @@ Error Db::EditItemInItem(Item & item, bool with_url)
|
||||
<< item.guest_name
|
||||
<< item.html_template
|
||||
<< item.sort_index
|
||||
<< item.meta;
|
||||
<< item.meta
|
||||
<< item.ameta;
|
||||
|
||||
if( with_url )
|
||||
{
|
||||
@@ -771,7 +773,7 @@ void Db::GetItemsQuerySelect(const DbItemQuery & iq, DbTextStream & query, bool
|
||||
if( iq.sel_file ) query << R(", file_path, file_fs, file_type, has_thumb, hash, hash_type, file_size");
|
||||
if( iq.sel_html_template ) query << R(", template");
|
||||
if( iq.sel_sort_index ) query << R(", sort_index");
|
||||
if( iq.sel_meta ) query << R(", meta");
|
||||
if( iq.sel_meta ) query << R(", meta, ameta");
|
||||
}
|
||||
|
||||
query << R(" from core.item");
|
||||
@@ -1343,6 +1345,19 @@ return DoCommand(query);
|
||||
}
|
||||
|
||||
|
||||
Error Db::EditAdminMetaById(const PT::Space & ameta, long id)
|
||||
{
|
||||
query.Clear();
|
||||
query << R("update core.item set (ameta) = (")
|
||||
<< ameta
|
||||
<< R(") where id=")
|
||||
<< id
|
||||
<< R(";");
|
||||
|
||||
return DoCommand(query);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Error Db::EditSubjectById(Item & item, long id)
|
||||
|
||||
1
db/db.h
1
db/db.h
@@ -72,6 +72,7 @@ public:
|
||||
Error EditFileById(const Item & item, long id); // file_path, file_fs, file_type
|
||||
Error EditHasThumbById(bool has_thumb, long id);
|
||||
Error EditMetaById(const PT::Space & meta, long id);
|
||||
Error EditAdminMetaById(const PT::Space & meta, long id);
|
||||
|
||||
Error DelDirById(long id);
|
||||
Error DelFileById(long file_id);
|
||||
|
||||
@@ -76,7 +76,7 @@ void DbConn::WaitForConnection()
|
||||
{
|
||||
if( !pg_conn || PQstatus(pg_conn) != CONNECTION_OK )
|
||||
{
|
||||
log << log3 << "Db: waiting for the db to be ready...." << logend;
|
||||
log << log3 << "Db: waiting for the db to be ready...." << logend << logsave;
|
||||
|
||||
while( !AssertConnection(false, false) )
|
||||
sleep(5);
|
||||
|
||||
@@ -46,6 +46,7 @@ void DbItemColumns::SetColumns(PGresult * r)
|
||||
modify_index = PQfnumber(r, "modify_index");
|
||||
sort_index = PQfnumber(r, "sort_index");
|
||||
meta = PQfnumber(r, "meta");
|
||||
ameta = PQfnumber(r, "ameta");
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +83,8 @@ void DbItemColumns::SetItem(PGresult * r, long row, Item & item)
|
||||
if( html_template != -1 ) DbBase::AssertValueWide(r, row, html_template, item.html_template);
|
||||
if( sort_index != -1 ) item.sort_index = DbBase::AssertValueInt(r, row, sort_index);
|
||||
|
||||
if( meta != -1 ) db_base.AssertValueSpace(r, row, meta, item.meta);
|
||||
if( meta != -1 ) db_base.AssertValueSpace(r, row, meta, item.meta);
|
||||
if( ameta != -1 ) db_base.AssertValueSpace(r, row, ameta, item.ameta);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ struct DbItemColumns
|
||||
int modify_index;
|
||||
int sort_index;
|
||||
int meta;
|
||||
int ameta;
|
||||
|
||||
DbItemColumns(DbBase & db_base_) : db_base(db_base_)
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ struct DbItemQuery
|
||||
bool sel_file; // file_path, file_fs, file_type, has_thumb, hash, hash_type, file_size
|
||||
bool sel_html_template; // template
|
||||
bool sel_sort_index; // sort_index
|
||||
bool sel_meta; // meta PT::Space
|
||||
bool sel_meta; // meta and ameta (PT::Space)
|
||||
|
||||
bool where_id; //
|
||||
bool where_parent_id; //
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1 +1 @@
|
||||
o = adduser.o cat.o chmod.o chown.o ckeditor.o cp.o default.o download.o emacs.o env.o functionbase.o functionparser.o functions.o ipban.o last.o ln.o locale.o login.o logout.o ls.o man.o meta.o mkdir.o mount.o mv.o nicedit.o node.o passwd.o priv.o privchanger.o pw.o reload.o rm.o rmuser.o run.o sort.o specialdefault.o stat.o subject.o template.o timezone.o tinymce.o uname.o upload.o uptime.o vim.o who.o
|
||||
o = adduser.o cat.o chmod.o chown.o ckeditor.o cp.o default.o download.o emacs.o env.o functionbase.o functionparser.o functions.o imgcrop.o ipban.o last.o ln.o locale.o login.o logout.o ls.o man.o meta.o mkdir.o mount.o mv.o nicedit.o node.o passwd.o priv.o privchanger.o pw.o reload.o rm.o rmuser.o run.o sort.o specialdefault.o stat.o subject.o template.o timezone.o tinymce.o uname.o upload.o uptime.o vim.o who.o
|
||||
|
||||
@@ -54,7 +54,7 @@ return (conf_parser.ParseString(env_str) == PT::SpaceParser::ok);
|
||||
}
|
||||
|
||||
|
||||
bool Env::EditAdminEnv(long user_id, const std::wstring & env_str)
|
||||
bool Env::EditAdminEnv(long user_id, const std::wstring & env_str, bool use_ses_log)
|
||||
{
|
||||
if( Parse(env_str) )
|
||||
{
|
||||
@@ -69,21 +69,23 @@ bool Env::EditAdminEnv(long user_id, const std::wstring & env_str)
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log1 << "Evn: a problem with changing environment variables for user: "
|
||||
log << log1 << "Evn: a database problem with changing environment variables for user: "
|
||||
<< cur->session->puser->name << ", id: " << cur->session->puser->id << logend;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log2 << "Env: Syntax error in line: " << conf_parser.line << logend;
|
||||
slog << logerror << "Syntax error in line: " << conf_parser.line << logend;
|
||||
|
||||
if( use_ses_log )
|
||||
slog << logerror << T("syntax_error_in_line") << ' ' << conf_parser.line << logend;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool Env::EditEnv(long user_id, const std::wstring & env_str)
|
||||
bool Env::EditEnv(long user_id, const std::wstring & env_str, bool use_ses_log)
|
||||
{
|
||||
if( Parse(env_str) )
|
||||
{
|
||||
@@ -98,20 +100,23 @@ bool Env::EditEnv(long user_id, const std::wstring & env_str)
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log1 << "Evn: a problem with changing admin environment variables for user: "
|
||||
log << log1 << "Evn: a database problem with changing admin environment variables for user: "
|
||||
<< cur->session->puser->name << ", id: " << cur->session->puser->id << logend;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log2 << "Env: Syntax error in line: " << conf_parser.line << logend;
|
||||
slog << logerror << "Syntax error in line: " << conf_parser.line << logend;
|
||||
|
||||
if( use_ses_log )
|
||||
slog << logerror << T("syntax_error_in_line") << ' ' << conf_parser.line << logend;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Env::SaveEnv()
|
||||
{
|
||||
if( GetUser() )
|
||||
@@ -123,11 +128,11 @@ void Env::SaveEnv()
|
||||
if( cur->request->IsParam(L"a") )
|
||||
{
|
||||
if( cur->session->puser->super_user )
|
||||
status = EditAdminEnv(user_id, env_str);
|
||||
status = EditAdminEnv(user_id, env_str, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
status = EditEnv(user_id, env_str);
|
||||
status = EditEnv(user_id, env_str, true);
|
||||
}
|
||||
|
||||
if( status )
|
||||
|
||||
@@ -24,8 +24,8 @@ public:
|
||||
|
||||
Env();
|
||||
|
||||
bool EditAdminEnv(long user_id, const std::wstring & env_str);
|
||||
bool EditEnv(long user_id, const std::wstring & env_str);
|
||||
bool EditAdminEnv(long user_id, const std::wstring & env_str, bool use_ses_log = false);
|
||||
bool EditEnv(long user_id, const std::wstring & env_str, bool use_ses_log = false);
|
||||
|
||||
bool HasAccess();
|
||||
void MakePost();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010-2012, Tomasz Sowa
|
||||
* Copyright (c) 2010-2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -192,6 +192,7 @@ void Functions::CreateFunctions()
|
||||
Add(fun_download);
|
||||
Add(fun_emacs);
|
||||
Add(fun_env);
|
||||
Add(fun_imgcrop);
|
||||
Add(fun_last);
|
||||
Add(fun_locale);
|
||||
Add(fun_login);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010-2012, Tomasz Sowa
|
||||
* Copyright (c) 2010-2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "download.h"
|
||||
#include "emacs.h"
|
||||
#include "env.h"
|
||||
#include "imgcrop.h"
|
||||
#include "last.h"
|
||||
#include "locale.h"
|
||||
#include "login.h"
|
||||
@@ -77,6 +78,7 @@ public:
|
||||
Fun::Download fun_download;
|
||||
Fun::Emacs fun_emacs;
|
||||
Fun::Env fun_env;
|
||||
Fun::ImgCrop fun_imgcrop;
|
||||
Fun::Last fun_last;
|
||||
Fun::Locale fun_locale;
|
||||
Fun::Login fun_login;
|
||||
|
||||
101
functions/imgcrop.cpp
Executable file
101
functions/imgcrop.cpp
Executable file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "imgcrop.h"
|
||||
#include "functions.h"
|
||||
|
||||
|
||||
|
||||
namespace Fun
|
||||
{
|
||||
|
||||
ImgCrop::ImgCrop()
|
||||
{
|
||||
fun.url = L"imgcrop";
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool ImgCrop::HasAccess()
|
||||
{
|
||||
if( cur->request->is_item )
|
||||
return system->HasWriteAccess(cur->request->item);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void ImgCrop::GetDirContent()
|
||||
{
|
||||
iq.sel_content = false;
|
||||
iq.WhereParentId(cur->request->dir_tab.back()->id);
|
||||
db->GetItems(cur->request->item_tab, iq);
|
||||
system->CheckWriteAccessToItems(cur->request->item_tab);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ImgCrop::MakePost()
|
||||
{
|
||||
int xoffset = int(Tod(cur->request->PostVar(L"cropxtop")) + 0.5);
|
||||
int yoffset = int(Tod(cur->request->PostVar(L"cropytop")) + 0.5);
|
||||
int width = int(Tod(cur->request->PostVar(L"cropwidth")) + 0.5);
|
||||
int height = int(Tod(cur->request->PostVar(L"cropheight")) + 0.5);
|
||||
|
||||
SetMinMax(xoffset, 0, 30000);
|
||||
SetMinMax(yoffset, 0, 30000);
|
||||
SetMinMax(width, 1, 30000);
|
||||
SetMinMax(height, 1, 30000);
|
||||
|
||||
Item & item = cur->request->item;
|
||||
|
||||
if( cur->request->is_item && item.type == Item::file && item.file_type == WINIX_ITEM_FILETYPE_IMAGE )
|
||||
{
|
||||
if( system->HasWriteAccess(item) )
|
||||
{
|
||||
// !! IMPROVE ME add info about modification (Item::modify_time)
|
||||
if( cur->request->IsParam(L"thumb") )
|
||||
{
|
||||
Image::Scale scale = system->image.GetThumbScale(item.parent_id);
|
||||
system->image.CropThumb(item.id, xoffset, yoffset, width, height, scale.quality);
|
||||
}
|
||||
else
|
||||
if( cur->request->IsParam(L"newthumb") )
|
||||
{
|
||||
Image::Scale scale = system->image.GetThumbScale(item.parent_id);
|
||||
system->image.CropNewThumb(item.id, xoffset, yoffset, width, height, scale.cx, scale.cy,
|
||||
scale.aspect_mode, scale.quality);
|
||||
}
|
||||
else
|
||||
{
|
||||
Image::Scale scale = system->image.GetImageScale(item.parent_id);
|
||||
system->image.Crop(item.id, xoffset, yoffset, width, height, scale.quality);
|
||||
}
|
||||
|
||||
// !! IMPROVE ME redirect me somewhere else
|
||||
system->RedirectToLastItem();
|
||||
}
|
||||
else
|
||||
{
|
||||
cur->request->status = WINIX_ERR_PERMISSION_DENIED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ImgCrop::MakeGet()
|
||||
{
|
||||
if( !cur->request->is_item )
|
||||
GetDirContent();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace
|
||||
42
functions/imgcrop.h
Executable file
42
functions/imgcrop.h
Executable file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfile_winix_functions_imgcrop
|
||||
#define headerfile_winix_functions_imgcrop
|
||||
|
||||
#include "functionbase.h"
|
||||
|
||||
|
||||
|
||||
namespace Fun
|
||||
{
|
||||
|
||||
|
||||
class ImgCrop : public FunctionBase
|
||||
{
|
||||
public:
|
||||
|
||||
ImgCrop();
|
||||
|
||||
bool HasAccess();
|
||||
void MakeGet();
|
||||
void MakePost();
|
||||
|
||||
private:
|
||||
|
||||
DbItemQuery iq;
|
||||
|
||||
void GetDirContent();
|
||||
|
||||
};
|
||||
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif
|
||||
@@ -7,8 +7,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include "ipban.h"
|
||||
#include "functions.h"
|
||||
#include "core/sessionmanager.h"
|
||||
|
||||
|
||||
|
||||
@@ -28,15 +33,40 @@ bool IPBanFun::HasAccess()
|
||||
}
|
||||
|
||||
|
||||
|
||||
void IPBanFun::MakePost()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void IPBanFun::MakeGet()
|
||||
{
|
||||
if( cur->request->IsParam(L"removeip") )
|
||||
{
|
||||
if( cur->request->ParamValue(L"removeip") == L"all" )
|
||||
{
|
||||
session_manager->ClearIPBanList();
|
||||
cur->session->ip_ban = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
int cur_ip = 0;
|
||||
|
||||
if( cur->session->ip_ban )
|
||||
cur_ip = cur->session->ip_ban->ip;
|
||||
|
||||
AssignString(cur->request->ParamValue(L"removeip"), tmp_ip_str);
|
||||
int ip = (int)inet_addr(tmp_ip_str.c_str());
|
||||
session_manager->RemoveIPBan(ip);
|
||||
|
||||
if( cur->session->ip_ban && cur_ip == ip )
|
||||
cur->session->ip_ban = 0;
|
||||
}
|
||||
|
||||
system->RedirectToLastFunction();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -28,6 +28,10 @@ public:
|
||||
void MakePost();
|
||||
void MakeGet();
|
||||
|
||||
private:
|
||||
|
||||
std::string tmp_ip_str;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -210,7 +210,10 @@ return true;
|
||||
}
|
||||
|
||||
|
||||
bool Login::LoginUser(const std::wstring & login, const std::wstring & password, bool remember_me, bool use_ses_log)
|
||||
// if you are logging not from a webbrowser but from an application
|
||||
// then probably you need check_abuse to be false
|
||||
bool Login::LoginUser(const std::wstring & login, const std::wstring & password, bool remember_me,
|
||||
bool use_ses_log, bool check_abuse)
|
||||
{
|
||||
long user_id;
|
||||
|
||||
@@ -232,7 +235,7 @@ long user_id;
|
||||
return false;
|
||||
}
|
||||
|
||||
if( !CheckAbuse() )
|
||||
if( check_abuse && !CheckAbuse() )
|
||||
{
|
||||
AddBanInfo();
|
||||
return false;
|
||||
@@ -264,7 +267,7 @@ void Login::MakePost()
|
||||
const std::wstring & pass = cur->request->PostVar(L"password");
|
||||
const std::wstring & remem = cur->request->PostVar(L"rememberme");
|
||||
|
||||
if( LoginUser(login, pass, !remem.empty(), true) )
|
||||
if( LoginUser(login, pass, !remem.empty(), true, true) )
|
||||
system->RedirectToLastItem();
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,8 @@ public:
|
||||
bool CannotLoginFrom(const IPBan & ipban);
|
||||
|
||||
bool CheckUserPass(const std::wstring & login, const std::wstring & password, long & user_id);
|
||||
bool LoginUser(const std::wstring & login, const std::wstring & password, bool remember_me, bool use_ses_log = false);
|
||||
bool LoginUser(const std::wstring & login, const std::wstring & password, bool remember_me,
|
||||
bool use_ses_log = false, bool check_abuse = false);
|
||||
|
||||
|
||||
private:
|
||||
@@ -49,6 +50,7 @@ private:
|
||||
std::string pass_decrypted;
|
||||
std::wstring pass_hashed;
|
||||
std::wstring salt;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -17,30 +17,53 @@ namespace Fun
|
||||
Meta::Meta()
|
||||
{
|
||||
fun.url = L"meta";
|
||||
// !! CHECKME what about follow symlinks?
|
||||
}
|
||||
|
||||
|
||||
bool Meta::HasAccess()
|
||||
{
|
||||
return system->HasReadAccess(*cur->request->last_item);
|
||||
if( cur->request->IsParam(L"a") )
|
||||
return cur->session->puser && cur->session->puser->super_user;
|
||||
else
|
||||
return system->HasWriteAccess(*cur->request->last_item);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Meta::AddMetaInfo(Item & item, const std::wstring & meta_str)
|
||||
bool Meta::Parse(const std::wstring & meta_str)
|
||||
{
|
||||
space.Clear();
|
||||
conf_parser.SetSpace(space);
|
||||
conf_parser.UTF8(config->utf8);
|
||||
conf_parser.SplitSingle(true);
|
||||
|
||||
if( conf_parser.ParseString(meta_str) == PT::SpaceParser::ok )
|
||||
return (conf_parser.ParseString(meta_str) == PT::SpaceParser::ok);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool Meta::EditAdminMeta(long item_id, const std::wstring & meta_str, bool use_ses_log)
|
||||
{
|
||||
if( Parse(meta_str) )
|
||||
{
|
||||
if( db->EditMetaById(space, item.id) == WINIX_ERR_OK )
|
||||
if( db->EditAdminMetaById(space, item_id) == WINIX_ERR_OK )
|
||||
{
|
||||
item.meta = space;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log1 << "Meta: a database problem with changing admin meta information for item id: "
|
||||
<< item_id << logend;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log2 << "Meta: Syntax error in line: " << conf_parser.line << logend;
|
||||
|
||||
if( use_ses_log )
|
||||
slog << logerror << T("syntax_error_in_line") << ' ' << conf_parser.line << logend;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -48,21 +71,64 @@ return false;
|
||||
|
||||
|
||||
|
||||
void Meta::MakePost()
|
||||
bool Meta::EditMeta(long item_id, const std::wstring & meta_str, bool use_ses_log)
|
||||
{
|
||||
if( Parse(meta_str) )
|
||||
{
|
||||
if( db->EditMetaById(space, item_id) == WINIX_ERR_OK )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log1 << "Meta: a database problem with changing meta information for item id: "
|
||||
<< item_id << logend;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log2 << "Meta: Syntax error in line: " << conf_parser.line << logend;
|
||||
|
||||
if( use_ses_log )
|
||||
slog << logerror << T("syntax_error_in_line") << ' ' << conf_parser.line << logend;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Meta::ChangeAdminMeta()
|
||||
{
|
||||
if( cur->session->puser && cur->session->puser->super_user )
|
||||
{
|
||||
const std::wstring & meta_str = cur->request->PostVar(L"itemmeta");
|
||||
|
||||
if( EditAdminMeta(cur->request->last_item->id, meta_str, true) )
|
||||
system->RedirectToLastItem();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Meta::ChangeMeta()
|
||||
{
|
||||
if( system->HasWriteAccess(*cur->request->last_item) )
|
||||
{
|
||||
const std::wstring & meta_str = cur->request->PostVar(L"itemmeta");
|
||||
|
||||
if( AddMetaInfo(*cur->request->last_item, meta_str) )
|
||||
if( EditMeta(cur->request->last_item->id, meta_str, true) )
|
||||
system->RedirectToLastItem();
|
||||
else
|
||||
slog << logerror << "Syntax error in line: " << conf_parser.line << logend;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Meta::MakePost()
|
||||
{
|
||||
if( cur->request->IsParam(L"a") )
|
||||
ChangeAdminMeta();
|
||||
else
|
||||
{
|
||||
cur->request->status = WINIX_ERR_PERMISSION_DENIED;
|
||||
}
|
||||
ChangeMeta();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,12 +26,19 @@ public:
|
||||
|
||||
bool HasAccess();
|
||||
void MakePost();
|
||||
bool AddMetaInfo(Item & item, const std::wstring & meta_str);
|
||||
|
||||
bool EditAdminMeta(long item_id, const std::wstring & meta_str, bool use_ses_log = false);
|
||||
bool EditMeta(long item_id, const std::wstring & meta_str, bool use_ses_log = false);
|
||||
|
||||
private:
|
||||
|
||||
PT::SpaceParser conf_parser;
|
||||
PT::Space space;
|
||||
|
||||
bool Parse(const std::wstring & meta_str);
|
||||
void ChangeAdminMeta();
|
||||
void ChangeMeta();
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2012, Tomasz Sowa
|
||||
* Copyright (c) 2008-2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -89,68 +89,16 @@ bool Upload::UploadSaveStaticFile(const Item & item, const std::wstring & tmp_fi
|
||||
|
||||
void Upload::ResizeImage(Item & item)
|
||||
{
|
||||
::Mount * m = system->mounts.CalcMount(item.parent_id);
|
||||
size_t cx = config->image_cx;
|
||||
size_t cy = config->image_cy;
|
||||
int mode = config->image_mode;
|
||||
int quality = config->image_quality;
|
||||
|
||||
// reading width and height from the mount point (if exists)
|
||||
int index = system->mounts.MountParImageSize();
|
||||
|
||||
if( m && m->param[index].defined && m->param[index].arg.size() == 2 )
|
||||
{
|
||||
cx = Tol(m->param[index].arg[0]);
|
||||
cy = Tol(m->param[index].arg[1]);
|
||||
}
|
||||
|
||||
// reading image mode from the mount point (if exists)
|
||||
index = system->mounts.MountParImageMode();
|
||||
|
||||
if( m && m->param[index].defined && m->param[index].arg.size() == 1 )
|
||||
mode = Toi(m->param[index].arg[0]);
|
||||
|
||||
// reading image quality from the mount point (if exists)
|
||||
index = system->mounts.MountParImageQuality();
|
||||
|
||||
if( m && m->param[index].defined && m->param[index].arg.size() == 1 )
|
||||
quality = Toi(m->param[index].arg[0]);
|
||||
|
||||
system->image.Resize(item, cx, cy, mode, quality);
|
||||
Image::Scale scale = system->image.GetImageScale(item.parent_id);
|
||||
system->image.Resize(item.id, scale.cx, scale.cy, scale.aspect_mode, scale.quality);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Upload::CreateThumb(Item & item)
|
||||
{
|
||||
::Mount * m = system->mounts.CalcMount(item.parent_id);
|
||||
size_t cx = config->thumb_cx;
|
||||
size_t cy = config->thumb_cy;
|
||||
int mode = config->thumb_mode;
|
||||
int quality = config->thumb_quality;
|
||||
|
||||
// reading width and height from the mount point (if exists)
|
||||
int index = system->mounts.MountParThumbSize();
|
||||
|
||||
if( m && m->param[index].defined && m->param[index].arg.size() == 2 )
|
||||
{
|
||||
cx = Tol(m->param[index].arg[0]);
|
||||
cy = Tol(m->param[index].arg[1]);
|
||||
}
|
||||
|
||||
// reading thumb mode from the mount point (if exists)
|
||||
index = system->mounts.MountParThumbMode();
|
||||
|
||||
if( m && m->param[index].defined && m->param[index].arg.size() == 1 )
|
||||
mode = Toi(m->param[index].arg[0]);
|
||||
|
||||
// reading image quality from the mount point (if exists)
|
||||
index = system->mounts.MountParThumbQuality();
|
||||
|
||||
if( m && m->param[index].defined && m->param[index].arg.size() == 1 )
|
||||
quality = Toi(m->param[index].arg[0]);
|
||||
|
||||
system->image.CreateThumb(item, cx, cy, mode, quality);
|
||||
Image::Scale scale = system->image.GetThumbScale(item.parent_id);
|
||||
system->image.CreateThumb(item.id, scale.cx, scale.cy, scale.aspect_mode, scale.quality);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -46,6 +46,50 @@
|
||||
[end]
|
||||
|
||||
|
||||
[if gallery_mount_type_arg_is "galleria1.2.9"]
|
||||
|
||||
[if gallery_tab]
|
||||
|
||||
<ul class="galleryimages" style="width: [gallery_width]; height: [gallery_height];">
|
||||
[for gallery_tab]
|
||||
<li><a href="[gallery_tab_link]"><img src="[gallery_tab_link]/-/thumb" alt="[gallery_tab_subject]"></a></li>
|
||||
[end]
|
||||
</ul>
|
||||
|
||||
|
||||
[if gallery_mount_theme_arg_is "transparent"]
|
||||
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleria/themes/transparent/galleria.transparent.js');</script>
|
||||
|
||||
[if-no winix_function_param_is "image"]
|
||||
<script type="text/javascript">Galleria.configure(\{showInfo:false\}); Galleria.run('.galleryimages');</script>
|
||||
[else]
|
||||
<script type="text/javascript">Galleria.configure(\{showInfo:false, show: [winix_function_param_value "image"]\}); Galleria.run('.galleryimages');</script>
|
||||
[end]
|
||||
|
||||
[else]
|
||||
[if gallery_mount_theme_arg_is "transparentinfo"]
|
||||
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleria/themes/transparentinfo/galleria.transparent.js');</script>
|
||||
|
||||
[if-no winix_function_param_is "image"]
|
||||
<script type="text/javascript">Galleria.configure(\{\}); Galleria.run('.galleryimages');</script>
|
||||
[else]
|
||||
<script type="text/javascript">Galleria.configure(\{show: [winix_function_param_value "image"]\}); Galleria.run('.galleryimages');</script>
|
||||
[end]
|
||||
[else]
|
||||
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleria/themes/classic/galleria.classic.js');</script>
|
||||
|
||||
[if-no winix_function_param_is "image"]
|
||||
<script type="text/javascript">Galleria.configure(\{\}); Galleria.run('.galleryimages');</script>
|
||||
[else]
|
||||
<script type="text/javascript">Galleria.configure(\{show: [winix_function_param_value "image"]\}); Galleria.run('.galleryimages');</script>
|
||||
[end]
|
||||
[end]
|
||||
[end]
|
||||
|
||||
[end]
|
||||
|
||||
[end]
|
||||
|
||||
|
||||
[if gallery_mount_type_arg_is "galleriathumb"]
|
||||
|
||||
@@ -79,4 +123,43 @@
|
||||
[end]
|
||||
|
||||
|
||||
|
||||
[if gallery_mount_type_arg_is "galleriathumb1.2.9"]
|
||||
|
||||
|
||||
[if-no winix_function_param_is "image"]
|
||||
[if gallery_tab]
|
||||
<ul class="galleryimages">
|
||||
[for gallery_tab]
|
||||
<li><a href="[doc_base_url][dir]-/image:[gallery_tab_index]"><img src="[gallery_tab_link]/-/thumb" alt="[gallery_tab_subject]"></a></li>
|
||||
[end]
|
||||
</ul>
|
||||
[end]
|
||||
[else]
|
||||
|
||||
[if gallery_tab]
|
||||
|
||||
<ul class="galleryimages" style="width: [gallery_width]; height: [gallery_height];">
|
||||
[for gallery_tab]
|
||||
<li><a href="[gallery_tab_link]"><img src="[gallery_tab_link]/-/thumb" alt="[gallery_tab_subject]"></a></li>
|
||||
[end]
|
||||
</ul>
|
||||
|
||||
[if gallery_mount_theme_arg_is "transparent"]
|
||||
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleria/themes/transparent/galleria.transparent.js');</script>
|
||||
<script type="text/javascript">Galleria.configure(\{showInfo:false, show: [winix_function_param_value "image"]\}); Galleria.run('.galleryimages');</script>
|
||||
[else]
|
||||
[if gallery_mount_theme_arg_is "transparentinfo"]
|
||||
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleria/themes/transparentinfo/galleria.transparent.js');</script>
|
||||
<script type="text/javascript">Galleria.configure(\{show: [winix_function_param_value "image"]\}); Galleria.run('.galleryimages');</script>
|
||||
[end]
|
||||
[end]
|
||||
|
||||
[end]
|
||||
|
||||
[end]
|
||||
|
||||
[end]
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
109
html/fun_imgcrop.html
Normal file
109
html/fun_imgcrop.html
Normal file
@@ -0,0 +1,109 @@
|
||||
<div class="winix">
|
||||
|
||||
|
||||
<h1>Kadrowanie obrazów</h1>
|
||||
|
||||
[if item_is]
|
||||
|
||||
[if winix_function_param_is "thumb"]
|
||||
<p>Kadruj miniaturę zdjęcia, obraz oryginalny (duży) nie zostanie zmodyfikowany.</p>.
|
||||
[else]
|
||||
[if winix_function_param_is "newthumb"]
|
||||
<p>Zaznacz myszką kadr na zdjęciu, z tej części zostanie stworzona nowa miniatura, obraz oryginalny (duży) nie zostanie zmodyfikowany.</p>.
|
||||
[else]
|
||||
<p>Kadruj oryginalny obraz (miniatura nie zostanie zmodyfikowana).</p>.
|
||||
[end]
|
||||
[end]
|
||||
|
||||
[if-any item_is item_filetype_is_image]
|
||||
|
||||
<script type="text/javascript">
|
||||
var winix_jcrop;
|
||||
</script>
|
||||
|
||||
<img src="[item_link][if winix_function_param_is "thumb"]/-/thumb[end]" alt="" id="winix_imgcropper">
|
||||
|
||||
<form id="winix_cropform" action="[item_link]/imgcrop[if winix_function_param_is "thumb"]/thumb[end][if winix_function_param_is "newthumb"]/newthumb[end]" method="post">
|
||||
<input type="hidden" name="cropxtop" value="" id="winix_idcropxtop">
|
||||
<input type="hidden" name="cropytop" value="" id="winix_idcropytop">
|
||||
<input type="hidden" name="cropwidth" value="" id="winix_idcropwidth">
|
||||
<input type="hidden" name="cropheight" value="" id="winix_idcropheight">
|
||||
|
||||
[if-any-no winix_function_param_is "thumb" winix_function_param_is "newthumb"]
|
||||
|
||||
[if false]
|
||||
<div class="winix_input_b">
|
||||
<input type="checkbox" name="createthumbtoo" id="winix_createthumbtooid">
|
||||
<label for="winix_createthumbtooid">Stwórz także nową miniaturę</label>
|
||||
</div>
|
||||
[end]
|
||||
|
||||
[end]
|
||||
|
||||
[if winix_function_param_is "postredirect"]
|
||||
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
|
||||
[end]
|
||||
|
||||
<input type="submit" value="Kadruj">
|
||||
</form>
|
||||
|
||||
|
||||
[else]
|
||||
<p>To nie jest obrazek.</p>
|
||||
[end]
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#winix_imgcropper').Jcrop(\{boxWidth: 700, boxHeight: 450\}, function()\{winix_jcrop = this;\});
|
||||
|
||||
$('form#winix_cropform').submit(function()\{
|
||||
var c = winix_jcrop.tellSelect();
|
||||
$('form#winix_cropform input#winix_idcropxtop').val(c.x);
|
||||
$('form#winix_cropform input#winix_idcropytop').val(c.y);
|
||||
$('form#winix_cropform input#winix_idcropwidth').val(c.w);
|
||||
$('form#winix_cropform input#winix_idcropheight').val(c.h);
|
||||
|
||||
return c.w != 0 && c.h != 0;
|
||||
\});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
[else]
|
||||
|
||||
[if item_tab]
|
||||
<ul class="winix_imgcrop_list">
|
||||
[for item_tab]
|
||||
|
||||
<li>
|
||||
|
||||
<div class="winix_imgcrop_list_image">
|
||||
<img src="[item_tab_link][if item_tab_has_thumb]/-/thumb[end]" alt="[item_tab_subject]">
|
||||
</div>
|
||||
|
||||
<div class="winix_imgcrop_list_imageurl">
|
||||
[item_tab_url]
|
||||
</div>
|
||||
|
||||
<div class="winix_imgcrop_list_options">
|
||||
|
||||
<ul>
|
||||
<li><a href="[item_tab_link]/imgcrop/postredirect:[filter fil_urlencode][doc_base_url][dir]imgcrop[end]">Kadruj zdjęcie</a></li>
|
||||
<li><a href="[item_tab_link]/imgcrop/thumb/postredirect:[filter fil_urlencode][doc_base_url][dir]imgcrop[end]">Kadruj miniature</a></li>
|
||||
<li><a href="[item_tab_link]/imgcrop/newthumb/postredirect:[filter fil_urlencode][doc_base_url][dir]imgcrop[end]">Kadruj i stwórz nową miniature</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
[end]
|
||||
</ul>
|
||||
[end]
|
||||
|
||||
|
||||
[end]
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
<div class="winix">
|
||||
|
||||
<h1>IP Banned</h1>
|
||||
<h1>{ipban_header}</h1>
|
||||
|
||||
[if ipban_tab]
|
||||
|
||||
<table>
|
||||
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>IP address</th>
|
||||
<th>login failures</th>
|
||||
<th>Login allowed</th>
|
||||
<th>Ban level</th>
|
||||
<th>Active flag</th>
|
||||
<th>Last used</th>
|
||||
<th>Expires</th>
|
||||
<th>Remove</th>
|
||||
<th>{ipban_col_id}</th>
|
||||
<th>{ipban_col_ip_address}</th>
|
||||
<th>{ipban_col_login_failures}</th>
|
||||
<th>{ipban_col_login_allowed}</th>
|
||||
<th>{ipban_col_ban_level}</th>
|
||||
<th>{ipban_col_active_flag}</th>
|
||||
<th>{ipban_col_last_used}</th>
|
||||
<th>{ipban_col_expires}</th>
|
||||
<th>{ipban_col_remove}</th>
|
||||
</tr>
|
||||
|
||||
[for ipban_tab]
|
||||
@@ -24,18 +24,23 @@
|
||||
<td>[ipban_tab_id]</td>
|
||||
<td>[ipban_tab_ip]</td>
|
||||
<td>[ipban_tab_incorrect_login]</td>
|
||||
<td>[if ipban_tab_is_logging_allowed]yes[else]no[end]</td>
|
||||
<td>[if ipban_tab_is_logging_allowed]{ipban_loggin_allowed}[else]{ipban_loggin_not_allowed}[end]</td>
|
||||
<td>[ipban_tab_ban_level]</td>
|
||||
<td>[if ipban_tab_has_active_flag]yes[end]</td>
|
||||
<td>[if ipban_tab_has_active_flag]{ipban_has_active_flag}[end]</td>
|
||||
<td>[ipban_tab_last_used]</td>
|
||||
<td>[ipban_tab_expires]</td>
|
||||
<td><a href="[doc_base_url][dir][if item_is][item_url]/[end]ipban/removeip:[ipban_tab_ip]">remove</a></td>
|
||||
<td><a href="[doc_base_url][dir][if item_is][item_url]/[end]ipban/removeip:[ipban_tab_ip]">{ipban_remove_ip}</a></td>
|
||||
</tr>
|
||||
|
||||
[end]
|
||||
</table>
|
||||
|
||||
<p>
|
||||
<a href="[doc_base_url][dir][if item_is][item_url]/[end]ipban/removeip:all">{ipban_remove_all_ip}</a>
|
||||
</p>
|
||||
|
||||
[else]
|
||||
<p>There are not any IP addresses banned at the moment.</p>
|
||||
<p>{ipban_ban_list_empty}</p>
|
||||
[end]
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,12 +1,40 @@
|
||||
<div class="winix">
|
||||
|
||||
<h1>{meta_header}</h1>
|
||||
[if winix_function_param_is "a"]
|
||||
<h1>{meta_admin_header}</h1>
|
||||
|
||||
[if item_is]
|
||||
<form method="post" action="[doc_base_url][dir][item_url]/meta/a">
|
||||
|
||||
<textarea class="multitext" rows="30" cols="60" name="itemmeta">[item_admin_meta_str]</textarea>
|
||||
<input class="submit" type="submit" value="{change}">
|
||||
|
||||
[if winix_function_param_is "postredirect"]
|
||||
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
|
||||
[end]
|
||||
|
||||
</form>
|
||||
[else]
|
||||
<form method="post" action="[doc_base_url][dir]meta/a">
|
||||
|
||||
<textarea class="multitext" rows="30" cols="60" name="itemmeta">[dir_last_admin_meta_str]</textarea>
|
||||
<input class="submit" type="submit" value="{change}">
|
||||
|
||||
[if winix_function_param_is "postredirect"]
|
||||
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
|
||||
[end]
|
||||
|
||||
</form>
|
||||
[end]
|
||||
|
||||
|
||||
[else]
|
||||
|
||||
<h1>{meta_header}</h1>
|
||||
|
||||
[if item_is]
|
||||
<form method="post" action="[doc_base_url][dir][item_url]/meta">
|
||||
|
||||
[if item_is]
|
||||
[if item_can_write]
|
||||
<form id="additem" method="post" action="[doc_base_url][dir][item_url]/meta">
|
||||
<fieldset>
|
||||
<legend>{form_meta_legend}</legend>
|
||||
<textarea class="multitext" rows="30" cols="60" name="itemmeta">[item_meta_str]</textarea>
|
||||
<input class="submit" type="submit" value="{change}">
|
||||
|
||||
@@ -14,28 +42,20 @@
|
||||
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
|
||||
[end]
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
[else]
|
||||
<pre>[item_meta_str]</pre>
|
||||
[end]
|
||||
[else]
|
||||
[if dir_can_write]
|
||||
<form id="additem" method="post" action="[doc_base_url][dir]meta">
|
||||
<fieldset>
|
||||
<legend>{form_meta_legend}</legend>
|
||||
<textarea class="multitext" rows="30" cols="60" name="itemmeta">[dir_last_meta_str]</textarea>
|
||||
<input class="submit" type="submit" value="{change}">
|
||||
<form method="post" action="[doc_base_url][dir]meta">
|
||||
|
||||
[if winix_function_param_is "postredirect"]
|
||||
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
|
||||
[end]
|
||||
<textarea class="multitext" rows="30" cols="60" name="itemmeta">[dir_last_meta_str]</textarea>
|
||||
<input class="submit" type="submit" value="{change}">
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
[else]
|
||||
<pre>[dir_last_meta_str]</pre>
|
||||
[if winix_function_param_is "postredirect"]
|
||||
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
|
||||
[end]
|
||||
|
||||
</form>
|
||||
[end]
|
||||
|
||||
[end]
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +32,10 @@
|
||||
[for item_tab]
|
||||
<li id="winix_sort_item_[item_tab_index]">
|
||||
<input type="text" name="sort[item_tab_id]" value="[item_tab_sort]">
|
||||
|
||||
[# is it correct? may give this 'if' only to /-/thumb param? ]
|
||||
[if item_tab_has_thumb]<img src="[item_tab_link]/-/thumb" alt="[item_tab_subject]">[end]
|
||||
|
||||
[item_tab_url]
|
||||
</li>
|
||||
[end]
|
||||
|
||||
@@ -162,8 +162,6 @@
|
||||
</script>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#fileupload button.start').css('display', 'none');
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<head>
|
||||
<meta charset="{charset}">
|
||||
<title>[doc_title]</title>
|
||||
<link rel="stylesheet" href="[doc_base_url_common]/winix/winix.css">
|
||||
[include "index_head_functions_add.html"]
|
||||
</head>
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<head>
|
||||
<meta charset="{charset}">
|
||||
<title>[doc_title]</title>
|
||||
<link rel="stylesheet" href="[doc_base_url_common]/winix/winix.css">
|
||||
[include "index_head_functions_add.html"]
|
||||
</head>
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
winix_function_is "download"
|
||||
winix_function_is "emacs"
|
||||
winix_function_is "env"
|
||||
winix_function_is "imgcrop"
|
||||
winix_function_is "last"
|
||||
winix_function_is "ln"
|
||||
winix_function_is "locale"
|
||||
@@ -79,10 +80,13 @@
|
||||
|
||||
[if winix_function_is "ticket"]
|
||||
[# !! dodac lightboxa tylko jesli tickety zawieraja obrazki ]
|
||||
<!--
|
||||
[# warning: prototype doesn't work with jquery in clock tickets (in client panel)]
|
||||
<link rel="stylesheet" href="[doc_base_url_common]/lightbox/lightbox.css" type="text/css" media="screen">
|
||||
<script src="[doc_base_url_common]/lightbox/js/prototype.js" type="text/javascript"></script>
|
||||
<script src="[doc_base_url_common]/lightbox/js/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
|
||||
<script src="[doc_base_url_common]/lightbox/js/lightbox.js" type="text/javascript"></script>
|
||||
-->
|
||||
[end]
|
||||
|
||||
|
||||
@@ -99,6 +103,11 @@
|
||||
<script type="text/javascript" src="[doc_base_url_common]/jquery-1.4.4.min.js"></script>
|
||||
<script src="[doc_base_url_common]/aino-galleria/galleria-1.2.2.min.js" type="text/javascript"></script>
|
||||
[end]
|
||||
|
||||
[if-one gallery_mount_type_arg_is "galleria1.2.9" gallery_mount_type_arg_is "galleriathumb1.2.9"]
|
||||
<script type="text/javascript" src="[doc_base_url_common]/jquery-1.9.1.min.js"></script>
|
||||
<script src="[doc_base_url_common]/galleria/galleria-1.2.9.min.js" type="text/javascript"></script>
|
||||
[end]
|
||||
|
||||
[end]
|
||||
|
||||
@@ -182,6 +191,13 @@
|
||||
[end]
|
||||
|
||||
|
||||
[if winix_function_is "imgcrop"]
|
||||
<script type="text/javascript" src="[doc_base_url_common]/jquery-1.9.1.min.js"></script>
|
||||
<script type="text/javascript" src="[doc_base_url_common]/jcrop-0.9.12/js/jquery.Jcrop.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="[doc_base_url_common]/jcrop-0.9.12/css/jquery.Jcrop.css">
|
||||
[end]
|
||||
|
||||
|
||||
|
||||
[if winix_has_plugin "stats"]
|
||||
[include "stats_info.html"]
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
[for slog_tab]
|
||||
|
||||
<tr>
|
||||
<td class="[if slog_tab_is_error]winix_slogerror[end][if slog_tab_is_warning]winix_slogwarning[end][if slog_tab_is_info]winix_sloginfo[end]">
|
||||
<th class="[if slog_tab_is_error]winix_slogerror[end][if slog_tab_is_warning]winix_slogwarning[end][if slog_tab_is_info]winix_sloginfo[end]">
|
||||
|
||||
[if slog_tab_is_info]
|
||||
{slog_info}:
|
||||
@@ -19,7 +19,7 @@
|
||||
{slog_error}:
|
||||
[end]
|
||||
|
||||
</td>
|
||||
</th>
|
||||
<td>
|
||||
[slog_tab_print]
|
||||
</td>
|
||||
|
||||
24
locale/en
24
locale/en
@@ -10,6 +10,9 @@ logged_as_long = You are logged as
|
||||
display_guest_name = guest
|
||||
unknown = unknown
|
||||
|
||||
syntax_error_in_line = Syntax error in line:
|
||||
|
||||
|
||||
this_ip_is_banned_until = We are sorry but your IP address is banned until to:
|
||||
|
||||
account_not_activated = This account is not activated yet.
|
||||
@@ -152,13 +155,32 @@ ls_header = Directory listing
|
||||
ls_pictures_in_dir = Pictures in directory
|
||||
ls_no_picture = There are not any pictures in this directory
|
||||
|
||||
ipban_header = IP Banned
|
||||
ipban_col_id = Id
|
||||
ipban_col_ip_address = IP address
|
||||
ipban_col_login_failures = login failures
|
||||
ipban_col_login_allowed = Login allowed
|
||||
ipban_col_ban_level = Ban level
|
||||
ipban_col_active_flag = Active flag
|
||||
ipban_col_last_used = Last used
|
||||
ipban_col_expires = Expires
|
||||
ipban_col_remove = Remove
|
||||
ipban_loggin_allowed = yes
|
||||
ipban_loggin_not_allowed = no
|
||||
ipban_has_active_flag = yes
|
||||
ipban_remove_ip = remove
|
||||
ipban_remove_all_ip = Remove all IP's from the list
|
||||
ipban_ban_list_empty = There are not any IP addresses banned at the moment.
|
||||
|
||||
|
||||
|
||||
man_header = Man
|
||||
man_winix_funcions = Winix functions
|
||||
man_ezc_functions = EZC templates functions
|
||||
|
||||
|
||||
meta_header = Meta
|
||||
form_meta_legend = Form for changing meta info
|
||||
meta_admin_header = Admin meta
|
||||
|
||||
|
||||
mkdir_header = Make directory
|
||||
|
||||
23
locale/pl
23
locale/pl
@@ -11,6 +11,9 @@ logged_as_long = Aktualnie jesteś zalogowany jako
|
||||
display_guest_name = gość
|
||||
unknown = nie znany
|
||||
|
||||
syntax_error_in_line = Błąd składni w linii:
|
||||
|
||||
|
||||
this_ip_is_banned_until = Przepraszamy ale twój adres IP jest zablokowany aż do:
|
||||
|
||||
|
||||
@@ -156,8 +159,26 @@ ls_pictures_in_dir = Obrazy w katalogu
|
||||
ls_no_picture = W tym katalogu nie ma żadnego obrazu
|
||||
|
||||
|
||||
ipban_header = Lista zbanowanych adresów IP
|
||||
ipban_col_id = L.p.
|
||||
ipban_col_ip_address = adres IP
|
||||
ipban_col_login_failures = nieprawidłowe logowania
|
||||
ipban_col_login_allowed = możliwe logowanie
|
||||
ipban_col_ban_level = Rodzaj banu
|
||||
ipban_col_active_flag = Flaga active
|
||||
ipban_col_last_used = Ostatnio używany
|
||||
ipban_col_expires = Wygasza
|
||||
ipban_col_remove = Usuń
|
||||
ipban_loggin_allowed = tak
|
||||
ipban_loggin_not_allowed = nie
|
||||
ipban_has_active_flag = tak
|
||||
ipban_remove_ip = usuń
|
||||
ipban_remove_all_ip = Usuń wszystkie adresy IP z listy
|
||||
ipban_ban_list_empty = W tej chwili nie ma żadnych zbanowanych adresów IP.
|
||||
|
||||
|
||||
meta_header = Meta
|
||||
form_meta_legend = Formularz zmiany meta informacji
|
||||
meta_admin_header = Admin meta
|
||||
|
||||
|
||||
man_header = Man
|
||||
|
||||
@@ -38,13 +38,14 @@ main.o: ../functions/functionparser.h ../core/cur.h ../functions/adduser.h
|
||||
main.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h
|
||||
main.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h
|
||||
main.o: ../functions/default.h ../functions/download.h ../functions/emacs.h
|
||||
main.o: ../functions/env.h ../functions/last.h ../functions/login.h
|
||||
main.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
main.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
|
||||
main.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
|
||||
main.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
|
||||
main.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
|
||||
main.o: ../functions/sort.h ../functions/specialdefault.h ../functions/stat.h
|
||||
main.o: ../functions/env.h ../functions/imgcrop.h ../functions/last.h
|
||||
main.o: ../functions/login.h ../functions/logout.h ../functions/ln.h
|
||||
main.o: ../functions/ls.h ../functions/man.h ../functions/meta.h
|
||||
main.o: ../functions/mkdir.h ../functions/mv.h ../functions/nicedit.h
|
||||
main.o: ../functions/node.h ../functions/passwd.h ../functions/priv.h
|
||||
main.o: ../functions/pw.h ../functions/reload.h ../functions/rm.h
|
||||
main.o: ../functions/rmuser.h ../functions/sort.h
|
||||
main.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
main.o: ../functions/subject.h ../functions/template.h ../functions/tinymce.h
|
||||
main.o: ../functions/uname.h ../functions/upload.h ../functions/uptime.h
|
||||
main.o: ../functions/who.h ../functions/vim.h ../core/htmlfilter.h
|
||||
|
||||
@@ -46,14 +46,14 @@ notify.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
|
||||
notify.o: ../functions/privchanger.h ../functions/chown.h
|
||||
notify.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h
|
||||
notify.o: ../functions/download.h ../functions/emacs.h ../functions/env.h
|
||||
notify.o: ../functions/last.h ../functions/login.h ../functions/logout.h
|
||||
notify.o: ../functions/ln.h ../functions/ls.h ../functions/man.h
|
||||
notify.o: ../functions/meta.h ../functions/mkdir.h ../functions/mv.h
|
||||
notify.o: ../functions/nicedit.h ../functions/node.h ../functions/passwd.h
|
||||
notify.o: ../functions/priv.h ../functions/pw.h ../functions/reload.h
|
||||
notify.o: ../functions/rm.h ../functions/rmuser.h ../functions/sort.h
|
||||
notify.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
notify.o: ../functions/subject.h ../functions/template.h
|
||||
notify.o: ../functions/imgcrop.h ../functions/last.h ../functions/login.h
|
||||
notify.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
notify.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
|
||||
notify.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
|
||||
notify.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
|
||||
notify.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
|
||||
notify.o: ../functions/sort.h ../functions/specialdefault.h
|
||||
notify.o: ../functions/stat.h ../functions/subject.h ../functions/template.h
|
||||
notify.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
|
||||
notify.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
notifypool.o: notifypool.h ../templates/locale.h
|
||||
@@ -139,10 +139,11 @@ templatesnotify.o: ../functions/chmod.h ../functions/privchanger.h
|
||||
templatesnotify.o: ../functions/chown.h ../functions/ckeditor.h
|
||||
templatesnotify.o: ../functions/cp.h ../functions/default.h
|
||||
templatesnotify.o: ../functions/download.h ../functions/emacs.h
|
||||
templatesnotify.o: ../functions/env.h ../functions/last.h
|
||||
templatesnotify.o: ../functions/login.h ../functions/logout.h
|
||||
templatesnotify.o: ../functions/ln.h ../functions/ls.h ../functions/man.h
|
||||
templatesnotify.o: ../functions/meta.h ../functions/mkdir.h ../functions/mv.h
|
||||
templatesnotify.o: ../functions/env.h ../functions/imgcrop.h
|
||||
templatesnotify.o: ../functions/last.h ../functions/login.h
|
||||
templatesnotify.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
templatesnotify.o: ../functions/man.h ../functions/meta.h
|
||||
templatesnotify.o: ../functions/mkdir.h ../functions/mv.h
|
||||
templatesnotify.o: ../functions/nicedit.h ../functions/node.h
|
||||
templatesnotify.o: ../functions/passwd.h ../functions/priv.h
|
||||
templatesnotify.o: ../functions/pw.h ../functions/reload.h ../functions/rm.h
|
||||
|
||||
@@ -171,7 +171,8 @@ init.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
init.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
init.o: ../../functions/cp.h ../../functions/default.h
|
||||
init.o: ../../functions/download.h ../../functions/emacs.h
|
||||
init.o: ../../functions/env.h ../../functions/last.h ../../functions/login.h
|
||||
init.o: ../../functions/env.h ../../functions/imgcrop.h
|
||||
init.o: ../../functions/last.h ../../functions/login.h
|
||||
init.o: ../../functions/logout.h ../../functions/ln.h ../../functions/ls.h
|
||||
init.o: ../../functions/man.h ../../functions/meta.h ../../functions/mkdir.h
|
||||
init.o: ../../functions/mv.h ../../functions/nicedit.h ../../functions/node.h
|
||||
|
||||
@@ -91,7 +91,8 @@ init.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
init.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
init.o: ../../functions/cp.h ../../functions/default.h
|
||||
init.o: ../../functions/download.h ../../functions/emacs.h
|
||||
init.o: ../../functions/env.h ../../functions/last.h ../../functions/login.h
|
||||
init.o: ../../functions/env.h ../../functions/imgcrop.h
|
||||
init.o: ../../functions/last.h ../../functions/login.h
|
||||
init.o: ../../functions/logout.h ../../functions/ln.h ../../functions/ls.h
|
||||
init.o: ../../functions/man.h ../../functions/meta.h ../../functions/mkdir.h
|
||||
init.o: ../../functions/mv.h ../../functions/nicedit.h ../../functions/node.h
|
||||
@@ -158,9 +159,10 @@ templates.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
templates.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
templates.o: ../../functions/cp.h ../../functions/default.h
|
||||
templates.o: ../../functions/download.h ../../functions/emacs.h
|
||||
templates.o: ../../functions/env.h ../../functions/last.h
|
||||
templates.o: ../../functions/login.h ../../functions/logout.h
|
||||
templates.o: ../../functions/ln.h ../../functions/ls.h ../../functions/man.h
|
||||
templates.o: ../../functions/env.h ../../functions/imgcrop.h
|
||||
templates.o: ../../functions/last.h ../../functions/login.h
|
||||
templates.o: ../../functions/logout.h ../../functions/ln.h
|
||||
templates.o: ../../functions/ls.h ../../functions/man.h
|
||||
templates.o: ../../functions/meta.h ../../functions/mkdir.h
|
||||
templates.o: ../../functions/mv.h ../../functions/nicedit.h
|
||||
templates.o: ../../functions/node.h ../../functions/passwd.h
|
||||
@@ -176,3 +178,4 @@ templates.o: ../../core/htmlfilter.h ../../templates/templates.h
|
||||
templates.o: ../../templates/patterncacher.h ../../templates/indexpatterns.h
|
||||
templates.o: ../../templates/patterns.h ../../templates/changepatterns.h
|
||||
templates.o: ../../templates/htmltextstream.h ../../core/sessionmanager.h
|
||||
templates.o: ../../templates/miscspace.h ../../templates/templates.h
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2011, Tomasz Sowa
|
||||
* Copyright (c) 2011-2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -53,12 +53,13 @@ void Gallery::SortPointers()
|
||||
void Gallery::MakeGetDir()
|
||||
{
|
||||
iq.SetAll(false, false);
|
||||
iq.sel_parent_id = true;
|
||||
iq.sel_subject = true;
|
||||
iq.sel_url = true;
|
||||
iq.sel_type = true;
|
||||
iq.sel_file = true;
|
||||
iq.sel_sort_index = true;
|
||||
iq.sel_parent_id = true;
|
||||
iq.sel_subject = true;
|
||||
iq.sel_url = true;
|
||||
iq.sel_type = true;
|
||||
iq.sel_file = true;
|
||||
iq.sel_sort_index = true;
|
||||
iq.sel_meta = true;
|
||||
|
||||
iq.WhereParentId(cur->request->dir_tab.back()->id);
|
||||
iq.WhereFileType(WINIX_ITEM_FILETYPE_IMAGE);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2011, Tomasz Sowa
|
||||
* Copyright (c) 2011-2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "core/plugin.h"
|
||||
#include "templates/templates.h"
|
||||
#include "functions/functions.h"
|
||||
#include "templates/miscspace.h"
|
||||
|
||||
|
||||
|
||||
@@ -85,6 +86,64 @@ void gallery_tab_link(Info & i)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void gallery_tab_meta_str(Info & i)
|
||||
{
|
||||
if( gallery_index < gallery_info.item_sort_tab.size() )
|
||||
{
|
||||
Item & item = *gallery_info.item_sort_tab[gallery_index];
|
||||
item.meta.Serialize(i.out, true, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void gallery_tab_meta(Info & i)
|
||||
{
|
||||
if( gallery_index < gallery_info.item_sort_tab.size() )
|
||||
{
|
||||
Item & item = *gallery_info.item_sort_tab[gallery_index];
|
||||
space(i, item.meta);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void gallery_tab_meta_tab(Info & i)
|
||||
{
|
||||
if( gallery_index < gallery_info.item_sort_tab.size() )
|
||||
{
|
||||
Item & item = *gallery_info.item_sort_tab[gallery_index];
|
||||
spaces_tab(i, item.meta);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void gallery_tab_meta_tab_value(Info & i)
|
||||
{
|
||||
if( gallery_index < gallery_info.item_sort_tab.size() )
|
||||
{
|
||||
Item & item = *gallery_info.item_sort_tab[gallery_index];
|
||||
spaces_tab_value(i, item.meta);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void gallery_tab_meta_tab_has_next(Info & i)
|
||||
{
|
||||
if( gallery_index < gallery_info.item_sort_tab.size() )
|
||||
{
|
||||
Item & item = *gallery_info.item_sort_tab[gallery_index];
|
||||
spaces_tab_has_next(i, item.meta);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void gallery_width(Info & i)
|
||||
{
|
||||
if( !system->mounts.pmount )
|
||||
@@ -147,17 +206,22 @@ void AddEzcFunctions(PluginInfo & info)
|
||||
using TemplatesFunctions::EzcFun;
|
||||
EzcFun * fun = reinterpret_cast<EzcFun*>(info.p1);
|
||||
|
||||
fun->Insert("gallery_tab", gallery_tab);
|
||||
fun->Insert("gallery_tab_index", gallery_tab_index);
|
||||
fun->Insert("gallery_tab_dir", gallery_tab_dir);
|
||||
fun->Insert("gallery_tab_url", gallery_tab_url);
|
||||
fun->Insert("gallery_tab_subject", gallery_tab_subject);
|
||||
fun->Insert("gallery_tab_link", gallery_tab_link);
|
||||
fun->Insert("gallery_width", gallery_width);
|
||||
fun->Insert("gallery_height", gallery_height);
|
||||
fun->Insert("gallery_has_not_mount_type", gallery_has_not_mount_type);
|
||||
fun->Insert("gallery_mount_type_arg_is", gallery_mount_type_arg_is);
|
||||
fun->Insert("gallery_mount_theme_arg_is", gallery_mount_theme_arg_is);
|
||||
fun->Insert("gallery_tab", gallery_tab);
|
||||
fun->Insert("gallery_tab_index", gallery_tab_index);
|
||||
fun->Insert("gallery_tab_dir", gallery_tab_dir);
|
||||
fun->Insert("gallery_tab_url", gallery_tab_url);
|
||||
fun->Insert("gallery_tab_subject", gallery_tab_subject);
|
||||
fun->Insert("gallery_tab_link", gallery_tab_link);
|
||||
fun->Insert("gallery_tab_meta_str", gallery_tab_meta_str);
|
||||
fun->Insert("gallery_tab_meta", gallery_tab_meta);
|
||||
fun->Insert("gallery_tab_meta_tab", gallery_tab_meta_tab);
|
||||
fun->Insert("gallery_tab_meta_tab_value", gallery_tab_meta_tab_value);
|
||||
fun->Insert("gallery_tab_meta_tab_has_next", gallery_tab_meta_tab_has_next);
|
||||
fun->Insert("gallery_width", gallery_width);
|
||||
fun->Insert("gallery_height", gallery_height);
|
||||
fun->Insert("gallery_has_not_mount_type", gallery_has_not_mount_type);
|
||||
fun->Insert("gallery_mount_type_arg_is", gallery_mount_type_arg_is);
|
||||
fun->Insert("gallery_mount_theme_arg_is", gallery_mount_theme_arg_is);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -88,7 +88,8 @@ init.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
init.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
init.o: ../../functions/cp.h ../../functions/default.h
|
||||
init.o: ../../functions/download.h ../../functions/emacs.h
|
||||
init.o: ../../functions/env.h ../../functions/last.h ../../functions/login.h
|
||||
init.o: ../../functions/env.h ../../functions/imgcrop.h
|
||||
init.o: ../../functions/last.h ../../functions/login.h
|
||||
init.o: ../../functions/logout.h ../../functions/ln.h ../../functions/ls.h
|
||||
init.o: ../../functions/man.h ../../functions/meta.h ../../functions/mkdir.h
|
||||
init.o: ../../functions/mv.h ../../functions/nicedit.h ../../functions/node.h
|
||||
@@ -157,9 +158,10 @@ templates.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
templates.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
templates.o: ../../functions/cp.h ../../functions/default.h
|
||||
templates.o: ../../functions/download.h ../../functions/emacs.h
|
||||
templates.o: ../../functions/env.h ../../functions/last.h
|
||||
templates.o: ../../functions/login.h ../../functions/logout.h
|
||||
templates.o: ../../functions/ln.h ../../functions/ls.h ../../functions/man.h
|
||||
templates.o: ../../functions/env.h ../../functions/imgcrop.h
|
||||
templates.o: ../../functions/last.h ../../functions/login.h
|
||||
templates.o: ../../functions/logout.h ../../functions/ln.h
|
||||
templates.o: ../../functions/ls.h ../../functions/man.h
|
||||
templates.o: ../../functions/meta.h ../../functions/mkdir.h
|
||||
templates.o: ../../functions/mv.h ../../functions/nicedit.h
|
||||
templates.o: ../../functions/node.h ../../functions/passwd.h
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2011-2012, Tomasz Sowa
|
||||
* Copyright (c) 2011-2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -58,32 +58,39 @@ size_t i, v;
|
||||
for( i=0 ; i < set.spaces.size() ; ++i )
|
||||
{
|
||||
PT::Space & group = *set.spaces[i];
|
||||
// !! IMPROVE ME will be safer to copy the value out
|
||||
// if we used accidently the group.Text later the key
|
||||
// would be overwritten
|
||||
const std::wstring & key = group.Text(L"key", L"value");
|
||||
|
||||
// loop through all values in the group
|
||||
for(v=0 ; v<group.spaces.size() ; )
|
||||
{
|
||||
PT::Space::Table::iterator vali = group.spaces[v]->table.find(key);
|
||||
std::wstring * vali = group.spaces[v]->GetValue(key);
|
||||
|
||||
if( vali != group.spaces[v]->table.end() && vali->second.size() == 1 )
|
||||
if( vali )
|
||||
{
|
||||
GroupIndex::iterator g = group_index.find(vali->second[0]);
|
||||
GroupIndex::iterator g = group_index.find(*vali);
|
||||
|
||||
if( g == group_index.end() )
|
||||
{
|
||||
group_index[vali->second[0]] = i;
|
||||
group_index[*vali] = i;
|
||||
v += 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
slog << logwarning << "set: " << set.name << " has a group with a duplicated value: "
|
||||
<< vali->second[0] << " (skipping)" << logend;
|
||||
<< *vali << " (skipping)" << logend;
|
||||
|
||||
group.spaces.erase(group.spaces.begin() + v);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
slog << logwarning << "set: " << set.name << " has a group without a value (skipping)" << logend;
|
||||
log << log1 << "key: " << key << " was not found" << logend;
|
||||
slog << logwarning << "set: " << set.name
|
||||
<< " has a group without a value (skipping)" << logend;
|
||||
|
||||
group.spaces.erase(group.spaces.begin() + v);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +78,8 @@ init.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
init.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
init.o: ../../functions/cp.h ../../functions/default.h
|
||||
init.o: ../../functions/download.h ../../functions/emacs.h
|
||||
init.o: ../../functions/env.h ../../functions/last.h ../../functions/login.h
|
||||
init.o: ../../functions/env.h ../../functions/imgcrop.h
|
||||
init.o: ../../functions/last.h ../../functions/login.h
|
||||
init.o: ../../functions/logout.h ../../functions/ln.h ../../functions/ls.h
|
||||
init.o: ../../functions/man.h ../../functions/meta.h ../../functions/mkdir.h
|
||||
init.o: ../../functions/mv.h ../../functions/nicedit.h ../../functions/node.h
|
||||
@@ -149,9 +150,9 @@ templates.o: ../../functions/privchanger.h ../../functions/chown.h
|
||||
templates.o: ../../functions/ckeditor.h ../../functions/cp.h
|
||||
templates.o: ../../functions/default.h ../../functions/download.h
|
||||
templates.o: ../../functions/emacs.h ../../functions/env.h
|
||||
templates.o: ../../functions/last.h ../../functions/login.h
|
||||
templates.o: ../../functions/logout.h ../../functions/ln.h
|
||||
templates.o: ../../functions/ls.h ../../functions/man.h
|
||||
templates.o: ../../functions/imgcrop.h ../../functions/last.h
|
||||
templates.o: ../../functions/login.h ../../functions/logout.h
|
||||
templates.o: ../../functions/ln.h ../../functions/ls.h ../../functions/man.h
|
||||
templates.o: ../../functions/meta.h ../../functions/mkdir.h
|
||||
templates.o: ../../functions/mv.h ../../functions/nicedit.h
|
||||
templates.o: ../../functions/node.h ../../functions/passwd.h
|
||||
|
||||
@@ -47,7 +47,8 @@ init.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
init.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
init.o: ../../functions/cp.h ../../functions/default.h
|
||||
init.o: ../../functions/download.h ../../functions/emacs.h
|
||||
init.o: ../../functions/env.h ../../functions/last.h ../../functions/login.h
|
||||
init.o: ../../functions/env.h ../../functions/imgcrop.h
|
||||
init.o: ../../functions/last.h ../../functions/login.h
|
||||
init.o: ../../functions/logout.h ../../functions/ln.h ../../functions/ls.h
|
||||
init.o: ../../functions/man.h ../../functions/meta.h ../../functions/mkdir.h
|
||||
init.o: ../../functions/mv.h ../../functions/nicedit.h ../../functions/node.h
|
||||
@@ -127,9 +128,10 @@ templates.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
templates.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
templates.o: ../../functions/cp.h ../../functions/default.h
|
||||
templates.o: ../../functions/download.h ../../functions/emacs.h
|
||||
templates.o: ../../functions/env.h ../../functions/last.h
|
||||
templates.o: ../../functions/login.h ../../functions/logout.h
|
||||
templates.o: ../../functions/ln.h ../../functions/ls.h ../../functions/man.h
|
||||
templates.o: ../../functions/env.h ../../functions/imgcrop.h
|
||||
templates.o: ../../functions/last.h ../../functions/login.h
|
||||
templates.o: ../../functions/logout.h ../../functions/ln.h
|
||||
templates.o: ../../functions/ls.h ../../functions/man.h
|
||||
templates.o: ../../functions/meta.h ../../functions/mkdir.h
|
||||
templates.o: ../../functions/mv.h ../../functions/nicedit.h
|
||||
templates.o: ../../functions/node.h ../../functions/passwd.h
|
||||
|
||||
@@ -51,21 +51,22 @@ createthread.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
createthread.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
createthread.o: ../../functions/cp.h ../../functions/default.h
|
||||
createthread.o: ../../functions/download.h ../../functions/emacs.h
|
||||
createthread.o: ../../functions/env.h ../../functions/last.h
|
||||
createthread.o: ../../functions/login.h ../../functions/logout.h
|
||||
createthread.o: ../../functions/ln.h ../../functions/ls.h
|
||||
createthread.o: ../../functions/man.h ../../functions/meta.h
|
||||
createthread.o: ../../functions/mkdir.h ../../functions/mv.h
|
||||
createthread.o: ../../functions/nicedit.h ../../functions/node.h
|
||||
createthread.o: ../../functions/passwd.h ../../functions/priv.h
|
||||
createthread.o: ../../functions/pw.h ../../functions/reload.h
|
||||
createthread.o: ../../functions/rm.h ../../functions/rmuser.h
|
||||
createthread.o: ../../functions/sort.h ../../functions/specialdefault.h
|
||||
createthread.o: ../../functions/stat.h ../../functions/subject.h
|
||||
createthread.o: ../../functions/template.h ../../functions/tinymce.h
|
||||
createthread.o: ../../functions/uname.h ../../functions/upload.h
|
||||
createthread.o: ../../functions/uptime.h ../../functions/who.h
|
||||
createthread.o: ../../functions/vim.h ../../core/htmlfilter.h
|
||||
createthread.o: ../../functions/env.h ../../functions/imgcrop.h
|
||||
createthread.o: ../../functions/last.h ../../functions/login.h
|
||||
createthread.o: ../../functions/logout.h ../../functions/ln.h
|
||||
createthread.o: ../../functions/ls.h ../../functions/man.h
|
||||
createthread.o: ../../functions/meta.h ../../functions/mkdir.h
|
||||
createthread.o: ../../functions/mv.h ../../functions/nicedit.h
|
||||
createthread.o: ../../functions/node.h ../../functions/passwd.h
|
||||
createthread.o: ../../functions/priv.h ../../functions/pw.h
|
||||
createthread.o: ../../functions/reload.h ../../functions/rm.h
|
||||
createthread.o: ../../functions/rmuser.h ../../functions/sort.h
|
||||
createthread.o: ../../functions/specialdefault.h ../../functions/stat.h
|
||||
createthread.o: ../../functions/subject.h ../../functions/template.h
|
||||
createthread.o: ../../functions/tinymce.h ../../functions/uname.h
|
||||
createthread.o: ../../functions/upload.h ../../functions/uptime.h
|
||||
createthread.o: ../../functions/who.h ../../functions/vim.h
|
||||
createthread.o: ../../core/htmlfilter.h
|
||||
funthread.o: ../../core/misc.h ../../core/item.h ../../core/requesttypes.h
|
||||
funthread.o: ../../../pikotools/textstream/textstream.h
|
||||
funthread.o: ../../../pikotools/space/space.h
|
||||
@@ -156,7 +157,8 @@ init.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
init.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
init.o: ../../functions/cp.h ../../functions/default.h
|
||||
init.o: ../../functions/download.h ../../functions/emacs.h
|
||||
init.o: ../../functions/env.h ../../functions/last.h ../../functions/login.h
|
||||
init.o: ../../functions/env.h ../../functions/imgcrop.h
|
||||
init.o: ../../functions/last.h ../../functions/login.h
|
||||
init.o: ../../functions/logout.h ../../functions/ln.h ../../functions/ls.h
|
||||
init.o: ../../functions/man.h ../../functions/meta.h ../../functions/mkdir.h
|
||||
init.o: ../../functions/mv.h ../../functions/nicedit.h ../../functions/node.h
|
||||
@@ -219,7 +221,8 @@ reply.o: ../../functions/privchanger.h ../../core/request.h
|
||||
reply.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
reply.o: ../../functions/cp.h ../../functions/default.h
|
||||
reply.o: ../../functions/download.h ../../functions/emacs.h
|
||||
reply.o: ../../functions/env.h ../../functions/last.h ../../functions/login.h
|
||||
reply.o: ../../functions/env.h ../../functions/imgcrop.h
|
||||
reply.o: ../../functions/last.h ../../functions/login.h
|
||||
reply.o: ../../functions/logout.h ../../functions/ln.h ../../functions/ls.h
|
||||
reply.o: ../../functions/man.h ../../functions/meta.h ../../functions/mkdir.h
|
||||
reply.o: ../../functions/mv.h ../../functions/nicedit.h
|
||||
@@ -333,9 +336,10 @@ templates.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
templates.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
templates.o: ../../functions/cp.h ../../functions/default.h
|
||||
templates.o: ../../functions/download.h ../../functions/emacs.h
|
||||
templates.o: ../../functions/env.h ../../functions/last.h
|
||||
templates.o: ../../functions/login.h ../../functions/logout.h
|
||||
templates.o: ../../functions/ln.h ../../functions/ls.h ../../functions/man.h
|
||||
templates.o: ../../functions/env.h ../../functions/imgcrop.h
|
||||
templates.o: ../../functions/last.h ../../functions/login.h
|
||||
templates.o: ../../functions/logout.h ../../functions/ln.h
|
||||
templates.o: ../../functions/ls.h ../../functions/man.h
|
||||
templates.o: ../../functions/meta.h ../../functions/mkdir.h
|
||||
templates.o: ../../functions/mv.h ../../functions/nicedit.h
|
||||
templates.o: ../../functions/node.h ../../functions/passwd.h
|
||||
@@ -400,9 +404,10 @@ threadinfo.o: ../../functions/privchanger.h ../../core/request.h
|
||||
threadinfo.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
threadinfo.o: ../../functions/cp.h ../../functions/default.h
|
||||
threadinfo.o: ../../functions/download.h ../../functions/emacs.h
|
||||
threadinfo.o: ../../functions/env.h ../../functions/last.h
|
||||
threadinfo.o: ../../functions/login.h ../../functions/logout.h
|
||||
threadinfo.o: ../../functions/ln.h ../../functions/ls.h ../../functions/man.h
|
||||
threadinfo.o: ../../functions/env.h ../../functions/imgcrop.h
|
||||
threadinfo.o: ../../functions/last.h ../../functions/login.h
|
||||
threadinfo.o: ../../functions/logout.h ../../functions/ln.h
|
||||
threadinfo.o: ../../functions/ls.h ../../functions/man.h
|
||||
threadinfo.o: ../../functions/meta.h ../../functions/mkdir.h
|
||||
threadinfo.o: ../../functions/mv.h ../../functions/nicedit.h
|
||||
threadinfo.o: ../../functions/node.h ../../functions/passwd.h
|
||||
|
||||
@@ -53,6 +53,15 @@ bool Reply::HasAccess()
|
||||
if( !files_dir || !system->HasWriteAccess(*files_dir) )
|
||||
return false;
|
||||
|
||||
|
||||
PT::Space * thread_space = cur->request->item.ameta.FindSpace(L"thread");
|
||||
|
||||
if( thread_space )
|
||||
{
|
||||
if( thread_space->Bool(L"closed", false) )
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -50,22 +50,23 @@ createticket.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
createticket.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
createticket.o: ../../functions/cp.h ../../functions/default.h
|
||||
createticket.o: ../../functions/download.h ../../functions/emacs.h
|
||||
createticket.o: ../../functions/env.h ../../functions/last.h
|
||||
createticket.o: ../../functions/login.h ../../functions/logout.h
|
||||
createticket.o: ../../functions/ln.h ../../functions/ls.h
|
||||
createticket.o: ../../functions/man.h ../../functions/meta.h
|
||||
createticket.o: ../../functions/mkdir.h ../../functions/mv.h
|
||||
createticket.o: ../../functions/nicedit.h ../../functions/node.h
|
||||
createticket.o: ../../functions/passwd.h ../../functions/priv.h
|
||||
createticket.o: ../../functions/pw.h ../../functions/reload.h
|
||||
createticket.o: ../../functions/rm.h ../../functions/rmuser.h
|
||||
createticket.o: ../../functions/sort.h ../../functions/specialdefault.h
|
||||
createticket.o: ../../functions/stat.h ../../functions/subject.h
|
||||
createticket.o: ../../functions/template.h ../../functions/tinymce.h
|
||||
createticket.o: ../../functions/uname.h ../../functions/upload.h
|
||||
createticket.o: ../../functions/uptime.h ../../functions/who.h
|
||||
createticket.o: ../../functions/vim.h ../../core/htmlfilter.h
|
||||
createticket.o: ../../templates/templates.h ../../templates/patterncacher.h
|
||||
createticket.o: ../../functions/env.h ../../functions/imgcrop.h
|
||||
createticket.o: ../../functions/last.h ../../functions/login.h
|
||||
createticket.o: ../../functions/logout.h ../../functions/ln.h
|
||||
createticket.o: ../../functions/ls.h ../../functions/man.h
|
||||
createticket.o: ../../functions/meta.h ../../functions/mkdir.h
|
||||
createticket.o: ../../functions/mv.h ../../functions/nicedit.h
|
||||
createticket.o: ../../functions/node.h ../../functions/passwd.h
|
||||
createticket.o: ../../functions/priv.h ../../functions/pw.h
|
||||
createticket.o: ../../functions/reload.h ../../functions/rm.h
|
||||
createticket.o: ../../functions/rmuser.h ../../functions/sort.h
|
||||
createticket.o: ../../functions/specialdefault.h ../../functions/stat.h
|
||||
createticket.o: ../../functions/subject.h ../../functions/template.h
|
||||
createticket.o: ../../functions/tinymce.h ../../functions/uname.h
|
||||
createticket.o: ../../functions/upload.h ../../functions/uptime.h
|
||||
createticket.o: ../../functions/who.h ../../functions/vim.h
|
||||
createticket.o: ../../core/htmlfilter.h ../../templates/templates.h
|
||||
createticket.o: ../../templates/patterncacher.h
|
||||
createticket.o: ../../templates/indexpatterns.h ../../templates/patterns.h
|
||||
createticket.o: ../../templates/changepatterns.h
|
||||
createticket.o: ../../templates/htmltextstream.h ../../core/sessionmanager.h
|
||||
@@ -115,9 +116,9 @@ editticket.o: ../../functions/privchanger.h ../../functions/chown.h
|
||||
editticket.o: ../../functions/ckeditor.h ../../functions/cp.h
|
||||
editticket.o: ../../functions/default.h ../../functions/download.h
|
||||
editticket.o: ../../functions/emacs.h ../../functions/env.h
|
||||
editticket.o: ../../functions/last.h ../../functions/login.h
|
||||
editticket.o: ../../functions/logout.h ../../functions/ln.h
|
||||
editticket.o: ../../functions/ls.h ../../functions/man.h
|
||||
editticket.o: ../../functions/imgcrop.h ../../functions/last.h
|
||||
editticket.o: ../../functions/login.h ../../functions/logout.h
|
||||
editticket.o: ../../functions/ln.h ../../functions/ls.h ../../functions/man.h
|
||||
editticket.o: ../../functions/meta.h ../../functions/mkdir.h
|
||||
editticket.o: ../../functions/mv.h ../../functions/nicedit.h
|
||||
editticket.o: ../../functions/node.h ../../functions/passwd.h
|
||||
@@ -132,6 +133,18 @@ editticket.o: ../../functions/upload.h ../../functions/uptime.h
|
||||
editticket.o: ../../functions/who.h ../../functions/vim.h
|
||||
editticket.o: ../../core/htmlfilter.h ../../functions/functionbase.h
|
||||
editticket.o: sessiondata.h ../../core/plugindata.h ../../functions/rm.h
|
||||
editticket.o: ../../core/plugin.h pluginmsg.h ../../core/system.h
|
||||
editticket.o: ../../core/job.h ../../core/basethread.h ../../core/synchro.h
|
||||
editticket.o: ../../core/dirs.h ../../core/dircontainer.h ../../core/mounts.h
|
||||
editticket.o: ../../core/mountparser.h ../../core/crypt.h ../../core/users.h
|
||||
editticket.o: ../../core/groups.h ../../core/group.h ../../core/loadavg.h
|
||||
editticket.o: ../../core/image.h ../../core/threadmanager.h
|
||||
editticket.o: ../../core/timezones.h ../../core/sessionmanager.h
|
||||
editticket.o: ../../core/sessioncontainer.h ../../core/ipbancontainer.h
|
||||
editticket.o: ../../templates/templates.h ../../templates/patterncacher.h
|
||||
editticket.o: ../../templates/indexpatterns.h ../../templates/patterns.h
|
||||
editticket.o: ../../templates/changepatterns.h
|
||||
editticket.o: ../../templates/htmltextstream.h ../../core/sessionmanager.h
|
||||
funticket.o: funticket.h tdb.h ticket.h ../../db/dbbase.h ../../core/error.h
|
||||
funticket.o: ticketinfo.h ../../core/item.h ../../core/system.h
|
||||
funticket.o: ../../functions/functions.h ../../functions/functionbase.h
|
||||
@@ -173,9 +186,10 @@ funticket.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
funticket.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
funticket.o: ../../functions/cp.h ../../functions/default.h
|
||||
funticket.o: ../../functions/download.h ../../functions/emacs.h
|
||||
funticket.o: ../../functions/env.h ../../functions/last.h
|
||||
funticket.o: ../../functions/login.h ../../functions/logout.h
|
||||
funticket.o: ../../functions/ln.h ../../functions/ls.h ../../functions/man.h
|
||||
funticket.o: ../../functions/env.h ../../functions/imgcrop.h
|
||||
funticket.o: ../../functions/last.h ../../functions/login.h
|
||||
funticket.o: ../../functions/logout.h ../../functions/ln.h
|
||||
funticket.o: ../../functions/ls.h ../../functions/man.h
|
||||
funticket.o: ../../functions/meta.h ../../functions/mkdir.h
|
||||
funticket.o: ../../functions/mv.h ../../functions/nicedit.h
|
||||
funticket.o: ../../functions/node.h ../../functions/passwd.h
|
||||
@@ -240,7 +254,8 @@ init.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
init.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
init.o: ../../functions/cp.h ../../functions/default.h
|
||||
init.o: ../../functions/download.h ../../functions/emacs.h
|
||||
init.o: ../../functions/env.h ../../functions/last.h ../../functions/login.h
|
||||
init.o: ../../functions/env.h ../../functions/imgcrop.h
|
||||
init.o: ../../functions/last.h ../../functions/login.h
|
||||
init.o: ../../functions/logout.h ../../functions/ln.h ../../functions/ls.h
|
||||
init.o: ../../functions/man.h ../../functions/meta.h ../../functions/mkdir.h
|
||||
init.o: ../../functions/mv.h ../../functions/nicedit.h ../../functions/node.h
|
||||
@@ -314,15 +329,15 @@ showtickets.o: ../../functions/privchanger.h ../../functions/chown.h
|
||||
showtickets.o: ../../functions/ckeditor.h ../../functions/cp.h
|
||||
showtickets.o: ../../functions/default.h ../../functions/download.h
|
||||
showtickets.o: ../../functions/emacs.h ../../functions/env.h
|
||||
showtickets.o: ../../functions/last.h ../../functions/login.h
|
||||
showtickets.o: ../../functions/logout.h ../../functions/ln.h
|
||||
showtickets.o: ../../functions/ls.h ../../functions/man.h
|
||||
showtickets.o: ../../functions/meta.h ../../functions/mkdir.h
|
||||
showtickets.o: ../../functions/mv.h ../../functions/nicedit.h
|
||||
showtickets.o: ../../functions/node.h ../../functions/passwd.h
|
||||
showtickets.o: ../../functions/priv.h ../../functions/pw.h
|
||||
showtickets.o: ../../functions/reload.h ../../functions/rm.h
|
||||
showtickets.o: ../../functions/rmuser.h ../../core/run.h
|
||||
showtickets.o: ../../functions/imgcrop.h ../../functions/last.h
|
||||
showtickets.o: ../../functions/login.h ../../functions/logout.h
|
||||
showtickets.o: ../../functions/ln.h ../../functions/ls.h
|
||||
showtickets.o: ../../functions/man.h ../../functions/meta.h
|
||||
showtickets.o: ../../functions/mkdir.h ../../functions/mv.h
|
||||
showtickets.o: ../../functions/nicedit.h ../../functions/node.h
|
||||
showtickets.o: ../../functions/passwd.h ../../functions/priv.h
|
||||
showtickets.o: ../../functions/pw.h ../../functions/reload.h
|
||||
showtickets.o: ../../functions/rm.h ../../functions/rmuser.h ../../core/run.h
|
||||
showtickets.o: ../../functions/sort.h ../../functions/specialdefault.h
|
||||
showtickets.o: ../../functions/stat.h ../../functions/subject.h
|
||||
showtickets.o: ../../functions/template.h ../../core/timezone.h
|
||||
@@ -384,9 +399,10 @@ templates.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
templates.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
templates.o: ../../functions/cp.h ../../functions/default.h
|
||||
templates.o: ../../functions/download.h ../../functions/emacs.h
|
||||
templates.o: ../../functions/env.h ../../functions/last.h
|
||||
templates.o: ../../functions/login.h ../../functions/logout.h
|
||||
templates.o: ../../functions/ln.h ../../functions/ls.h ../../functions/man.h
|
||||
templates.o: ../../functions/env.h ../../functions/imgcrop.h
|
||||
templates.o: ../../functions/last.h ../../functions/login.h
|
||||
templates.o: ../../functions/logout.h ../../functions/ln.h
|
||||
templates.o: ../../functions/ls.h ../../functions/man.h
|
||||
templates.o: ../../functions/meta.h ../../functions/mkdir.h
|
||||
templates.o: ../../functions/mv.h ../../functions/nicedit.h
|
||||
templates.o: ../../functions/node.h ../../functions/passwd.h
|
||||
@@ -456,9 +472,9 @@ ticketinfo.o: ../../functions/privchanger.h ../../functions/chown.h
|
||||
ticketinfo.o: ../../functions/ckeditor.h ../../functions/cp.h
|
||||
ticketinfo.o: ../../functions/default.h ../../functions/download.h
|
||||
ticketinfo.o: ../../functions/emacs.h ../../functions/env.h
|
||||
ticketinfo.o: ../../functions/last.h ../../functions/login.h
|
||||
ticketinfo.o: ../../functions/logout.h ../../functions/ln.h
|
||||
ticketinfo.o: ../../functions/ls.h ../../functions/man.h
|
||||
ticketinfo.o: ../../functions/imgcrop.h ../../functions/last.h
|
||||
ticketinfo.o: ../../functions/login.h ../../functions/logout.h
|
||||
ticketinfo.o: ../../functions/ln.h ../../functions/ls.h ../../functions/man.h
|
||||
ticketinfo.o: ../../functions/meta.h ../../functions/mkdir.h
|
||||
ticketinfo.o: ../../functions/mv.h ../../functions/nicedit.h
|
||||
ticketinfo.o: ../../functions/node.h ../../functions/passwd.h
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include "editticket.h"
|
||||
#include "functions/functions.h"
|
||||
#include "sessiondata.h"
|
||||
#include "core/plugin.h"
|
||||
#include "pluginmsg.h"
|
||||
|
||||
|
||||
|
||||
@@ -50,6 +52,8 @@ bool EditTicket::HasAccess()
|
||||
if( cur->mount->type != ticket_info->mount_type_ticket )
|
||||
return false;
|
||||
|
||||
// !! CHECKME what about closing threads?
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -162,6 +166,26 @@ return new_space;
|
||||
}
|
||||
|
||||
|
||||
bool EditTicket::CloseTicket()
|
||||
{
|
||||
PT::Space & ticket_space = cur->request->item.ameta.FindAddSpace(L"ticket");
|
||||
ticket_space.Add(L"closed", true);
|
||||
|
||||
PT::Space & thread_space = cur->request->item.ameta.FindAddSpace(L"thread");
|
||||
thread_space.Add(L"closed", true);
|
||||
|
||||
if( db->EditAdminMetaById(cur->request->item.ameta, cur->request->item.id) == WINIX_ERR_OK )
|
||||
{
|
||||
log << log3 << "EditTicket: closing ticket" << logend;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void EditTicket::MakePost()
|
||||
{
|
||||
ticket_info->Clear();
|
||||
@@ -170,19 +194,31 @@ void EditTicket::MakePost()
|
||||
Ticket & ticket = PrepareTicket();
|
||||
PT::Space & meta = PrepareSpace();
|
||||
Item & item = cur->request->item;
|
||||
|
||||
old_url = item.url;
|
||||
ticket_info->ticket = &ticket;
|
||||
ticket_info->item = &item;
|
||||
|
||||
ticket_info->ReadTicketParams(ticket, false, meta);
|
||||
functions->ReadItem(item, Item::file);
|
||||
|
||||
ticket_info->CopyTicketSpace(meta, item);
|
||||
|
||||
if( !cur->request->IsPostVar(L"fileuploadsubmit") )
|
||||
if( cur->request->IsParam(L"close") )
|
||||
{
|
||||
Submit(ticket, item);
|
||||
ticket_info->ticket = ticket_info->GetEmptyTicket(); // ticket was deleted by Submit() method -- RemoveTmpTicket() was used
|
||||
if( CloseTicket() )
|
||||
plugin.Call(WINIX_PL_TICKET_CLOSED, ticket_info->item, ticket_info->ticket);
|
||||
|
||||
ticket_info->MakeRedirectIfPossible(*cur->request->last_item);
|
||||
}
|
||||
else
|
||||
{
|
||||
ticket_info->ReadTicketParams(ticket, false, meta);
|
||||
functions->ReadItem(item, Item::file);
|
||||
|
||||
ticket_info->CopyTicketSpace(meta, item);
|
||||
|
||||
if( !cur->request->IsPostVar(L"fileuploadsubmit") )
|
||||
{
|
||||
Submit(ticket, item);
|
||||
ticket_info->ticket = ticket_info->GetEmptyTicket(); // ticket was deleted by Submit() method -- RemoveTmpTicket() was used
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ private:
|
||||
PT::Space & PrepareSpace();
|
||||
void ChangeTicket(Ticket & ticket, Item & item);
|
||||
void Submit(Ticket & ticket, Item & item);
|
||||
bool CloseTicket();
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -38,6 +38,10 @@
|
||||
#define WINIX_PL_TICKET_TICKETS_TAB_IS_NEXT 4104
|
||||
|
||||
|
||||
// a ticket has been closed (closed button pressed)
|
||||
// in p1 you have a pointer to the Item struct
|
||||
// in p2 you have a pointer to the Ticket struct
|
||||
#define WINIX_PL_TICKET_CLOSED 4105
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -274,6 +274,14 @@ void ticket_meta_value(Info & i)
|
||||
space(i, ticket_info.item->meta);
|
||||
}
|
||||
|
||||
void ticket_is_closed(Info & i)
|
||||
{
|
||||
PT::Space * ticket_space = cur->request->item.ameta.FindSpace(L"ticket");
|
||||
|
||||
if( ticket_space )
|
||||
i.res = ticket_space->Bool(L"closed", false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
namespace ns_tickets_tab
|
||||
@@ -414,6 +422,21 @@ void tickets_tab(Info & i)
|
||||
}
|
||||
|
||||
|
||||
void tickets_tab_is_closed(Info & i)
|
||||
{
|
||||
tickets_tab_check_reqid();
|
||||
|
||||
if( tickets_value.is_item )
|
||||
{
|
||||
PT::Space * ticket_space = tickets_value.item->ameta.FindSpace(L"ticket");
|
||||
|
||||
if( ticket_space )
|
||||
i.res = ticket_space->Bool(L"closed", false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void tickets_tab_url(Info & i)
|
||||
{
|
||||
tickets_tab_check_reqid();
|
||||
@@ -844,8 +867,10 @@ using namespace ns_ticket_tab;
|
||||
fun->Insert("ticket_can_edit", ticket_can_edit);
|
||||
fun->Insert("ticket_is_creating_new", ticket_is_creating_new);
|
||||
fun->Insert("ticket_meta_value", ticket_meta_value);
|
||||
fun->Insert("ticket_is_closed", ticket_is_closed);
|
||||
|
||||
fun->Insert("tickets_tab", tickets_tab);
|
||||
fun->Insert("tickets_tab_is_closed", tickets_tab_is_closed);
|
||||
fun->Insert("tickets_tab_url", tickets_tab_url);
|
||||
fun->Insert("tickets_tab_subject_empty", tickets_tab_subject_empty);
|
||||
fun->Insert("tickets_tab_subject", tickets_tab_subject);
|
||||
|
||||
@@ -123,16 +123,16 @@ dir.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
|
||||
dir.o: ../functions/privchanger.h ../functions/chown.h
|
||||
dir.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h
|
||||
dir.o: ../functions/download.h ../functions/emacs.h ../functions/env.h
|
||||
dir.o: ../functions/last.h ../functions/login.h ../functions/logout.h
|
||||
dir.o: ../functions/ln.h ../functions/ls.h ../functions/man.h
|
||||
dir.o: ../functions/meta.h ../functions/mkdir.h ../functions/mv.h
|
||||
dir.o: ../functions/nicedit.h ../functions/node.h ../functions/passwd.h
|
||||
dir.o: ../functions/priv.h ../functions/pw.h ../functions/reload.h
|
||||
dir.o: ../functions/rm.h ../functions/rmuser.h ../functions/sort.h
|
||||
dir.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
dir.o: ../functions/imgcrop.h ../functions/last.h ../functions/login.h
|
||||
dir.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
dir.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
|
||||
dir.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
|
||||
dir.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
|
||||
dir.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
|
||||
dir.o: ../functions/sort.h ../functions/specialdefault.h ../functions/stat.h
|
||||
dir.o: ../functions/subject.h ../functions/template.h ../functions/tinymce.h
|
||||
dir.o: ../functions/uname.h ../functions/upload.h ../functions/uptime.h
|
||||
dir.o: ../functions/who.h ../functions/vim.h
|
||||
dir.o: ../functions/who.h ../functions/vim.h miscspace.h
|
||||
doc.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/generator.h
|
||||
doc.o: ../../ezc/src/pattern.h ../../ezc/src/item.h ../../ezc/src/funinfo.h
|
||||
doc.o: ../../ezc/src/functions.h ../../ezc/src/stringconv.h
|
||||
@@ -204,13 +204,13 @@ env.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
|
||||
env.o: ../functions/privchanger.h ../functions/chown.h
|
||||
env.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h
|
||||
env.o: ../functions/download.h ../functions/emacs.h ../functions/env.h
|
||||
env.o: ../functions/last.h ../functions/login.h ../functions/logout.h
|
||||
env.o: ../functions/ln.h ../functions/ls.h ../functions/man.h
|
||||
env.o: ../functions/meta.h ../functions/mkdir.h ../functions/mv.h
|
||||
env.o: ../functions/nicedit.h ../functions/node.h ../functions/passwd.h
|
||||
env.o: ../functions/priv.h ../functions/pw.h ../functions/reload.h
|
||||
env.o: ../functions/rm.h ../functions/rmuser.h ../functions/sort.h
|
||||
env.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
env.o: ../functions/imgcrop.h ../functions/last.h ../functions/login.h
|
||||
env.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
env.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
|
||||
env.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
|
||||
env.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
|
||||
env.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
|
||||
env.o: ../functions/sort.h ../functions/specialdefault.h ../functions/stat.h
|
||||
env.o: ../functions/subject.h ../functions/template.h ../functions/tinymce.h
|
||||
env.o: ../functions/uname.h ../functions/upload.h ../functions/uptime.h
|
||||
env.o: ../functions/who.h ../functions/vim.h
|
||||
@@ -355,14 +355,15 @@ ipban.o: ../functions/functionparser.h ../functions/adduser.h
|
||||
ipban.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h
|
||||
ipban.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h
|
||||
ipban.o: ../functions/default.h ../functions/download.h ../functions/emacs.h
|
||||
ipban.o: ../functions/env.h ../functions/last.h ../functions/login.h
|
||||
ipban.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
ipban.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
|
||||
ipban.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
|
||||
ipban.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
|
||||
ipban.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
|
||||
ipban.o: ../functions/sort.h ../functions/specialdefault.h
|
||||
ipban.o: ../functions/stat.h ../functions/subject.h ../functions/template.h
|
||||
ipban.o: ../functions/env.h ../functions/imgcrop.h ../functions/last.h
|
||||
ipban.o: ../functions/login.h ../functions/logout.h ../functions/ln.h
|
||||
ipban.o: ../functions/ls.h ../functions/man.h ../functions/meta.h
|
||||
ipban.o: ../functions/mkdir.h ../functions/mv.h ../functions/nicedit.h
|
||||
ipban.o: ../functions/node.h ../functions/passwd.h ../functions/priv.h
|
||||
ipban.o: ../functions/pw.h ../functions/reload.h ../functions/rm.h
|
||||
ipban.o: ../functions/rmuser.h ../functions/sort.h
|
||||
ipban.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
ipban.o: ../functions/subject.h ../functions/template.h
|
||||
ipban.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
|
||||
ipban.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
item.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/generator.h
|
||||
@@ -498,14 +499,14 @@ login.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
|
||||
login.o: ../functions/privchanger.h ../functions/chown.h
|
||||
login.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h
|
||||
login.o: ../functions/download.h ../functions/emacs.h ../functions/env.h
|
||||
login.o: ../functions/last.h ../functions/login.h ../functions/logout.h
|
||||
login.o: ../functions/ln.h ../functions/ls.h ../functions/man.h
|
||||
login.o: ../functions/meta.h ../functions/mkdir.h ../functions/mv.h
|
||||
login.o: ../functions/nicedit.h ../functions/node.h ../functions/passwd.h
|
||||
login.o: ../functions/priv.h ../functions/pw.h ../functions/reload.h
|
||||
login.o: ../functions/rm.h ../functions/rmuser.h ../functions/sort.h
|
||||
login.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
login.o: ../functions/subject.h ../functions/template.h
|
||||
login.o: ../functions/imgcrop.h ../functions/last.h ../functions/login.h
|
||||
login.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
login.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
|
||||
login.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
|
||||
login.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
|
||||
login.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
|
||||
login.o: ../functions/sort.h ../functions/specialdefault.h
|
||||
login.o: ../functions/stat.h ../functions/subject.h ../functions/template.h
|
||||
login.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
|
||||
login.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
ls.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/generator.h
|
||||
@@ -579,13 +580,14 @@ man.o: ../functions/functionparser.h ../functions/adduser.h
|
||||
man.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h
|
||||
man.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h
|
||||
man.o: ../functions/default.h ../functions/download.h ../functions/emacs.h
|
||||
man.o: ../functions/env.h ../functions/last.h ../functions/login.h
|
||||
man.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
man.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
|
||||
man.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
|
||||
man.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
|
||||
man.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
|
||||
man.o: ../functions/sort.h ../functions/specialdefault.h ../functions/stat.h
|
||||
man.o: ../functions/env.h ../functions/imgcrop.h ../functions/last.h
|
||||
man.o: ../functions/login.h ../functions/logout.h ../functions/ln.h
|
||||
man.o: ../functions/ls.h ../functions/man.h ../functions/meta.h
|
||||
man.o: ../functions/mkdir.h ../functions/mv.h ../functions/nicedit.h
|
||||
man.o: ../functions/node.h ../functions/passwd.h ../functions/priv.h
|
||||
man.o: ../functions/pw.h ../functions/reload.h ../functions/rm.h
|
||||
man.o: ../functions/rmuser.h ../functions/sort.h
|
||||
man.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
man.o: ../functions/subject.h ../functions/template.h ../functions/tinymce.h
|
||||
man.o: ../functions/uname.h ../functions/upload.h ../functions/uptime.h
|
||||
man.o: ../functions/who.h ../functions/vim.h
|
||||
@@ -764,13 +766,14 @@ priv.o: ../functions/functionparser.h ../functions/adduser.h
|
||||
priv.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h
|
||||
priv.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h
|
||||
priv.o: ../functions/default.h ../functions/download.h ../functions/emacs.h
|
||||
priv.o: ../functions/env.h ../functions/last.h ../functions/login.h
|
||||
priv.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
priv.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
|
||||
priv.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
|
||||
priv.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
|
||||
priv.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
|
||||
priv.o: ../functions/sort.h ../functions/specialdefault.h ../functions/stat.h
|
||||
priv.o: ../functions/env.h ../functions/imgcrop.h ../functions/last.h
|
||||
priv.o: ../functions/login.h ../functions/logout.h ../functions/ln.h
|
||||
priv.o: ../functions/ls.h ../functions/man.h ../functions/meta.h
|
||||
priv.o: ../functions/mkdir.h ../functions/mv.h ../functions/nicedit.h
|
||||
priv.o: ../functions/node.h ../functions/passwd.h ../functions/priv.h
|
||||
priv.o: ../functions/pw.h ../functions/reload.h ../functions/rm.h
|
||||
priv.o: ../functions/rmuser.h ../functions/sort.h
|
||||
priv.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
priv.o: ../functions/subject.h ../functions/template.h ../functions/tinymce.h
|
||||
priv.o: ../functions/uname.h ../functions/upload.h ../functions/uptime.h
|
||||
priv.o: ../functions/who.h ../functions/vim.h
|
||||
@@ -947,13 +950,14 @@ sys.o: ../functions/functionparser.h ../functions/adduser.h
|
||||
sys.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h
|
||||
sys.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h
|
||||
sys.o: ../functions/default.h ../functions/download.h ../functions/emacs.h
|
||||
sys.o: ../functions/env.h ../functions/last.h ../functions/login.h
|
||||
sys.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
sys.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
|
||||
sys.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
|
||||
sys.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
|
||||
sys.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
|
||||
sys.o: ../functions/sort.h ../functions/specialdefault.h ../functions/stat.h
|
||||
sys.o: ../functions/env.h ../functions/imgcrop.h ../functions/last.h
|
||||
sys.o: ../functions/login.h ../functions/logout.h ../functions/ln.h
|
||||
sys.o: ../functions/ls.h ../functions/man.h ../functions/meta.h
|
||||
sys.o: ../functions/mkdir.h ../functions/mv.h ../functions/nicedit.h
|
||||
sys.o: ../functions/node.h ../functions/passwd.h ../functions/priv.h
|
||||
sys.o: ../functions/pw.h ../functions/reload.h ../functions/rm.h
|
||||
sys.o: ../functions/rmuser.h ../functions/sort.h
|
||||
sys.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
sys.o: ../functions/subject.h ../functions/template.h ../functions/tinymce.h
|
||||
sys.o: ../functions/uname.h ../functions/upload.h ../functions/uptime.h
|
||||
sys.o: ../functions/who.h ../functions/vim.h ../templates/templates.h
|
||||
@@ -1037,17 +1041,17 @@ templates.o: ../functions/cat.h ../functions/chmod.h
|
||||
templates.o: ../functions/privchanger.h ../functions/chown.h
|
||||
templates.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h
|
||||
templates.o: ../functions/download.h ../functions/emacs.h ../functions/env.h
|
||||
templates.o: ../functions/last.h ../functions/login.h ../functions/logout.h
|
||||
templates.o: ../functions/ln.h ../functions/ls.h ../functions/man.h
|
||||
templates.o: ../functions/meta.h ../functions/mkdir.h ../functions/mv.h
|
||||
templates.o: ../functions/nicedit.h ../functions/node.h ../functions/passwd.h
|
||||
templates.o: ../functions/priv.h ../functions/pw.h ../functions/reload.h
|
||||
templates.o: ../functions/rm.h ../functions/rmuser.h ../functions/sort.h
|
||||
templates.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
templates.o: ../functions/subject.h ../functions/template.h
|
||||
templates.o: ../functions/tinymce.h ../functions/uname.h
|
||||
templates.o: ../functions/upload.h ../functions/uptime.h ../functions/who.h
|
||||
templates.o: ../functions/vim.h ../templates/templates.h
|
||||
templates.o: ../functions/imgcrop.h ../functions/last.h ../functions/login.h
|
||||
templates.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
templates.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
|
||||
templates.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
|
||||
templates.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
|
||||
templates.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
|
||||
templates.o: ../functions/sort.h ../functions/specialdefault.h
|
||||
templates.o: ../functions/stat.h ../functions/subject.h
|
||||
templates.o: ../functions/template.h ../functions/tinymce.h
|
||||
templates.o: ../functions/uname.h ../functions/upload.h ../functions/uptime.h
|
||||
templates.o: ../functions/who.h ../functions/vim.h ../templates/templates.h
|
||||
textextstream.o: textextstream.h ../core/textstream.h misc.h localefilter.h
|
||||
textextstream.o: locale.h ../../pikotools/space/spaceparser.h
|
||||
textextstream.o: ../../pikotools/space/space.h
|
||||
@@ -1238,14 +1242,15 @@ winix.o: ../functions/functionparser.h ../functions/adduser.h
|
||||
winix.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h
|
||||
winix.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h
|
||||
winix.o: ../functions/default.h ../functions/download.h ../functions/emacs.h
|
||||
winix.o: ../functions/env.h ../functions/last.h ../functions/login.h
|
||||
winix.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
|
||||
winix.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
|
||||
winix.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
|
||||
winix.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
|
||||
winix.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
|
||||
winix.o: ../functions/sort.h ../functions/specialdefault.h
|
||||
winix.o: ../functions/stat.h ../functions/subject.h ../functions/template.h
|
||||
winix.o: ../functions/env.h ../functions/imgcrop.h ../functions/last.h
|
||||
winix.o: ../functions/login.h ../functions/logout.h ../functions/ln.h
|
||||
winix.o: ../functions/ls.h ../functions/man.h ../functions/meta.h
|
||||
winix.o: ../functions/mkdir.h ../functions/mv.h ../functions/nicedit.h
|
||||
winix.o: ../functions/node.h ../functions/passwd.h ../functions/priv.h
|
||||
winix.o: ../functions/pw.h ../functions/reload.h ../functions/rm.h
|
||||
winix.o: ../functions/rmuser.h ../functions/sort.h
|
||||
winix.o: ../functions/specialdefault.h ../functions/stat.h
|
||||
winix.o: ../functions/subject.h ../functions/template.h
|
||||
winix.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
|
||||
winix.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
winix.o: ../templates/templates.h ../core/misc.h
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "templates.h"
|
||||
#include "core/misc.h"
|
||||
#include "functions/functions.h"
|
||||
#include "miscspace.h"
|
||||
|
||||
|
||||
namespace TemplatesFunctions
|
||||
@@ -432,14 +433,71 @@ void dir_last_has_html_template(Info & i)
|
||||
}
|
||||
|
||||
|
||||
|
||||
void dir_last_meta_str(Info & i)
|
||||
{
|
||||
cur->request->dir_tab.back()->meta.Serialize(i.out, true, false);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_meta(Info & i)
|
||||
{
|
||||
space(i, cur->request->dir_tab.back()->meta);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_meta_tab(Info & i)
|
||||
{
|
||||
spaces_tab(i, cur->request->dir_tab.back()->meta);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_meta_tab_value(Info & i)
|
||||
{
|
||||
spaces_tab_value(i, cur->request->dir_tab.back()->meta);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void dir_last_meta_tab_has_next(Info & i)
|
||||
{
|
||||
spaces_tab_has_next(i, cur->request->dir_tab.back()->meta);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void dir_last_admin_meta_str(Info & i)
|
||||
{
|
||||
cur->request->dir_tab.back()->ameta.Serialize(i.out, true, false);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_admin_meta(Info & i)
|
||||
{
|
||||
space(i, cur->request->dir_tab.back()->ameta);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_admin_meta_tab(Info & i)
|
||||
{
|
||||
spaces_tab(i, cur->request->dir_tab.back()->ameta);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_admin_meta_tab_value(Info & i)
|
||||
{
|
||||
spaces_tab_value(i, cur->request->dir_tab.back()->ameta);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_admin_meta_tab_has_next(Info & i)
|
||||
{
|
||||
spaces_tab_has_next(i, cur->request->dir_tab.back()->ameta);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace TemplatesFunctions
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2012, Tomasz Sowa
|
||||
* Copyright (c) 2008-2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -393,10 +393,12 @@ void item_meta_str(Info & i)
|
||||
|
||||
void item_meta(Info & i)
|
||||
{
|
||||
space(i, cur->request->last_item->meta);
|
||||
space(i, cur->request->last_item->meta); // !! a new interface (last_item instead of item)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void item_meta_tab(Info & i)
|
||||
{
|
||||
spaces_tab(i, cur->request->last_item->meta);
|
||||
@@ -418,6 +420,38 @@ void item_meta_tab_has_next(Info & i)
|
||||
|
||||
|
||||
|
||||
void item_admin_meta_str(Info & i)
|
||||
{
|
||||
cur->request->item.ameta.Serialize(i.out, true, false);
|
||||
}
|
||||
|
||||
|
||||
void item_admin_meta(Info & i)
|
||||
{
|
||||
space(i, cur->request->last_item->ameta);
|
||||
}
|
||||
|
||||
|
||||
void item_admin_meta_tab(Info & i)
|
||||
{
|
||||
spaces_tab(i, cur->request->last_item->ameta);
|
||||
}
|
||||
|
||||
|
||||
void item_admin_meta_tab_value(Info & i)
|
||||
{
|
||||
spaces_tab_value(i, cur->request->last_item->ameta);
|
||||
}
|
||||
|
||||
|
||||
void item_admin_meta_tab_has_next(Info & i)
|
||||
{
|
||||
spaces_tab_has_next(i, cur->request->last_item->ameta);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static size_t item_index;
|
||||
@@ -769,6 +803,48 @@ void item_tab_has_next(Info & i)
|
||||
i.res = item_index + 1 < cur->request->item_tab.size();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void item_tab_meta_str(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
cur->request->item_tab[item_index].meta.Serialize(i.out, true, false);
|
||||
}
|
||||
|
||||
|
||||
void item_tab_meta(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
space(i, cur->request->item_tab[item_index].meta);
|
||||
}
|
||||
|
||||
|
||||
void item_tab_meta_tab(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
spaces_tab(i, cur->request->item_tab[item_index].meta);
|
||||
}
|
||||
|
||||
|
||||
void item_tab_meta_tab_value(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
spaces_tab_value(i, cur->request->item_tab[item_index].meta);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void item_tab_meta_tab_has_next(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
spaces_tab_has_next(i, cur->request->item_tab[item_index].meta);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace TemplatesFunctions
|
||||
|
||||
|
||||
|
||||
@@ -225,8 +225,36 @@ void Templates::CreateFunctions()
|
||||
ezc_functions.Insert("dir_last_html_template", dir_last_html_template);
|
||||
ezc_functions.Insert("dir_last_has_html_template", dir_last_has_html_template);
|
||||
ezc_functions.Insert("dir_last_meta_str", dir_last_meta_str);
|
||||
ezc_functions.Insert("dir_last_meta", dir_last_meta);
|
||||
ezc_functions.Insert("dir_last_meta_tab", dir_last_meta_tab);
|
||||
ezc_functions.Insert("dir_last_meta_tab_value", dir_last_meta_tab_value);
|
||||
ezc_functions.Insert("dir_last_meta_tab_has_next", dir_last_meta_tab_has_next);
|
||||
ezc_functions.Insert("dir_last_admin_meta_str", dir_last_admin_meta_str);
|
||||
ezc_functions.Insert("dir_last_admin_meta", dir_last_admin_meta);
|
||||
ezc_functions.Insert("dir_last_admin_meta_tab", dir_last_admin_meta_tab);
|
||||
ezc_functions.Insert("dir_last_admin_meta_tab_value", dir_last_admin_meta_tab_value);
|
||||
ezc_functions.Insert("dir_last_admin_meta_tab_has_next", dir_last_admin_meta_tab_has_next);
|
||||
|
||||
|
||||
/*
|
||||
doc
|
||||
*/
|
||||
ezc_functions.Insert("doc_title", doc_title);
|
||||
ezc_functions.Insert("doc_proto", doc_proto);
|
||||
ezc_functions.Insert("doc_proto_static", doc_proto_static);
|
||||
ezc_functions.Insert("doc_proto_common", doc_proto_common);
|
||||
ezc_functions.Insert("doc_base_url", doc_base_url);
|
||||
ezc_functions.Insert("doc_base_url_static", doc_base_url_static);
|
||||
ezc_functions.Insert("doc_base_url_common", doc_base_url_common);
|
||||
ezc_functions.Insert("doc_current_url", doc_current_url);
|
||||
ezc_functions.Insert("doc_css_tab", doc_css_tab);
|
||||
ezc_functions.Insert("doc_css_tab_file", doc_css_tab_file);
|
||||
ezc_functions.Insert("doc_css_tab_file_is_global", doc_css_tab_file_is_global);
|
||||
ezc_functions.Insert("doc_css_tab_has_next", doc_css_tab_has_next);
|
||||
ezc_functions.Insert("doc_css_is_empty", doc_css_is_empty);
|
||||
ezc_functions.Insert("doc_css_is_one", doc_css_is_one);
|
||||
ezc_functions.Insert("doc_css_more_than_one", doc_css_more_than_one);
|
||||
|
||||
/*
|
||||
env
|
||||
*/
|
||||
@@ -253,26 +281,6 @@ void Templates::CreateFunctions()
|
||||
ezc_functions.Insert("fil_new_line_to_br", fil_new_line_to_br);
|
||||
|
||||
|
||||
/*
|
||||
doc
|
||||
*/
|
||||
ezc_functions.Insert("doc_title", doc_title);
|
||||
ezc_functions.Insert("doc_proto", doc_proto);
|
||||
ezc_functions.Insert("doc_proto_static", doc_proto_static);
|
||||
ezc_functions.Insert("doc_proto_common", doc_proto_common);
|
||||
ezc_functions.Insert("doc_base_url", doc_base_url);
|
||||
ezc_functions.Insert("doc_base_url_static", doc_base_url_static);
|
||||
ezc_functions.Insert("doc_base_url_common", doc_base_url_common);
|
||||
ezc_functions.Insert("doc_current_url", doc_current_url);
|
||||
ezc_functions.Insert("doc_css_tab", doc_css_tab);
|
||||
ezc_functions.Insert("doc_css_tab_file", doc_css_tab_file);
|
||||
ezc_functions.Insert("doc_css_tab_file_is_global", doc_css_tab_file_is_global);
|
||||
ezc_functions.Insert("doc_css_tab_has_next", doc_css_tab_has_next);
|
||||
ezc_functions.Insert("doc_css_is_empty", doc_css_is_empty);
|
||||
ezc_functions.Insert("doc_css_is_one", doc_css_is_one);
|
||||
ezc_functions.Insert("doc_css_more_than_one", doc_css_more_than_one);
|
||||
|
||||
|
||||
/*
|
||||
insert
|
||||
*/
|
||||
@@ -345,45 +353,55 @@ void Templates::CreateFunctions()
|
||||
ezc_functions.Insert("item_meta_tab", item_meta_tab);
|
||||
ezc_functions.Insert("item_meta_tab_value", item_meta_tab_value);
|
||||
ezc_functions.Insert("item_meta_tab_has_next", item_meta_tab_has_next);
|
||||
ezc_functions.Insert("item_admin_meta_str", item_admin_meta_str);
|
||||
ezc_functions.Insert("item_admin_meta", item_admin_meta);
|
||||
ezc_functions.Insert("item_admin_meta_tab", item_admin_meta_tab);
|
||||
ezc_functions.Insert("item_admin_meta_tab_value", item_admin_meta_tab_value);
|
||||
ezc_functions.Insert("item_admin_meta_tab_has_next", item_admin_meta_tab_has_next);
|
||||
|
||||
ezc_functions.Insert("item_tab", item_tab);
|
||||
ezc_functions.Insert("item_tab_index", item_tab_index);
|
||||
ezc_functions.Insert("item_tab_id", item_tab_id);
|
||||
ezc_functions.Insert("item_tab_subject", item_tab_subject);
|
||||
ezc_functions.Insert("item_tab_subject_noescape", item_tab_subject_noescape);
|
||||
ezc_functions.Insert("item_tab_content", item_tab_content);
|
||||
ezc_functions.Insert("item_tab_content_noescape", item_tab_content_noescape);
|
||||
ezc_functions.Insert("item_tab_print_content", item_tab_print_content);
|
||||
ezc_functions.Insert("item_tab_privileges", item_tab_privileges);
|
||||
ezc_functions.Insert("item_tab_dir", item_tab_dir);
|
||||
ezc_functions.Insert("item_tab_url", item_tab_url);
|
||||
ezc_functions.Insert("item_tab_link", item_tab_link);
|
||||
ezc_functions.Insert("item_tab_filetype_is_none", item_tab_filetype_is_none);
|
||||
ezc_functions.Insert("item_tab_filetype_is_image", item_tab_filetype_is_image);
|
||||
ezc_functions.Insert("item_tab_can_read", item_tab_can_read);
|
||||
ezc_functions.Insert("item_tab_can_write", item_tab_can_write);
|
||||
ezc_functions.Insert("item_tab_user", item_tab_user);
|
||||
ezc_functions.Insert("item_tab_modification_user", item_tab_modification_user);
|
||||
ezc_functions.Insert("item_tab_users_different", item_tab_users_different);
|
||||
ezc_functions.Insert("item_tab_group", item_tab_group);
|
||||
ezc_functions.Insert("item_tab_date_creation", item_tab_date_creation);
|
||||
ezc_functions.Insert("item_tab_date_modification", item_tab_date_modification);
|
||||
ezc_functions.Insert("item_tab_date_creation_nice", item_tab_date_creation_nice);
|
||||
ezc_functions.Insert("item_tab_date_modification_nice", item_tab_date_modification_nice);
|
||||
ezc_functions.Insert("item_tab_dates_equal", item_tab_dates_equal);
|
||||
ezc_functions.Insert("item_tab_run", item_tab_run);
|
||||
ezc_functions.Insert("item_tab_can_use_emacs", item_tab_can_use_emacs);
|
||||
ezc_functions.Insert("item_tab_has_static_file", item_tab_has_static_file);
|
||||
ezc_functions.Insert("item_tab_has_thumb", item_tab_has_thumb);
|
||||
ezc_functions.Insert("item_tab_type_is_dir", item_tab_type_is_dir);
|
||||
ezc_functions.Insert("item_tab_type_is_file", item_tab_type_is_file);
|
||||
ezc_functions.Insert("item_tab_type_is_symlink", item_tab_type_is_symlink);
|
||||
ezc_functions.Insert("item_tab_is_link_to", item_tab_is_link_to);
|
||||
ezc_functions.Insert("item_tab_link_to", item_tab_link_to);
|
||||
ezc_functions.Insert("item_tab_is_link_redirect", item_tab_is_link_redirect);
|
||||
ezc_functions.Insert("item_tab_file_size", item_tab_file_size);
|
||||
ezc_functions.Insert("item_tab_sort", item_tab_sort);
|
||||
ezc_functions.Insert("item_tab_has_next", item_tab_has_next);
|
||||
ezc_functions.Insert("item_tab", item_tab);
|
||||
ezc_functions.Insert("item_tab_index", item_tab_index);
|
||||
ezc_functions.Insert("item_tab_id", item_tab_id);
|
||||
ezc_functions.Insert("item_tab_subject", item_tab_subject);
|
||||
ezc_functions.Insert("item_tab_subject_noescape", item_tab_subject_noescape);
|
||||
ezc_functions.Insert("item_tab_content", item_tab_content);
|
||||
ezc_functions.Insert("item_tab_content_noescape", item_tab_content_noescape);
|
||||
ezc_functions.Insert("item_tab_print_content", item_tab_print_content);
|
||||
ezc_functions.Insert("item_tab_privileges", item_tab_privileges);
|
||||
ezc_functions.Insert("item_tab_dir", item_tab_dir);
|
||||
ezc_functions.Insert("item_tab_url", item_tab_url);
|
||||
ezc_functions.Insert("item_tab_link", item_tab_link);
|
||||
ezc_functions.Insert("item_tab_filetype_is_none", item_tab_filetype_is_none);
|
||||
ezc_functions.Insert("item_tab_filetype_is_image", item_tab_filetype_is_image);
|
||||
ezc_functions.Insert("item_tab_can_read", item_tab_can_read);
|
||||
ezc_functions.Insert("item_tab_can_write", item_tab_can_write);
|
||||
ezc_functions.Insert("item_tab_user", item_tab_user);
|
||||
ezc_functions.Insert("item_tab_modification_user", item_tab_modification_user);
|
||||
ezc_functions.Insert("item_tab_users_different", item_tab_users_different);
|
||||
ezc_functions.Insert("item_tab_group", item_tab_group);
|
||||
ezc_functions.Insert("item_tab_date_creation", item_tab_date_creation);
|
||||
ezc_functions.Insert("item_tab_date_modification", item_tab_date_modification);
|
||||
ezc_functions.Insert("item_tab_date_creation_nice", item_tab_date_creation_nice);
|
||||
ezc_functions.Insert("item_tab_date_modification_nice", item_tab_date_modification_nice);
|
||||
ezc_functions.Insert("item_tab_dates_equal", item_tab_dates_equal);
|
||||
ezc_functions.Insert("item_tab_run", item_tab_run);
|
||||
ezc_functions.Insert("item_tab_can_use_emacs", item_tab_can_use_emacs);
|
||||
ezc_functions.Insert("item_tab_has_static_file", item_tab_has_static_file);
|
||||
ezc_functions.Insert("item_tab_has_thumb", item_tab_has_thumb);
|
||||
ezc_functions.Insert("item_tab_type_is_dir", item_tab_type_is_dir);
|
||||
ezc_functions.Insert("item_tab_type_is_file", item_tab_type_is_file);
|
||||
ezc_functions.Insert("item_tab_type_is_symlink", item_tab_type_is_symlink);
|
||||
ezc_functions.Insert("item_tab_is_link_to", item_tab_is_link_to);
|
||||
ezc_functions.Insert("item_tab_link_to", item_tab_link_to);
|
||||
ezc_functions.Insert("item_tab_is_link_redirect", item_tab_is_link_redirect);
|
||||
ezc_functions.Insert("item_tab_file_size", item_tab_file_size);
|
||||
ezc_functions.Insert("item_tab_sort", item_tab_sort);
|
||||
ezc_functions.Insert("item_tab_has_next", item_tab_has_next);
|
||||
ezc_functions.Insert("item_tab_meta_str", item_tab_meta_str);
|
||||
ezc_functions.Insert("item_tab_meta", item_tab_meta);
|
||||
ezc_functions.Insert("item_tab_meta_tab", item_tab_meta_tab);
|
||||
ezc_functions.Insert("item_tab_meta_tab_value", item_tab_meta_tab_value);
|
||||
ezc_functions.Insert("item_tab_meta_tab_has_next", item_tab_meta_tab_has_next);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2012, Tomasz Sowa
|
||||
* Copyright (c) 2008-2013, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -135,6 +135,15 @@ namespace TemplatesFunctions
|
||||
void dir_last_html_template(Info & i);
|
||||
void dir_last_has_html_template(Info & i);
|
||||
void dir_last_meta_str(Info & i);
|
||||
void dir_last_meta(Info & i);
|
||||
void dir_last_meta_tab(Info & i);
|
||||
void dir_last_meta_tab_value(Info & i);
|
||||
void dir_last_meta_tab_has_next(Info & i);
|
||||
void dir_last_admin_meta_str(Info & i);
|
||||
void dir_last_admin_meta(Info & i);
|
||||
void dir_last_admin_meta_tab(Info & i);
|
||||
void dir_last_admin_meta_tab_value(Info & i);
|
||||
void dir_last_admin_meta_tab_has_next(Info & i);
|
||||
|
||||
|
||||
/*
|
||||
@@ -256,6 +265,11 @@ namespace TemplatesFunctions
|
||||
void item_meta_tab(Info & i);
|
||||
void item_meta_tab_value(Info & i);
|
||||
void item_meta_tab_has_next(Info & i);
|
||||
void item_admin_meta_str(Info & i);
|
||||
void item_admin_meta(Info & i);
|
||||
void item_admin_meta_tab(Info & i);
|
||||
void item_admin_meta_tab_value(Info & i);
|
||||
void item_admin_meta_tab_has_next(Info & i);
|
||||
|
||||
void item_tab(Info & i);
|
||||
void item_tab_index(Info & i);
|
||||
@@ -295,6 +309,11 @@ namespace TemplatesFunctions
|
||||
void item_tab_file_size(Info & i);
|
||||
void item_tab_sort(Info & i);
|
||||
void item_tab_has_next(Info & i);
|
||||
void item_tab_meta_str(Info & i);
|
||||
void item_tab_meta(Info & i);
|
||||
void item_tab_meta_tab(Info & i);
|
||||
void item_tab_meta_tab_value(Info & i);
|
||||
void item_tab_meta_tab_has_next(Info & i);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user