removed some thread and ticket information from request
they are in FunThread and FunTicket classes now added funtion FunUptime (I forgot about it) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@631 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -79,8 +79,8 @@ ckeditor.o: functions.h functionparser.h adduser.h cat.h chmod.h
|
||||
ckeditor.o: privchanger.h chown.h cp.h createthread.h createticket.h
|
||||
ckeditor.o: default.h download.h editticket.h emacs.h last.h login.h logout.h
|
||||
ckeditor.o: ls.h mkdir.h mv.h node.h priv.h reload.h rm.h run.h subject.h
|
||||
ckeditor.o: funthread.h ../core/thread.h funticket.h tinymce.h uname.h
|
||||
ckeditor.o: upload.h who.h
|
||||
ckeditor.o: funthread.h ../core/thread.h funticket.h ../core/ticket.h
|
||||
ckeditor.o: tinymce.h uname.h upload.h uptime.h who.h
|
||||
cp.o: cp.h functionbase.h ../core/item.h ../core/db.h ../core/item.h
|
||||
cp.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h
|
||||
cp.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h
|
||||
@@ -116,8 +116,8 @@ createthread.o: functions.h functionparser.h adduser.h cat.h chmod.h
|
||||
createthread.o: privchanger.h chown.h ckeditor.h cp.h createticket.h
|
||||
createthread.o: default.h download.h editticket.h emacs.h last.h login.h
|
||||
createthread.o: logout.h ls.h mkdir.h mv.h node.h priv.h reload.h rm.h run.h
|
||||
createthread.o: subject.h funthread.h ../core/thread.h funticket.h tinymce.h
|
||||
createthread.o: uname.h upload.h who.h
|
||||
createthread.o: subject.h funthread.h ../core/thread.h funticket.h
|
||||
createthread.o: ../core/ticket.h tinymce.h uname.h upload.h uptime.h who.h
|
||||
createticket.o: createticket.h functionbase.h ../core/item.h ../core/db.h
|
||||
createticket.o: ../core/item.h ../core/user.h ../core/group.h
|
||||
createticket.o: ../core/thread.h ../core/error.h ../core/log.h
|
||||
@@ -139,7 +139,7 @@ createticket.o: adduser.h cat.h chmod.h privchanger.h chown.h ckeditor.h cp.h
|
||||
createticket.o: createthread.h default.h download.h editticket.h emacs.h
|
||||
createticket.o: last.h login.h logout.h ls.h mkdir.h mv.h node.h priv.h
|
||||
createticket.o: reload.h rm.h run.h subject.h funthread.h ../core/thread.h
|
||||
createticket.o: funticket.h tinymce.h uname.h upload.h who.h
|
||||
createticket.o: funticket.h tinymce.h uname.h upload.h uptime.h who.h
|
||||
default.o: default.h functionbase.h ../core/item.h ../core/db.h
|
||||
default.o: ../core/item.h ../core/user.h ../core/group.h ../core/thread.h
|
||||
default.o: ../core/error.h ../core/log.h ../core/dircontainer.h
|
||||
@@ -189,8 +189,9 @@ editticket.o: functions.h functionparser.h adduser.h cat.h chmod.h
|
||||
editticket.o: privchanger.h chown.h ckeditor.h cp.h createthread.h
|
||||
editticket.o: createticket.h default.h download.h emacs.h last.h login.h
|
||||
editticket.o: logout.h ls.h mkdir.h mv.h node.h priv.h reload.h rm.h run.h
|
||||
editticket.o: subject.h funthread.h ../core/thread.h funticket.h tinymce.h
|
||||
editticket.o: uname.h upload.h who.h readticket.h ../core/ticket.h
|
||||
editticket.o: subject.h funthread.h ../core/thread.h funticket.h
|
||||
editticket.o: ../core/ticket.h tinymce.h uname.h upload.h uptime.h who.h
|
||||
editticket.o: readticket.h
|
||||
emacs.o: emacs.h functionbase.h ../core/item.h ../core/db.h ../core/item.h
|
||||
emacs.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h
|
||||
emacs.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h
|
||||
@@ -213,8 +214,8 @@ emacs.o: ../core/sessioncontainer.h functions.h functionparser.h adduser.h
|
||||
emacs.o: cat.h chmod.h privchanger.h chown.h ckeditor.h cp.h createthread.h
|
||||
emacs.o: createticket.h default.h download.h editticket.h last.h login.h
|
||||
emacs.o: logout.h ls.h mkdir.h mv.h node.h priv.h reload.h rm.h run.h
|
||||
emacs.o: subject.h funthread.h ../core/thread.h funticket.h tinymce.h uname.h
|
||||
emacs.o: upload.h who.h
|
||||
emacs.o: subject.h funthread.h ../core/thread.h funticket.h ../core/ticket.h
|
||||
emacs.o: tinymce.h uname.h upload.h uptime.h who.h
|
||||
functionbase.o: functionbase.h ../core/item.h ../core/db.h ../core/item.h
|
||||
functionbase.o: ../core/user.h ../core/group.h ../core/thread.h
|
||||
functionbase.o: ../core/error.h ../core/log.h ../core/dircontainer.h
|
||||
@@ -236,21 +237,22 @@ functionbase.o: privchanger.h chown.h ckeditor.h cp.h createthread.h
|
||||
functionbase.o: createticket.h default.h download.h editticket.h emacs.h
|
||||
functionbase.o: last.h login.h logout.h ls.h mkdir.h mv.h node.h priv.h
|
||||
functionbase.o: reload.h rm.h run.h subject.h funthread.h ../core/thread.h
|
||||
functionbase.o: funticket.h tinymce.h uname.h upload.h who.h
|
||||
functionbase.o: funticket.h ../core/ticket.h tinymce.h uname.h upload.h
|
||||
functionbase.o: uptime.h who.h
|
||||
functionparser.o: functionparser.h ../core/request.h ../core/requesttypes.h
|
||||
functionparser.o: ../core/session.h ../core/item.h ../core/error.h
|
||||
functionparser.o: ../core/log.h ../core/user.h ../core/plugindata.h
|
||||
functionparser.o: ../core/rebus.h ../core/thread.h ../core/compress.h
|
||||
functionparser.o: ../core/rebus.h ../core/compress.h
|
||||
functionparser.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
||||
functionparser.o: ../core/htmlfilter.h ../core/postmultiparser.h
|
||||
functionparser.o: ../core/config.h ../core/confparser.h ../core/ticket.h
|
||||
functionparser.o: ../core/db.h ../core/group.h ../core/dircontainer.h
|
||||
functionparser.o: ../core/ugcontainer.h ../core/system.h ../core/dirs.h
|
||||
functionparser.o: ../core/db.h ../core/request.h ../core/mounts.h
|
||||
functionparser.o: ../core/mount.h ../core/users.h ../core/lastcontainer.h
|
||||
functionparser.o: ../core/groups.h ../core/loadavg.h ../core/log.h
|
||||
functionparser.o: ../core/item.h ../core/error.h functions.h functionbase.h
|
||||
functionparser.o: ../core/config.h ../core/notify.h
|
||||
functionparser.o: ../core/config.h ../core/confparser.h ../core/db.h
|
||||
functionparser.o: ../core/group.h ../core/thread.h ../core/dircontainer.h
|
||||
functionparser.o: ../core/ugcontainer.h ../core/ticket.h ../core/system.h
|
||||
functionparser.o: ../core/dirs.h ../core/db.h ../core/request.h
|
||||
functionparser.o: ../core/mounts.h ../core/mount.h ../core/users.h
|
||||
functionparser.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h
|
||||
functionparser.o: ../core/log.h ../core/item.h ../core/error.h functions.h
|
||||
functionparser.o: functionbase.h ../core/config.h ../core/notify.h
|
||||
functionparser.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h
|
||||
functionparser.o: ../core/mount.h ../core/locale.h ../templates/misc.h
|
||||
functionparser.o: ../templates/localefilter.h ../core/locale.h
|
||||
@@ -259,7 +261,7 @@ functionparser.o: chown.h ckeditor.h cp.h createthread.h createticket.h
|
||||
functionparser.o: default.h download.h editticket.h emacs.h last.h login.h
|
||||
functionparser.o: logout.h ls.h mkdir.h mv.h node.h priv.h reload.h rm.h
|
||||
functionparser.o: run.h subject.h funthread.h ../core/thread.h funticket.h
|
||||
functionparser.o: tinymce.h uname.h upload.h who.h
|
||||
functionparser.o: ../core/ticket.h tinymce.h uname.h upload.h uptime.h who.h
|
||||
functions.o: functions.h functionbase.h ../core/item.h ../core/db.h
|
||||
functions.o: ../core/item.h ../core/user.h ../core/group.h ../core/thread.h
|
||||
functions.o: ../core/error.h ../core/log.h ../core/dircontainer.h
|
||||
@@ -279,10 +281,10 @@ functions.o: functionparser.h adduser.h cat.h chmod.h privchanger.h chown.h
|
||||
functions.o: ckeditor.h cp.h createthread.h createticket.h default.h
|
||||
functions.o: download.h editticket.h emacs.h last.h login.h logout.h ls.h
|
||||
functions.o: mkdir.h mv.h node.h priv.h reload.h rm.h run.h subject.h
|
||||
functions.o: funthread.h ../core/thread.h funticket.h tinymce.h uname.h
|
||||
functions.o: upload.h who.h ../core/log.h ../core/misc.h
|
||||
functions.o: ../templates/templates.h ../templates/patterncacher.h
|
||||
functions.o: ../core/item.h ../templates/misc.h
|
||||
functions.o: funthread.h ../core/thread.h funticket.h ../core/ticket.h
|
||||
functions.o: tinymce.h uname.h upload.h uptime.h who.h ../core/log.h
|
||||
functions.o: ../core/misc.h ../templates/templates.h
|
||||
functions.o: ../templates/patterncacher.h ../core/item.h ../templates/misc.h
|
||||
functions.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
|
||||
functions.o: ../core/log.h ../templates/indexpatterns.h
|
||||
functions.o: ../core/sessionmanager.h ../core/sessioncontainer.h
|
||||
@@ -317,6 +319,7 @@ funticket.o: ../core/groups.h ../core/loadavg.h ../core/notify.h
|
||||
funticket.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h
|
||||
funticket.o: ../core/mount.h ../core/locale.h ../templates/misc.h
|
||||
funticket.o: ../templates/localefilter.h ../core/locale.h ../core/system.h
|
||||
funticket.o: ../core/ticket.h
|
||||
last.o: last.h functionbase.h ../core/item.h ../core/db.h ../core/item.h
|
||||
last.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h
|
||||
last.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h
|
||||
@@ -395,8 +398,8 @@ mkdir.o: ../core/system.h functions.h functionparser.h adduser.h cat.h
|
||||
mkdir.o: chmod.h privchanger.h chown.h ckeditor.h cp.h createthread.h
|
||||
mkdir.o: createticket.h default.h download.h editticket.h emacs.h last.h
|
||||
mkdir.o: login.h logout.h ls.h mv.h node.h priv.h reload.h rm.h run.h
|
||||
mkdir.o: subject.h funthread.h ../core/thread.h funticket.h tinymce.h uname.h
|
||||
mkdir.o: upload.h who.h
|
||||
mkdir.o: subject.h funthread.h ../core/thread.h funticket.h ../core/ticket.h
|
||||
mkdir.o: tinymce.h uname.h upload.h uptime.h who.h
|
||||
mv.o: mv.h functionbase.h ../core/item.h ../core/db.h ../core/item.h
|
||||
mv.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h
|
||||
mv.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h
|
||||
@@ -445,26 +448,26 @@ priv.o: ../core/system.h privchanger.h
|
||||
privchanger.o: privchanger.h ../core/request.h ../core/requesttypes.h
|
||||
privchanger.o: ../core/session.h ../core/item.h ../core/error.h ../core/log.h
|
||||
privchanger.o: ../core/user.h ../core/plugindata.h ../core/rebus.h
|
||||
privchanger.o: ../core/thread.h ../core/compress.h
|
||||
privchanger.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
||||
privchanger.o: ../core/htmlfilter.h ../core/postmultiparser.h
|
||||
privchanger.o: ../core/config.h ../core/confparser.h ../core/ticket.h
|
||||
privchanger.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h
|
||||
privchanger.o: ../core/db.h ../core/request.h ../core/mounts.h
|
||||
privchanger.o: ../core/mount.h ../core/users.h ../core/ugcontainer.h
|
||||
privchanger.o: ../core/lastcontainer.h ../core/groups.h ../core/group.h
|
||||
privchanger.o: ../core/loadavg.h ../core/db.h
|
||||
privchanger.o: ../core/compress.h ../core/acceptencodingparser.h
|
||||
privchanger.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
|
||||
privchanger.o: ../core/postmultiparser.h ../core/config.h
|
||||
privchanger.o: ../core/confparser.h ../core/system.h ../core/dirs.h
|
||||
privchanger.o: ../core/dircontainer.h ../core/db.h ../core/request.h
|
||||
privchanger.o: ../core/mounts.h ../core/mount.h ../core/users.h
|
||||
privchanger.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h
|
||||
privchanger.o: ../core/group.h ../core/loadavg.h ../core/db.h
|
||||
privchanger.o: ../core/thread.h ../core/ticket.h
|
||||
readticket.o: readticket.h ../core/request.h ../core/requesttypes.h
|
||||
readticket.o: ../core/session.h ../core/item.h ../core/error.h ../core/log.h
|
||||
readticket.o: ../core/user.h ../core/plugindata.h ../core/rebus.h
|
||||
readticket.o: ../core/thread.h ../core/compress.h
|
||||
readticket.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
||||
readticket.o: ../core/htmlfilter.h ../core/postmultiparser.h ../core/config.h
|
||||
readticket.o: ../core/confparser.h ../core/ticket.h ../core/ticket.h
|
||||
readticket.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h
|
||||
readticket.o: ../core/db.h ../core/request.h ../core/mounts.h ../core/mount.h
|
||||
readticket.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
readticket.o: ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
readticket.o: ../core/compress.h ../core/acceptencodingparser.h
|
||||
readticket.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
|
||||
readticket.o: ../core/postmultiparser.h ../core/config.h ../core/confparser.h
|
||||
readticket.o: ../core/ticket.h ../core/system.h ../core/dirs.h
|
||||
readticket.o: ../core/dircontainer.h ../core/db.h ../core/request.h
|
||||
readticket.o: ../core/mounts.h ../core/mount.h ../core/users.h
|
||||
readticket.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/groups.h
|
||||
readticket.o: ../core/group.h ../core/loadavg.h
|
||||
reload.o: reload.h functionbase.h ../core/item.h ../core/db.h ../core/item.h
|
||||
reload.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h
|
||||
reload.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h
|
||||
@@ -504,11 +507,11 @@ rm.o: ../functions/functions.h functionparser.h adduser.h cat.h chmod.h
|
||||
rm.o: privchanger.h chown.h ckeditor.h cp.h createthread.h createticket.h
|
||||
rm.o: default.h download.h editticket.h emacs.h last.h login.h logout.h ls.h
|
||||
rm.o: mkdir.h mv.h node.h priv.h reload.h run.h subject.h funthread.h
|
||||
rm.o: ../core/thread.h funticket.h tinymce.h uname.h upload.h who.h
|
||||
rm.o: ../templates/templates.h ../templates/patterncacher.h ../core/item.h
|
||||
rm.o: ../templates/misc.h ../templates/ckeditorgetparser.h
|
||||
rm.o: ../core/httpsimpleparser.h ../core/log.h ../templates/indexpatterns.h
|
||||
rm.o: ../core/sessionmanager.h
|
||||
rm.o: ../core/thread.h funticket.h ../core/ticket.h tinymce.h uname.h
|
||||
rm.o: upload.h uptime.h who.h ../templates/templates.h
|
||||
rm.o: ../templates/patterncacher.h ../core/item.h ../templates/misc.h
|
||||
rm.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
|
||||
rm.o: ../core/log.h ../templates/indexpatterns.h ../core/sessionmanager.h
|
||||
run.o: run.h functionbase.h ../core/item.h ../core/db.h ../core/item.h
|
||||
run.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h
|
||||
run.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h
|
||||
@@ -539,7 +542,7 @@ subject.o: ../core/notify.h ../templatesnotify/templatesnotify.h
|
||||
subject.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h
|
||||
subject.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h
|
||||
subject.o: ../core/system.h
|
||||
tinymce.o: tinymce.h functions.h functionbase.h ../core/item.h ../core/db.h
|
||||
tinymce.o: tinymce.h functionbase.h ../core/item.h ../core/db.h
|
||||
tinymce.o: ../core/item.h ../core/user.h ../core/group.h ../core/thread.h
|
||||
tinymce.o: ../core/error.h ../core/log.h ../core/dircontainer.h
|
||||
tinymce.o: ../core/ugcontainer.h ../core/ticket.h ../core/request.h
|
||||
@@ -553,12 +556,12 @@ tinymce.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h
|
||||
tinymce.o: ../core/notify.h ../templatesnotify/templatesnotify.h
|
||||
tinymce.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h
|
||||
tinymce.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h
|
||||
tinymce.o: ../core/system.h functionparser.h adduser.h cat.h chmod.h
|
||||
tinymce.o: privchanger.h chown.h ckeditor.h cp.h createthread.h
|
||||
tinymce.o: ../core/system.h functions.h functionparser.h adduser.h cat.h
|
||||
tinymce.o: chmod.h privchanger.h chown.h ckeditor.h cp.h createthread.h
|
||||
tinymce.o: createticket.h default.h download.h editticket.h emacs.h last.h
|
||||
tinymce.o: login.h logout.h ls.h mkdir.h mv.h node.h priv.h reload.h rm.h
|
||||
tinymce.o: run.h subject.h funthread.h ../core/thread.h funticket.h uname.h
|
||||
tinymce.o: upload.h who.h
|
||||
tinymce.o: run.h subject.h funthread.h ../core/thread.h funticket.h
|
||||
tinymce.o: ../core/ticket.h uname.h upload.h uptime.h who.h
|
||||
uname.o: uname.h functionbase.h ../core/item.h ../core/db.h ../core/item.h
|
||||
uname.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h
|
||||
uname.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h
|
||||
@@ -593,7 +596,23 @@ upload.o: functionparser.h adduser.h cat.h chmod.h privchanger.h chown.h
|
||||
upload.o: ckeditor.h cp.h createthread.h createticket.h default.h download.h
|
||||
upload.o: editticket.h emacs.h last.h login.h logout.h ls.h mkdir.h mv.h
|
||||
upload.o: node.h priv.h reload.h rm.h run.h subject.h funthread.h
|
||||
upload.o: ../core/thread.h funticket.h tinymce.h uname.h who.h
|
||||
upload.o: ../core/thread.h funticket.h ../core/ticket.h tinymce.h uname.h
|
||||
upload.o: uptime.h who.h
|
||||
uptime.o: uname.h functionbase.h ../core/item.h ../core/db.h ../core/item.h
|
||||
uptime.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h
|
||||
uptime.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h
|
||||
uptime.o: ../core/ticket.h ../core/request.h ../core/requesttypes.h
|
||||
uptime.o: ../core/session.h ../core/plugindata.h ../core/rebus.h
|
||||
uptime.o: ../core/compress.h ../core/acceptencodingparser.h
|
||||
uptime.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
|
||||
uptime.o: ../core/postmultiparser.h ../core/config.h ../core/confparser.h
|
||||
uptime.o: ../core/config.h ../core/system.h ../core/dirs.h ../core/db.h
|
||||
uptime.o: ../core/request.h ../core/mounts.h ../core/mount.h ../core/users.h
|
||||
uptime.o: ../core/lastcontainer.h ../core/groups.h ../core/loadavg.h
|
||||
uptime.o: ../core/notify.h ../templatesnotify/templatesnotify.h
|
||||
uptime.o: ../../ezc/src/ezc.h ../core/mount.h ../core/locale.h
|
||||
uptime.o: ../templates/misc.h ../templates/localefilter.h ../core/locale.h
|
||||
uptime.o: ../core/system.h
|
||||
who.o: who.h functionbase.h ../core/item.h ../core/db.h ../core/item.h
|
||||
who.o: ../core/user.h ../core/group.h ../core/thread.h ../core/error.h
|
||||
who.o: ../core/log.h ../core/dircontainer.h ../core/ugcontainer.h
|
||||
|
@@ -1 +1 @@
|
||||
o = adduser.o cat.o chmod.o chown.o ckeditor.o cp.o createthread.o createticket.o default.o download.o editticket.o emacs.o functionbase.o functionparser.o functions.o funthread.o funticket.o last.o login.o logout.o ls.o mkdir.o mv.o node.o priv.o privchanger.o readticket.o reload.o rm.o run.o subject.o tinymce.o uname.o upload.o who.o
|
||||
o = adduser.o cat.o chmod.o chown.o ckeditor.o cp.o createthread.o createticket.o default.o download.o editticket.o emacs.o functionbase.o functionparser.o functions.o funthread.o funticket.o last.o login.o logout.o ls.o mkdir.o mv.o node.o priv.o privchanger.o readticket.o reload.o rm.o run.o subject.o tinymce.o uname.o upload.o uptime.o who.o
|
||||
|
@@ -162,10 +162,10 @@ void Cp::CpPrepare()
|
||||
void Cp::CpFilesInDir(const Item & dir, long dst_dir_id)
|
||||
{
|
||||
cp_iq.WhereParentId(dir.id);
|
||||
db->GetItems(request->item_table, cp_iq);
|
||||
db->GetItems(request->item_tab, cp_iq);
|
||||
|
||||
for(size_t i=0 ; i<request->item_table.size() ; ++i)
|
||||
CpItem(request->item_table[i], dst_dir_id);
|
||||
for(size_t i=0 ; i<request->item_tab.size() ; ++i)
|
||||
CpItem(request->item_tab[i], dst_dir_id);
|
||||
}
|
||||
|
||||
|
||||
@@ -315,9 +315,9 @@ void Cp::MakePost()
|
||||
cp_remove_defaults = request->IsPostVar("removedefaults");
|
||||
|
||||
if( request->IsPostVar("onlycontent") )
|
||||
CpContentOfDirCheck(*request->dir_table.back());
|
||||
CpContentOfDirCheck(*request->dir_tab.back());
|
||||
else
|
||||
CpDirCheck(*request->dir_table.back());
|
||||
CpDirCheck(*request->dir_tab.back());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -24,13 +24,13 @@ CreateThread::CreateThread()
|
||||
// returning true if we can create a thread in the current directory
|
||||
bool CreateThread::HasAccess()
|
||||
{
|
||||
if( request->dir_table.empty() )
|
||||
if( request->dir_tab.empty() )
|
||||
return false;
|
||||
|
||||
if( request->is_item )
|
||||
return false;
|
||||
|
||||
if( !system->HasWriteAccess(*request->dir_table.back()) )
|
||||
if( !system->HasWriteAccess(*request->dir_tab.back()) )
|
||||
return false;
|
||||
|
||||
if( !system->mounts.pmount || system->mounts.pmount->type != Mount::thread )
|
||||
@@ -43,7 +43,7 @@ bool CreateThread::HasAccess()
|
||||
if( !system->mounts.pmount->IsPar(Mount::par_createthread_on) )
|
||||
return true;
|
||||
|
||||
if( system->mounts.pmount->IsArg(Mount::par_createthread_on, request->dir_table.size()) )
|
||||
if( system->mounts.pmount->IsArg(Mount::par_createthread_on, request->dir_tab.size()) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -73,21 +73,21 @@ return true;
|
||||
|
||||
|
||||
|
||||
void CreateThread::ReadThread(Thread & thread)
|
||||
void CreateThread::ReadThread()
|
||||
{
|
||||
thread.parent_id = request->dir_table.back()->id;
|
||||
thread.parent_id = request->dir_tab.back()->id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CreateThread::AddThread()
|
||||
{
|
||||
request->thread.dir_id = request->dir_table.back()->id;
|
||||
request->thread.closed = false;
|
||||
request->thread.items = 1;
|
||||
request->thread.last_item = request->item; // set by PostFunEmacsAdd()
|
||||
thread.dir_id = request->dir_tab.back()->id;
|
||||
thread.closed = false;
|
||||
thread.items = 1;
|
||||
thread.last_item = request->item; // set by PostFunEmacsAdd()
|
||||
|
||||
request->status = db->AddThread(request->thread);
|
||||
request->status = db->AddThread(thread);
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ void CreateThread::MakePost()
|
||||
{
|
||||
functions->ReadItem(request->item, Item::dir);
|
||||
functions->SetUser(request->item);
|
||||
ReadThread(request->thread);
|
||||
ReadThread();
|
||||
request->item.privileges = 0777; // !! tymczasowo 777 aby wszyscy mogli wysylac posty
|
||||
|
||||
if( !FunCreateThreadCheckAbuse() )
|
||||
@@ -128,7 +128,7 @@ void CreateThread::MakePost()
|
||||
functions->ReadItemContentWithType(request->item);
|
||||
request->item.type = Item::file;
|
||||
request->item.privileges = 0644; // !! tymczasowo
|
||||
request->item.parent_id = request->dir_table.back()->id;
|
||||
request->item.parent_id = request->dir_tab.back()->id;
|
||||
request->status = system->AddFile(request->item);
|
||||
|
||||
if( request->status == WINIX_ERR_OK )
|
||||
|
@@ -28,8 +28,10 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
Thread thread;
|
||||
|
||||
bool FunCreateThreadCheckAbuse();
|
||||
void ReadThread(Thread & thread);
|
||||
void ReadThread();
|
||||
void AddThread();
|
||||
void PostFunCreateThreadLogAndRedirect();
|
||||
};
|
||||
|
@@ -21,16 +21,21 @@ CreateTicket::CreateTicket()
|
||||
}
|
||||
|
||||
|
||||
void CreateTicket::Clear()
|
||||
{
|
||||
functions->fun_ticket.Clear();
|
||||
}
|
||||
|
||||
// returning true if we can create a ticket in the current directory
|
||||
bool CreateTicket::HasAccess()
|
||||
{
|
||||
if( request->dir_table.empty() )
|
||||
if( request->dir_tab.empty() )
|
||||
return false;
|
||||
|
||||
if( request->is_item )
|
||||
return false;
|
||||
|
||||
if( !system->HasWriteAccess(*request->dir_table.back()) )
|
||||
if( !system->HasWriteAccess(*request->dir_tab.back()) )
|
||||
return false;
|
||||
|
||||
if( !system->mounts.pmount || system->mounts.pmount->type != Mount::ticket )
|
||||
@@ -46,7 +51,7 @@ bool CreateTicket::HasAccess()
|
||||
if( !system->mounts.pmount->IsPar(Mount::par_createticket_on) )
|
||||
return true;
|
||||
|
||||
if( system->mounts.pmount->IsArg(Mount::par_createticket_on, request->dir_table.size()) )
|
||||
if( system->mounts.pmount->IsArg(Mount::par_createticket_on, request->dir_tab.size()) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -81,10 +86,10 @@ void CreateTicket::AddTicket()
|
||||
{
|
||||
static std::string temp;
|
||||
|
||||
request->ticket.dir_id = request->dir_table.back()->id; // a new directory created by Mkdir()
|
||||
request->ticket.item_id = request->item.id; // this id is set by PostFunEmacsAdd()
|
||||
functions->fun_ticket.ticket.dir_id = request->dir_tab.back()->id; // a new directory created by Mkdir()
|
||||
functions->fun_ticket.ticket.item_id = request->item.id; // this id is set by PostFunEmacsAdd()
|
||||
|
||||
request->status = db->AddTicket(request->ticket);
|
||||
request->status = db->AddTicket(functions->fun_ticket.ticket);
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +115,7 @@ void CreateTicket::MakePost()
|
||||
functions->SetUser(request->item);
|
||||
|
||||
ReadTicket read_ticket;
|
||||
read_ticket.Read(system, request, &request->ticket);
|
||||
read_ticket.Read(system, request, &functions->fun_ticket.ticket);
|
||||
|
||||
request->item.privileges = 0777; // !! tymczasowo 777 aby wszyscy mogli wysylac posty
|
||||
|
||||
@@ -127,7 +132,7 @@ void CreateTicket::MakePost()
|
||||
functions->ReadItemContentWithType(request->item);
|
||||
request->item.type = Item::file;
|
||||
request->item.privileges = 0644; // !! tymczasowo
|
||||
request->item.parent_id = request->dir_table.back()->id;
|
||||
request->item.parent_id = request->dir_tab.back()->id;
|
||||
|
||||
request->status = system->AddFile(request->item);
|
||||
|
||||
|
@@ -23,6 +23,7 @@ class CreateTicket : public FunctionBase
|
||||
public:
|
||||
|
||||
CreateTicket();
|
||||
void Clear();
|
||||
bool HasAccess();
|
||||
void MakePost();
|
||||
|
||||
|
@@ -70,7 +70,7 @@ return defaultid;
|
||||
|
||||
void Default::MakePost()
|
||||
{
|
||||
if( !system->HasWriteAccess(*request->dir_table.back()) )
|
||||
if( !system->HasWriteAccess(*request->dir_tab.back()) )
|
||||
{
|
||||
request->status = WINIX_ERR_PERMISSION_DENIED;
|
||||
return;
|
||||
@@ -80,10 +80,10 @@ void Default::MakePost()
|
||||
try
|
||||
{
|
||||
long defaultid = PostFunDefaultParsePath();
|
||||
request->status = db->EditDefaultItem(request->dir_table.back()->id, defaultid);
|
||||
request->status = db->EditDefaultItem(request->dir_tab.back()->id, defaultid);
|
||||
|
||||
if( request->status == WINIX_ERR_OK )
|
||||
request->dir_table.back()->default_item = defaultid;
|
||||
request->dir_tab.back()->default_item = defaultid;
|
||||
}
|
||||
catch(const Error & e)
|
||||
{
|
||||
@@ -92,7 +92,7 @@ void Default::MakePost()
|
||||
|
||||
|
||||
if( request->status == WINIX_ERR_OK )
|
||||
system->RedirectTo(*request->dir_table.back());
|
||||
system->RedirectTo(*request->dir_tab.back());
|
||||
else
|
||||
log << log1 << "Content: PostFunDefaultItem: Error: " << request->status << logend;
|
||||
}
|
||||
@@ -102,7 +102,7 @@ void Default::MakePost()
|
||||
|
||||
void Default::MakeGet()
|
||||
{
|
||||
if( !system->HasWriteAccess(*request->dir_table.back()) )
|
||||
if( !system->HasWriteAccess(*request->dir_tab.back()) )
|
||||
{
|
||||
request->status = WINIX_ERR_PERMISSION_DENIED;
|
||||
return;
|
||||
|
@@ -23,6 +23,11 @@ EditTicket::EditTicket()
|
||||
}
|
||||
|
||||
|
||||
void EditTicket::Clear()
|
||||
{
|
||||
functions->fun_ticket.Clear();
|
||||
}
|
||||
|
||||
|
||||
bool EditTicket::HasAccess()
|
||||
{
|
||||
@@ -30,13 +35,15 @@ bool EditTicket::HasAccess()
|
||||
if( !request->session->puser )
|
||||
return false;
|
||||
|
||||
if( request->dir_table.empty() )
|
||||
if( request->dir_tab.empty() )
|
||||
return false;
|
||||
|
||||
if( request->is_item || !request->is_ticket )
|
||||
functions->fun_ticket.ReadTicket();
|
||||
|
||||
if( request->is_item || !functions->fun_ticket.is_ticket )
|
||||
return false;
|
||||
|
||||
if( !system->HasWriteAccess(*request->dir_table.back()) )
|
||||
if( !system->HasWriteAccess(*request->dir_tab.back()) )
|
||||
return false;
|
||||
|
||||
if( !system->mounts.pmount || system->mounts.pmount->type != Mount::ticket )
|
||||
@@ -55,13 +62,13 @@ void EditTicket::EditTicketCheckFirstItem()
|
||||
return;
|
||||
|
||||
|
||||
if( request->ticket.item_id == -1 )
|
||||
if( functions->fun_ticket.ticket.item_id == -1 )
|
||||
{
|
||||
// creating a new item (the item was deleted by a user)
|
||||
|
||||
Item item;
|
||||
item.parent_id = request->dir_table.back()->id;
|
||||
item.subject = request->dir_table.back()->subject;
|
||||
item.parent_id = request->dir_tab.back()->id;
|
||||
item.subject = request->dir_tab.back()->subject;
|
||||
item.type = Item::file;
|
||||
item.privileges = 0644; // !! tymczasowo
|
||||
functions->SetUser(item);
|
||||
@@ -72,7 +79,7 @@ void EditTicket::EditTicketCheckFirstItem()
|
||||
if( request->status == WINIX_ERR_OK )
|
||||
{
|
||||
log << log2 << "Content: added the first item with content for the ticket, item.id: " << item.id << logend;
|
||||
request->ticket.item_id = item.id;
|
||||
functions->fun_ticket.ticket.item_id = item.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -88,14 +95,14 @@ void EditTicket::EditTicketModTicket()
|
||||
ReadTicket read_ticket;
|
||||
read_ticket.Read(system, request, &ticket);
|
||||
|
||||
request->ticket.type = ticket.type;
|
||||
request->ticket.status = ticket.status;
|
||||
request->ticket.priority = ticket.priority;
|
||||
request->ticket.category = ticket.category;
|
||||
request->ticket.expected = ticket.expected;
|
||||
request->ticket.progress = ticket.progress;
|
||||
functions->fun_ticket.ticket.type = ticket.type;
|
||||
functions->fun_ticket.ticket.status = ticket.status;
|
||||
functions->fun_ticket.ticket.priority = ticket.priority;
|
||||
functions->fun_ticket.ticket.category = ticket.category;
|
||||
functions->fun_ticket.ticket.expected = ticket.expected;
|
||||
functions->fun_ticket.ticket.progress = ticket.progress;
|
||||
|
||||
request->status = db->EditTicketById(request->ticket);
|
||||
request->status = db->EditTicketById(functions->fun_ticket.ticket);
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +114,7 @@ void EditTicket::EditTicketModDir()
|
||||
|
||||
// we don't modify the url
|
||||
|
||||
Item & dir = *request->dir_table.back();
|
||||
Item & dir = *request->dir_tab.back();
|
||||
bool edit_dir_subject = (dir.subject != request->item.subject);
|
||||
|
||||
if( edit_dir_subject )
|
||||
@@ -127,7 +134,7 @@ void EditTicket::EditTicketModFirstItem()
|
||||
functions->ReadItemContentWithType(request->item);
|
||||
|
||||
Item item;
|
||||
db->GetItemById(request->ticket.item_id, item);
|
||||
db->GetItemById(functions->fun_ticket.ticket.item_id, item);
|
||||
item.subject = request->item.subject;
|
||||
item.content = request->item.content;
|
||||
item.content_type = request->item.content_type;
|
||||
@@ -186,7 +193,7 @@ void EditTicket::MakePost()
|
||||
return;
|
||||
}
|
||||
|
||||
if( db->GetTicketByDirId(request->dir_table.back()->id, request->ticket) != WINIX_ERR_OK )
|
||||
if( db->GetTicketByDirId(request->dir_tab.back()->id, functions->fun_ticket.ticket) != WINIX_ERR_OK )
|
||||
{
|
||||
request->status = WINIX_ERR_PERMISSION_DENIED;
|
||||
return;
|
||||
@@ -203,10 +210,10 @@ void EditTicket::MakePost()
|
||||
|
||||
void EditTicket::MakeGet()
|
||||
{
|
||||
db->GetItemById(request->ticket.item_id, request->item);
|
||||
db->GetItemById(functions->fun_ticket.ticket.item_id, request->item);
|
||||
|
||||
// the subject we get from the last directory
|
||||
request->item.subject = request->dir_table.back()->subject;
|
||||
request->item.subject = request->dir_tab.back()->subject;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -23,6 +23,7 @@ class EditTicket : public FunctionBase
|
||||
public:
|
||||
|
||||
EditTicket();
|
||||
void Clear();
|
||||
bool HasAccess();
|
||||
void MakePost();
|
||||
void MakeGet();
|
||||
|
@@ -36,7 +36,7 @@ bool Emacs::HasAccess(const Item & item)
|
||||
if( !system->mounts.pmount->IsPar(Mount::par_emacs_on) )
|
||||
return true;
|
||||
|
||||
if( system->mounts.pmount->IsArg(Mount::par_emacs_on, request->dir_table.size()) )
|
||||
if( system->mounts.pmount->IsArg(Mount::par_emacs_on, request->dir_tab.size()) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -47,7 +47,7 @@ return false;
|
||||
bool Emacs::HasAccess()
|
||||
{
|
||||
if( !request->is_item )
|
||||
return HasAccess(*request->dir_table.back()); // adding a new item
|
||||
return HasAccess(*request->dir_tab.back()); // adding a new item
|
||||
else
|
||||
return HasAccess(request->item); // editing an existing item
|
||||
|
||||
@@ -86,7 +86,7 @@ void Emacs::PostFunEmacsModifyMountPoint(bool adding)
|
||||
if( system->mounts.pmount->type == Mount::thread )
|
||||
{
|
||||
if( adding )
|
||||
db->EditThreadAddItem(request->dir_table.back()->id, request->item.id);
|
||||
db->EditThreadAddItem(request->dir_tab.back()->id, request->item.id);
|
||||
|
||||
system->RedirectToLastDir();
|
||||
}
|
||||
|
@@ -72,6 +72,13 @@ bool FunctionBase::HasAccess()
|
||||
}
|
||||
|
||||
|
||||
void FunctionBase::Clear()
|
||||
{
|
||||
// this method is called at the end of a request
|
||||
// you can clear your variables
|
||||
}
|
||||
|
||||
|
||||
void FunctionBase::MakePost()
|
||||
{
|
||||
// do nothing by default
|
||||
|
@@ -36,6 +36,7 @@ public:
|
||||
Item fun;
|
||||
|
||||
virtual bool HasAccess();
|
||||
virtual void Clear();
|
||||
virtual void MakePost();
|
||||
virtual void MakeGet();
|
||||
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
void FunctionParser::SkipEmptyString(const char * msg)
|
||||
{
|
||||
for( ; get_index != get_table_len && request->get_table[get_index].empty() ; ++get_index )
|
||||
for( ; get_index != get_tab_len && request->get_tab[get_index].empty() ; ++get_index )
|
||||
log << log3 << msg << logend;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ void FunctionParser::ParseDirectories()
|
||||
|
||||
while( true )
|
||||
{
|
||||
request->dir_table.push_back( pdir );
|
||||
request->dir_tab.push_back( pdir );
|
||||
log << log3 << "FP: Directory: ";
|
||||
|
||||
if( pdir->parent_id == -1 )
|
||||
@@ -48,10 +48,10 @@ void FunctionParser::ParseDirectories()
|
||||
|
||||
SkipEmptyString("FP: Directory: skipped empty string");
|
||||
|
||||
if( get_index == get_table_len )
|
||||
if( get_index == get_tab_len )
|
||||
break;
|
||||
|
||||
pdir = system->dirs.GetDir(request->get_table[get_index], pdir->id);
|
||||
pdir = system->dirs.GetDir(request->get_tab[get_index], pdir->id);
|
||||
|
||||
if( !pdir )
|
||||
break;
|
||||
@@ -66,12 +66,12 @@ void FunctionParser::ParseItem()
|
||||
{
|
||||
SkipEmptyString("FP: Item: skipped empty string");
|
||||
|
||||
if( get_index == get_table_len )
|
||||
if( get_index == get_tab_len )
|
||||
return;
|
||||
|
||||
// request->dir_table has at least one element
|
||||
long parent_id = request->dir_table.back()->id;
|
||||
const std::string & url = request->get_table[get_index];
|
||||
// request->dir_tab has at least one element
|
||||
long parent_id = request->dir_tab.back()->id;
|
||||
const std::string & url = request->get_tab[get_index];
|
||||
|
||||
request->status = db->GetItem(parent_id, url, request->item);
|
||||
|
||||
@@ -100,16 +100,16 @@ void FunctionParser::ParseFunction()
|
||||
{
|
||||
SkipEmptyString("FP: Function: skipped empty string");
|
||||
|
||||
if( get_index == get_table_len )
|
||||
if( get_index == get_tab_len )
|
||||
return;
|
||||
|
||||
request->pfunction = functions->Find(request->get_table[get_index]);
|
||||
request->function = functions->Find(request->get_tab[get_index]);
|
||||
|
||||
|
||||
if( request->pfunction )
|
||||
if( request->function )
|
||||
{
|
||||
++get_index;
|
||||
log << log3 << "FP: Function: " << request->pfunction->fun.url << logend;
|
||||
log << log3 << "FP: Function: " << request->function->fun.url << logend;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ size_t i;
|
||||
param.value = par.substr(i+1);
|
||||
}
|
||||
|
||||
request->param_table.push_back(param);
|
||||
request->param_tab.push_back(param);
|
||||
|
||||
log << log3 << "FP: Param: name=" << param.name;
|
||||
|
||||
@@ -158,10 +158,10 @@ void FunctionParser::ParseParams()
|
||||
{
|
||||
SkipEmptyString("FP: Params: skipped empty string");
|
||||
|
||||
if( get_index == get_table_len )
|
||||
if( get_index == get_tab_len )
|
||||
break;
|
||||
|
||||
ParseParams(request->get_table[get_index]);
|
||||
ParseParams(request->get_tab[get_index]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,8 +177,8 @@ void FunctionParser::Parse(Request * prequest, Db * pdb, Functions * pfunctions,
|
||||
|
||||
request->status = WINIX_ERR_OK;
|
||||
get_index = 0;
|
||||
get_table_len = request->get_table.size();
|
||||
request->pfunction = 0;
|
||||
get_tab_len = request->get_tab.size();
|
||||
request->function = 0;
|
||||
request->is_item = false;
|
||||
|
||||
ParseDirectories();
|
||||
@@ -188,7 +188,7 @@ void FunctionParser::Parse(Request * prequest, Db * pdb, Functions * pfunctions,
|
||||
|
||||
ParseFunction();
|
||||
|
||||
if( !request->pfunction )
|
||||
if( !request->function )
|
||||
{
|
||||
ParseItem();
|
||||
|
||||
@@ -197,10 +197,10 @@ void FunctionParser::Parse(Request * prequest, Db * pdb, Functions * pfunctions,
|
||||
|
||||
ParseFunction();
|
||||
|
||||
if( !request->pfunction && get_index != get_table_len )
|
||||
if( !request->function && get_index != get_tab_len )
|
||||
{
|
||||
request->status = WINIX_ERR_NO_FUNCTION;
|
||||
log << log3 << "FP: Parse: unknown function: \"" << request->get_table[get_index] << "\"" << logend;
|
||||
log << log3 << "FP: Parse: unknown function: \"" << request->get_tab[get_index] << "\"" << logend;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@@ -26,8 +26,8 @@ class FunctionParser
|
||||
Functions * functions;
|
||||
System * system;
|
||||
|
||||
GetTable::size_type get_index;
|
||||
GetTable::size_type get_table_len;
|
||||
GetTab::size_type get_index;
|
||||
GetTab::size_type get_tab_len;
|
||||
|
||||
void SkipEmptyString(const char * msg);
|
||||
|
||||
|
@@ -124,6 +124,7 @@ void Functions::Create()
|
||||
Add(fun_tinymce);
|
||||
Add(fun_uname);
|
||||
Add(fun_upload);
|
||||
Add(fun_uptime);
|
||||
Add(fun_who);
|
||||
}
|
||||
|
||||
@@ -138,14 +139,14 @@ void Functions::Parse()
|
||||
void Functions::SetDefaultFunctionForFile()
|
||||
{
|
||||
if( request->item.auth != Item::auth_none )
|
||||
request->pfunction = &fun_download;
|
||||
request->function = &fun_download;
|
||||
else
|
||||
if( system->HasReadExecAccess(request->item) )
|
||||
request->pfunction = &fun_run;
|
||||
request->function = &fun_run;
|
||||
else
|
||||
request->pfunction = &fun_cat;
|
||||
request->function = &fun_cat;
|
||||
|
||||
log << log3 << "Content: default function: " << request->pfunction->fun.url << logend;
|
||||
log << log3 << "Content: default function: " << request->function->fun.url << logend;
|
||||
}
|
||||
|
||||
|
||||
@@ -153,7 +154,7 @@ void Functions::SetDefaultFunctionForFile()
|
||||
|
||||
void Functions::SetDefaultFunctionForDir()
|
||||
{
|
||||
long default_item = request->dir_table.back()->default_item;
|
||||
long default_item = request->dir_tab.back()->default_item;
|
||||
|
||||
if( default_item != -1 )
|
||||
{
|
||||
@@ -165,20 +166,20 @@ void Functions::SetDefaultFunctionForDir()
|
||||
|
||||
if( system->mounts.pmount->type == Mount::thread )
|
||||
{
|
||||
request->pfunction = &fun_thread;
|
||||
log << log3 << "Content: default function: " << request->pfunction->fun.url << logend;
|
||||
request->function = &fun_thread;
|
||||
log << log3 << "Content: default function: " << request->function->fun.url << logend;
|
||||
}
|
||||
else
|
||||
if( system->mounts.pmount->type == Mount::ticket )
|
||||
{
|
||||
request->pfunction = &fun_ticket;
|
||||
log << log3 << "Content: default function: " << request->pfunction->fun.url << logend;
|
||||
request->function = &fun_ticket;
|
||||
log << log3 << "Content: default function: " << request->function->fun.url << logend;
|
||||
}
|
||||
else
|
||||
{
|
||||
// cms
|
||||
request->pfunction = &fun_ls;
|
||||
log << log3 << "Content: default function: " << request->pfunction->fun.url << logend;
|
||||
request->function = &fun_ls;
|
||||
log << log3 << "Content: default function: " << request->function->fun.url << logend;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,7 +206,7 @@ void Functions::MakeGet()
|
||||
// in authorizer mode only cat function is available
|
||||
// (and must be default)
|
||||
|
||||
if( request->pfunction )
|
||||
if( request->function )
|
||||
{
|
||||
request->status = WINIX_ERR_NO_ITEM;
|
||||
log << log1 << "Content: in authorizer mode only 'cat' funtion is available and must "
|
||||
@@ -213,30 +214,30 @@ void Functions::MakeGet()
|
||||
return;
|
||||
}
|
||||
|
||||
request->pfunction = &fun_cat;
|
||||
request->function = &fun_cat;
|
||||
}
|
||||
|
||||
|
||||
if( !request->pfunction )
|
||||
if( !request->function )
|
||||
SetDefaultFunction();
|
||||
|
||||
if( !request->redirect_to.empty() )
|
||||
return;
|
||||
|
||||
if( !request->pfunction )
|
||||
if( !request->function )
|
||||
{
|
||||
request->status = WINIX_ERR_NO_FUNCTION;
|
||||
log << log1 << "Functions: no function (neither cat nor ls)" << logend;
|
||||
return;
|
||||
}
|
||||
|
||||
if( !request->pfunction->HasAccess() )
|
||||
if( !request->function->HasAccess() )
|
||||
{
|
||||
request->status = WINIX_ERR_PERMISSION_DENIED;
|
||||
return;
|
||||
}
|
||||
|
||||
request->pfunction->MakeGet();
|
||||
request->function->MakeGet();
|
||||
}
|
||||
|
||||
|
||||
@@ -249,23 +250,23 @@ void Functions::MakePost()
|
||||
return;
|
||||
}
|
||||
|
||||
if( !request->pfunction )
|
||||
if( !request->function )
|
||||
SetDefaultFunction();
|
||||
|
||||
if( !request->pfunction )
|
||||
if( !request->function )
|
||||
{
|
||||
request->status = WINIX_ERR_NO_FUNCTION;
|
||||
log << log1 << "Functions: MakePost: no function" << logend;
|
||||
return;
|
||||
}
|
||||
|
||||
if( !request->pfunction->HasAccess() )
|
||||
if( !request->function->HasAccess() )
|
||||
{
|
||||
request->status = WINIX_ERR_PERMISSION_DENIED;
|
||||
return;
|
||||
}
|
||||
|
||||
request->pfunction->MakePost();
|
||||
request->function->MakePost();
|
||||
}
|
||||
|
||||
|
||||
@@ -321,9 +322,9 @@ bool Functions::ReadItemUrlSubject(Item & item, Item::Type item_type)
|
||||
|
||||
if( item.subject.empty() )
|
||||
{
|
||||
item.subject = request->dir_table.back()->subject;
|
||||
item.subject = request->dir_tab.back()->subject;
|
||||
item.subject += "_msg_";
|
||||
item.subject += ToStr(db->Size(request->dir_table.back()->id, Item::file));
|
||||
item.subject += ToStr(db->Size(request->dir_tab.back()->id, Item::file));
|
||||
}
|
||||
|
||||
// if item.url is empty then it will be set from item.subject
|
||||
@@ -387,7 +388,7 @@ bool Functions::ReadItem(Item & item, Item::Type item_type)
|
||||
return false;
|
||||
|
||||
item.type = item_type;
|
||||
item.parent_id = request->dir_table.back()->id; // !! moze to dac jako parametr?
|
||||
item.parent_id = request->dir_tab.back()->id; // !! moze to dac jako parametr?
|
||||
|
||||
bool edit_with_url = ReadItemUrlSubject(item, item_type);
|
||||
|
||||
@@ -411,5 +412,5 @@ void Functions::SetUser(Item & item)
|
||||
request->PostVar("guestname", item.guest_name);
|
||||
}
|
||||
|
||||
item.group_id = request->dir_table.back()->group_id;
|
||||
item.group_id = request->dir_tab.back()->group_id;
|
||||
}
|
||||
|
@@ -42,6 +42,7 @@
|
||||
#include "tinymce.h"
|
||||
#include "uname.h"
|
||||
#include "upload.h"
|
||||
#include "uptime.h"
|
||||
#include "who.h"
|
||||
|
||||
|
||||
@@ -82,6 +83,7 @@ public:
|
||||
Fun::Tinymce fun_tinymce;
|
||||
Fun::Uname fun_uname;
|
||||
Fun::Upload fun_upload;
|
||||
Fun::Uptime fun_uptime;
|
||||
Fun::Who fun_who;
|
||||
|
||||
|
||||
|
@@ -18,6 +18,22 @@ namespace Fun
|
||||
FunThread::FunThread()
|
||||
{
|
||||
fun.url = "thread";
|
||||
Clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool FunThread::HasAccess()
|
||||
{
|
||||
return !request->is_item;
|
||||
}
|
||||
|
||||
|
||||
void FunThread::Clear()
|
||||
{
|
||||
is_thread = false;
|
||||
thread.Clear();
|
||||
thread_tab.clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -25,12 +41,12 @@ void FunThread::CreateSortIndexByDate()
|
||||
{
|
||||
size_t i;
|
||||
|
||||
for(i = 0; i < request->thread_tab.size() ; ++i)
|
||||
for(i = 0; i < thread_tab.size() ; ++i)
|
||||
{
|
||||
Item * pdir = system->dirs.GetDir(request->thread_tab[i].dir_id);
|
||||
Item * pdir = system->dirs.GetDir(thread_tab[i].dir_id);
|
||||
|
||||
if( pdir )
|
||||
request->thread_tab[i].sort = (long)mktime(&pdir->date_creation);
|
||||
thread_tab[i].sort = (long)mktime(&pdir->date_creation);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,29 +60,24 @@ bool FunThread::FunThreadSort(const Thread & t1, const Thread & t2)
|
||||
|
||||
void FunThread::MakeGet()
|
||||
{
|
||||
// !! dac do hasaccess()
|
||||
if( request->is_item )
|
||||
{
|
||||
request->status = WINIX_ERR_PERMISSION_DENIED;
|
||||
return;
|
||||
}
|
||||
is_thread = (db->GetThreadByDirId(request->dir_tab.back()->id, thread) == WINIX_ERR_OK);
|
||||
|
||||
Db::ItemQuery iq;
|
||||
|
||||
if( system->mounts.pmount->IsArg(Mount::par_thread, "sort_desc") )
|
||||
iq.sort_asc = false;
|
||||
|
||||
iq.WhereParentId(request->dir_table.back()->id);
|
||||
iq.WhereParentId(request->dir_tab.back()->id);
|
||||
iq.WhereType(Item::file);
|
||||
iq.WhereAuth(Item::auth_none);
|
||||
|
||||
db->GetItems(request->item_table, iq);
|
||||
db->GetThreads(request->dir_table.back()->id, request->thread_tab);
|
||||
db->GetItems(request->item_tab, iq);
|
||||
db->GetThreads(request->dir_tab.back()->id, thread_tab);
|
||||
|
||||
system->CheckAccessToItems(request->item_table);
|
||||
system->CheckAccessToItems(request->item_tab);
|
||||
|
||||
CreateSortIndexByDate();
|
||||
std::sort(request->thread_tab.begin(), request->thread_tab.end(), FunThreadSort);
|
||||
std::sort(thread_tab.begin(), thread_tab.end(), FunThreadSort);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -23,8 +23,15 @@ class FunThread : public FunctionBase
|
||||
public:
|
||||
|
||||
FunThread();
|
||||
bool HasAccess();
|
||||
void Clear();
|
||||
void MakeGet();
|
||||
|
||||
// current thread (if exists)
|
||||
bool is_thread;
|
||||
Thread thread;
|
||||
std::vector<Thread> thread_tab;
|
||||
|
||||
private:
|
||||
|
||||
static bool FunThreadSort(const Thread & t1, const Thread & t2);
|
||||
|
@@ -16,26 +16,55 @@ namespace Fun
|
||||
FunTicket::FunTicket()
|
||||
{
|
||||
fun.url = "ticket";
|
||||
Clear();
|
||||
}
|
||||
|
||||
|
||||
bool FunTicket::HasAccess()
|
||||
{
|
||||
if( request->is_item || system->mounts.pmount->type != Mount::ticket )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void FunTicket::Clear()
|
||||
{
|
||||
item.Clear();
|
||||
is_ticket = false;
|
||||
ticket.Clear();
|
||||
ticket_tab.clear();
|
||||
}
|
||||
|
||||
|
||||
void FunTicket::ReadTicket()
|
||||
{
|
||||
if( db->GetTicketByDirId(request->dir_tab.back()->id, ticket) == WINIX_ERR_OK )
|
||||
{
|
||||
is_ticket = true;
|
||||
db->GetItemById(ticket.item_id, item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void FunTicket::TicketDeleteFirst()
|
||||
{
|
||||
if( !request->is_ticket )
|
||||
if( !is_ticket )
|
||||
return;
|
||||
|
||||
for(size_t i=0 ; i<request->item_table.size() ; ++i)
|
||||
for(size_t i=0 ; i<request->item_tab.size() ; ++i)
|
||||
{
|
||||
if( request->item_table[i].id == request->ticket.item_id )
|
||||
if( request->item_tab[i].id == ticket.item_id )
|
||||
{
|
||||
// this is the first item with the content for the ticket
|
||||
|
||||
if( !system->HasReadAccess(request->item_table[i]) )
|
||||
if( !system->HasReadAccess(request->item_tab[i]) )
|
||||
{
|
||||
request->status = WINIX_ERR_PERMISSION_DENIED;
|
||||
}
|
||||
|
||||
request->item_table.erase(request->item_table.begin() + i);
|
||||
request->item_tab.erase(request->item_tab.begin() + i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -45,23 +74,19 @@ void FunTicket::TicketDeleteFirst()
|
||||
|
||||
void FunTicket::MakeGet()
|
||||
{
|
||||
if( request->is_item || system->mounts.pmount->type != Mount::ticket )
|
||||
{
|
||||
request->status = WINIX_ERR_PERMISSION_DENIED;
|
||||
return;
|
||||
}
|
||||
ReadTicket();
|
||||
|
||||
Db::ItemQuery iq;
|
||||
|
||||
iq.WhereParentId(request->dir_table.back()->id);
|
||||
iq.WhereParentId(request->dir_tab.back()->id);
|
||||
iq.WhereType(Item::file);
|
||||
iq.WhereAuth(Item::auth_none);
|
||||
|
||||
db->GetItems(request->item_table, iq);
|
||||
db->GetTickets(request->dir_table.back()->id, request->ticket_tab);
|
||||
db->GetItems(request->item_tab, iq);
|
||||
db->GetTickets(request->dir_tab.back()->id, ticket_tab);
|
||||
|
||||
TicketDeleteFirst();
|
||||
system->CheckAccessToItems(request->item_table);
|
||||
system->CheckAccessToItems(request->item_tab);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -11,7 +11,8 @@
|
||||
#define headerfilecmslucontentticket
|
||||
|
||||
#include "functionbase.h"
|
||||
|
||||
#include "core/ticket.h"
|
||||
#include "core/item.h"
|
||||
|
||||
|
||||
namespace Fun
|
||||
@@ -23,7 +24,16 @@ class FunTicket : public FunctionBase
|
||||
public:
|
||||
|
||||
FunTicket();
|
||||
bool HasAccess();
|
||||
void Clear();
|
||||
void MakeGet();
|
||||
void ReadTicket();
|
||||
|
||||
// those object are used by editticket and createticket winix functions too
|
||||
Item item;
|
||||
bool is_ticket;
|
||||
Ticket ticket;
|
||||
std::vector<Ticket> ticket_tab;
|
||||
|
||||
private:
|
||||
|
||||
|
@@ -29,17 +29,17 @@ void Ls::MakeGet()
|
||||
|
||||
iq.sel_content = false;
|
||||
|
||||
iq.WhereParentId(request->dir_table.back()->id);
|
||||
iq.WhereParentId(request->dir_tab.back()->id);
|
||||
iq.WhereType(Item::file);
|
||||
|
||||
if( request->IsParam("ckeditor_browse") )
|
||||
{
|
||||
iq.WhereAuth(Item::auth_image);
|
||||
db->GetItems(request->item_table, iq);
|
||||
db->GetItems(request->item_tab, iq);
|
||||
}
|
||||
else
|
||||
{
|
||||
db->GetItems(request->item_table, iq);
|
||||
db->GetItems(request->item_tab, iq);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@ bool Mkdir::HasAccess(const Item & item)
|
||||
if( !system->mounts.pmount->IsPar(Mount::par_mkdir_on) )
|
||||
return true;
|
||||
|
||||
if( system->mounts.pmount->IsArg(Mount::par_mkdir_on, request->dir_table.size()) )
|
||||
if( system->mounts.pmount->IsArg(Mount::par_mkdir_on, request->dir_tab.size()) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -50,7 +50,7 @@ return false;
|
||||
|
||||
bool Mkdir::HasAccess()
|
||||
{
|
||||
if( request->is_item || !HasAccess(*request->dir_table.back()) )
|
||||
if( request->is_item || !HasAccess(*request->dir_tab.back()) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -59,13 +59,13 @@ return true;
|
||||
|
||||
|
||||
|
||||
void Mkdir::PostFunMkdir(bool add_to_dir_table, int privileges)
|
||||
void Mkdir::PostFunMkdir(bool add_to_dir_tab, int privileges)
|
||||
{
|
||||
functions->ReadItem(request->item, Item::dir);
|
||||
functions->SetUser(request->item);
|
||||
request->item.privileges = privileges;
|
||||
|
||||
request->status = system->dirs.AddDirectory(request->item, add_to_dir_table);
|
||||
request->status = system->dirs.AddDirectory(request->item, add_to_dir_tab);
|
||||
|
||||
if( request->status == WINIX_ERR_OK )
|
||||
{
|
||||
|
@@ -30,7 +30,7 @@ private:
|
||||
|
||||
bool HasAccess(const Item & item); // !! moze to powinien byc skladnik modelu?
|
||||
bool FunMkdirCheckAccess();
|
||||
void PostFunMkdir(bool add_to_dir_table, int privileges);
|
||||
void PostFunMkdir(bool add_to_dir_tab, int privileges);
|
||||
};
|
||||
|
||||
|
||||
|
@@ -27,10 +27,10 @@ bool Mv::MoveCheckAccessFromToDir()
|
||||
Item * last;
|
||||
Item * last_but_one = 0;
|
||||
|
||||
last = request->dir_table[request->dir_table.size()-1];
|
||||
last = request->dir_tab[request->dir_tab.size()-1];
|
||||
|
||||
if( request->dir_table.size() >= 2 )
|
||||
last_but_one = request->dir_table[request->dir_table.size()-2];
|
||||
if( request->dir_tab.size() >= 2 )
|
||||
last_but_one = request->dir_tab[request->dir_tab.size()-2];
|
||||
|
||||
if( request->method != Request::post )
|
||||
{
|
||||
@@ -64,7 +64,7 @@ bool Mv::MoveCheckAccessFrom()
|
||||
{
|
||||
// moving a file
|
||||
|
||||
if( !system->HasWriteAccess(*request->dir_table.back()) )
|
||||
if( !system->HasWriteAccess(*request->dir_tab.back()) )
|
||||
{
|
||||
request->status = WINIX_ERR_PERMISSION_DENIED;
|
||||
return false;
|
||||
@@ -237,16 +237,16 @@ Db::ItemQuery iq;
|
||||
iq.sel_type = true;
|
||||
iq.sel_url = true;
|
||||
iq.sel_auth = true;
|
||||
iq.WhereParentId(request->dir_table.back()->id);
|
||||
iq.WhereParentId(request->dir_tab.back()->id);
|
||||
|
||||
db->GetItems(request->item_table, iq);
|
||||
db->GetItems(request->item_tab, iq);
|
||||
|
||||
for(size_t i=0 ; i<request->item_table.size() ; ++i)
|
||||
for(size_t i=0 ; i<request->item_tab.size() ; ++i)
|
||||
{
|
||||
if( request->item_table[i].type == Item::dir )
|
||||
MoveDir(request->item_table[i], false);
|
||||
if( request->item_tab[i].type == Item::dir )
|
||||
MoveDir(request->item_tab[i], false);
|
||||
else
|
||||
MoveFile(request->item_table[i], false);
|
||||
MoveFile(request->item_tab[i], false);
|
||||
}
|
||||
|
||||
system->RedirectToLastDir();
|
||||
@@ -355,7 +355,7 @@ void Mv::MakePost()
|
||||
}
|
||||
else
|
||||
{
|
||||
MoveDir(*request->dir_table.back());
|
||||
MoveDir(*request->dir_tab.back());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -21,14 +21,14 @@ Node::Node()
|
||||
|
||||
void Node::MakeGet()
|
||||
{
|
||||
if( request->param_table.empty() )
|
||||
if( request->param_tab.empty() )
|
||||
{
|
||||
//request->status = Error
|
||||
//!!zglosic 404
|
||||
return;
|
||||
}
|
||||
|
||||
long id = atol( request->param_table[0].name.c_str() );
|
||||
long id = atol( request->param_tab[0].name.c_str() );
|
||||
|
||||
system->RedirectTo(id);
|
||||
}
|
||||
|
@@ -174,12 +174,12 @@ void PrivChanger::PrivFilesInDir(long parent_id)
|
||||
iq.WhereParentId(parent_id);
|
||||
iq.WhereType(Item::file);
|
||||
|
||||
db->GetItems(request->item_table, iq);
|
||||
db->GetItems(request->item_tab, iq);
|
||||
|
||||
|
||||
std::vector<Item>::iterator i = request->item_table.begin();
|
||||
std::vector<Item>::iterator i = request->item_tab.begin();
|
||||
|
||||
for( ; i != request->item_table.end() ; ++i)
|
||||
for( ; i != request->item_tab.end() ; ++i)
|
||||
{
|
||||
PrivLog("changed file: ", -1, i->url);
|
||||
ChangePriv(*i, user_id_file, group_id_file, priv_file);
|
||||
@@ -253,16 +253,16 @@ void PrivChanger::PrivDir()
|
||||
|
||||
if( request->IsPostVar("changecurrentdir") )
|
||||
{
|
||||
Item & last_dir = *request->dir_table.back();
|
||||
Item & last_dir = *request->dir_tab.back();
|
||||
PrivLog("changed dir: ", last_dir.id, last_dir.url);
|
||||
ChangePriv(*request->dir_table.back(), user_id_dir, group_id_dir, priv_dir);
|
||||
ChangePriv(*request->dir_tab.back(), user_id_dir, group_id_dir, priv_dir);
|
||||
}
|
||||
|
||||
|
||||
subdirectories = request->IsPostVar("changesubdirs");
|
||||
|
||||
// go through all directories
|
||||
PrivDir(request->dir_table.back()->id);
|
||||
PrivDir(request->dir_tab.back()->id);
|
||||
|
||||
system->RedirectToLastDir();
|
||||
}
|
||||
@@ -284,7 +284,7 @@ void PrivChanger::PrivOneItem()
|
||||
}
|
||||
else
|
||||
{
|
||||
ChangePriv(*request->dir_table.back(), user_id_file, group_id_file, priv_file);
|
||||
ChangePriv(*request->dir_tab.back(), user_id_file, group_id_file, priv_file);
|
||||
system->RedirectToLastDir();
|
||||
}
|
||||
}
|
||||
|
@@ -108,7 +108,7 @@ void ReadTicket::Read(System * psystem, Request * prequest, Ticket * pticket)
|
||||
request = prequest;
|
||||
ticket = pticket;
|
||||
|
||||
ticket->parent_id = request->dir_table.back()->id;
|
||||
ticket->parent_id = request->dir_tab.back()->id;
|
||||
|
||||
ReadTicketType();
|
||||
ReadTicketStatus();
|
||||
|
@@ -62,7 +62,7 @@ return true;
|
||||
bool Rm::HasAccess()
|
||||
{
|
||||
if( !request->is_item )
|
||||
return HasAccess(*request->dir_table.back());
|
||||
return HasAccess(*request->dir_tab.back());
|
||||
else
|
||||
return HasAccess(request->item);
|
||||
|
||||
@@ -100,10 +100,10 @@ void Rm::RemoveAllDirs(long dir_id)
|
||||
plugin.Call(WINIX_DIR_PREPARE_TO_REMOVE, dir_id);
|
||||
|
||||
rm_auth_iq.WhereParentId(dir_id);
|
||||
db->GetItems(request->item_table, rm_auth_iq);
|
||||
db->GetItems(request->item_tab, rm_auth_iq);
|
||||
|
||||
for(size_t i=0 ; i<request->item_table.size() ; ++i)
|
||||
RemoveAuth(request->item_table[i]);
|
||||
for(size_t i=0 ; i<request->item_tab.size() ; ++i)
|
||||
RemoveAuth(request->item_tab[i]);
|
||||
|
||||
if( db->DelDirById(dir_id) == WINIX_ERR_OK )
|
||||
{
|
||||
@@ -123,21 +123,21 @@ void Rm::RemoveAllDirs()
|
||||
RemoveAuthPrepareQuery();
|
||||
|
||||
// this method deletes recursively all directories
|
||||
RemoveAllDirs(request->dir_table.back()->id);
|
||||
request->dir_table.erase(--request->dir_table.end());
|
||||
RemoveAllDirs(request->dir_tab.back()->id);
|
||||
request->dir_tab.erase(--request->dir_tab.end());
|
||||
|
||||
if( request->dir_table.empty() )
|
||||
if( request->dir_tab.empty() )
|
||||
{
|
||||
// we have deleted the root directory
|
||||
system->dirs.CheckRootDir(); // adding a new root dir
|
||||
Item * proot = system->dirs.GetRootDir();
|
||||
|
||||
if( proot )
|
||||
request->dir_table.push_back(proot);
|
||||
request->dir_tab.push_back(proot);
|
||||
else
|
||||
// there is no a root dir
|
||||
// CheckRootDir() didn't add the root dir (probably problem with the database)
|
||||
// make sure that ::Make() will check that the dir_table is empty and returns
|
||||
// make sure that ::Make() will check that the dir_tab is empty and returns
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ void Rm::RemoveAllDirs()
|
||||
|
||||
void Rm::RemoveDir()
|
||||
{
|
||||
if( request->param_table.empty() )
|
||||
if( request->param_tab.empty() )
|
||||
request->status = WINIX_ERR_PERMISSION_DENIED; // use parameter "r" for removing a directory
|
||||
else
|
||||
if( request->IsParam("r") )
|
||||
@@ -189,9 +189,9 @@ void Rm::RemoveAuth(Item & item)
|
||||
|
||||
void Rm::RemoveFile()
|
||||
{
|
||||
// for safety we check if param_table is empty
|
||||
// for safety we check if param_tab is empty
|
||||
// a user can use "confirm" but can make a mistake when typing
|
||||
if( !request->param_table.empty() )
|
||||
if( !request->param_tab.empty() )
|
||||
{
|
||||
request->status = WINIX_ERR_UNKNOWN_PARAM;
|
||||
return;
|
||||
|
@@ -31,7 +31,7 @@ bool Subject::SubjectCheckAccess()
|
||||
if( request->is_item )
|
||||
access = system->HasWriteAccess(request->item);
|
||||
else
|
||||
access = system->HasWriteAccess(*request->dir_table.back());
|
||||
access = system->HasWriteAccess(*request->dir_tab.back());
|
||||
|
||||
if( !access )
|
||||
request->status = WINIX_ERR_PERMISSION_DENIED;
|
||||
@@ -43,7 +43,7 @@ return access;
|
||||
|
||||
void Subject::EditDirSubject()
|
||||
{
|
||||
Item & dir = *request->dir_table.back();
|
||||
Item & dir = *request->dir_tab.back();
|
||||
|
||||
request->PostVar("subject", dir.subject);
|
||||
db->EditSubjectById(dir, dir.id);
|
||||
|
@@ -69,7 +69,7 @@ return true;
|
||||
|
||||
bool Upload::HasAccess()
|
||||
{
|
||||
if( request->is_item || !HasAccess(*request->dir_table.back()) )
|
||||
if( request->is_item || !HasAccess(*request->dir_tab.back()) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -140,14 +140,14 @@ return true;
|
||||
void Upload::UploadMulti()
|
||||
{
|
||||
request->item.Clear(); // clearing and setting date
|
||||
request->item.parent_id = request->dir_table.back()->id;
|
||||
request->item.parent_id = request->dir_tab.back()->id;
|
||||
request->item.type = Item::file;
|
||||
request->item.privileges = 0644; // !! tymczasowo
|
||||
functions->SetUser(request->item);
|
||||
|
||||
PostFileTable::iterator i = request->post_file_table.begin();
|
||||
PostFileTab::iterator i = request->post_file_tab.begin();
|
||||
|
||||
for( ; i != request->post_file_table.end() ; ++i)
|
||||
for( ; i != request->post_file_tab.end() ; ++i)
|
||||
{
|
||||
const char * file_name = i->second.filename.c_str();
|
||||
|
||||
@@ -183,7 +183,7 @@ void Upload::UploadSingle()
|
||||
functions->SetUser(request->item);
|
||||
request->item.privileges = 0644; // !! tymczasowo
|
||||
|
||||
const char * file_name = request->post_file_table.begin()->second.filename.c_str();
|
||||
const char * file_name = request->post_file_tab.begin()->second.filename.c_str();
|
||||
request->item.auth = SelectFileType(file_name);
|
||||
|
||||
if( !has_subject )
|
||||
@@ -203,7 +203,7 @@ void Upload::UploadSingle()
|
||||
|
||||
if( request->status == WINIX_ERR_OK )
|
||||
{
|
||||
const std::string & tmp_filename = request->post_file_table.begin()->second.tmp_filename;
|
||||
const std::string & tmp_filename = request->post_file_tab.begin()->second.tmp_filename;
|
||||
UploadSaveFile(tmp_filename, request->item.auth_path);
|
||||
request->status = db->EditAuthById(request->item, request->item.id);
|
||||
}
|
||||
@@ -217,7 +217,7 @@ void Upload::UploadSingle()
|
||||
// !! dodac usuwanie plikow statycznych przez rm
|
||||
void Upload::MakePost()
|
||||
{
|
||||
if( request->post_file_table.empty() )
|
||||
if( request->post_file_tab.empty() )
|
||||
{
|
||||
request->status = WINIX_ERR_PERMISSION_DENIED;
|
||||
return;
|
||||
@@ -226,7 +226,7 @@ void Upload::MakePost()
|
||||
if( !FunUploadCheckAbuse() )
|
||||
return;
|
||||
|
||||
if( request->post_file_table.size() > 1 )
|
||||
if( request->post_file_tab.size() > 1 )
|
||||
UploadMulti();
|
||||
else
|
||||
UploadSingle();
|
||||
|
25
functions/uptime.cpp
Executable file
25
functions/uptime.cpp
Executable file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2010, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "uptime.h"
|
||||
|
||||
|
||||
namespace Fun
|
||||
{
|
||||
|
||||
Uptime::Uptime()
|
||||
{
|
||||
fun.url = "uptime";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace
|
||||
|
34
functions/uptime.h
Executable file
34
functions/uptime.h
Executable file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucontentuptime
|
||||
#define headerfilecmslucontentuptime
|
||||
|
||||
#include "functionbase.h"
|
||||
|
||||
|
||||
|
||||
namespace Fun
|
||||
{
|
||||
|
||||
|
||||
class Uptime : public FunctionBase
|
||||
{
|
||||
public:
|
||||
|
||||
Uptime();
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user