diff --git a/core/Makefile.dep b/core/Makefile.dep index ab5a4d0..abdc20c 100755 --- a/core/Makefile.dep +++ b/core/Makefile.dep @@ -478,21 +478,21 @@ system.o: threadmanager.h ../templates/templates.h system.o: ../templates/patterncacher.h ../templates/indexpatterns.h system.o: ../templates/patterns.h ../templates/changepatterns.h ../core/cur.h system.o: ../core/system.h ../core/sessionmanager.h ../core/htmlfilter.h -system.o: ../functions/functionbase.h ../core/request.h ../core/synchro.h -system.o: plugin.h pluginmsg.h sessionmanager.h sessioncontainer.h system.o: ../functions/functions.h ../functions/functionbase.h -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/last.h ../functions/login.h ../functions/logout.h -system.o: ../functions/ln.h ../functions/ls.h ../functions/mkdir.h -system.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h -system.o: ../functions/passwd.h ../functions/priv.h ../functions/reload.h -system.o: ../functions/rm.h ../functions/sort.h ../functions/specialdefault.h +system.o: ../core/request.h ../core/synchro.h ../functions/functionparser.h +system.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h +system.o: ../functions/privchanger.h ../functions/chown.h +system.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h +system.o: ../functions/download.h ../functions/emacs.h ../functions/last.h +system.o: ../functions/login.h ../functions/logout.h ../functions/ln.h +system.o: ../functions/ls.h ../functions/mkdir.h ../functions/mv.h +system.o: ../functions/nicedit.h ../functions/node.h ../functions/passwd.h +system.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h +system.o: ../functions/sort.h ../functions/specialdefault.h system.o: ../functions/stat.h ../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 textstream.o: textstream.h misc.h item.h requesttypes.h threadmanager.o: threadmanager.h basethread.h synchro.h log.h textstream.h threadmanager.o: logmanipulators.h slog.h cur.h request.h requesttypes.h diff --git a/core/app.cpp b/core/app.cpp index 4a261bd..ff68c13 100755 --- a/core/app.cpp +++ b/core/app.cpp @@ -60,6 +60,7 @@ App::App() system.SetCur(&cur); system.SetDb(&db); system.SetSynchro(&synchro); + system.SetFunctions(&functions); templates.SetConfig(&config); templates.SetCur(&cur); @@ -199,6 +200,22 @@ return true; } +bool App::ShouldChangeToSSL() +{ + if( !config.use_ssl || cur.request->using_ssl ) + return false; + + if( cur.request->function == &functions.fun_login || + cur.request->function == &functions.fun_adduser ) + return true; + + if( config.use_ssl_only_for_logged_users && !cur.session->puser ) + return false; + +return true; +} + + void App::ProcessRequestThrow() { ReadRequest(); @@ -218,15 +235,15 @@ void App::ProcessRequestThrow() } plugin.Call(WINIX_SESSION_CHANGED); + functions.Parse(); // parsing directories,files,functions and parameters - if( (config.use_ssl && (!config.use_ssl_only_for_logged_users || cur.session->puser)) && !cur.request->using_ssl ) + if( ShouldChangeToSSL() ) { BaseUrlRedirect(303); - log << log3 << "App: BaseUrlRedirect from: " << cur.request->env_http_host << " to SSL connection" << logend; + log << log3 << "App: this operation should be used in SSL connection" << logend; } else { - functions.Parse(); // parsing directories,files,functions and parameters cur.mount = system.mounts.CalcCurMount(); if( system.mounts.pmount->type != system.mounts.MountTypeStatic() ) diff --git a/core/app.h b/core/app.h index f6230fe..12a32fa 100755 --- a/core/app.h +++ b/core/app.h @@ -126,6 +126,7 @@ private: void ProcessRequest(); void BaseUrlRedirect(int code); bool BaseUrlRedirect(); + bool ShouldChangeToSSL(); void MakePage(); void Make(); void SaveSessionsIfNeeded(); // !! wywalic do menagera sesji?? diff --git a/core/system.cpp b/core/system.cpp index 12884b7..c14edb3 100755 --- a/core/system.cpp +++ b/core/system.cpp @@ -11,7 +11,7 @@ #include "misc.h" #include "error.h" #include "templates/templates.h" -#include "functions/functionbase.h" +#include "functions/functions.h" #include "plugin.h" @@ -40,6 +40,11 @@ void System::SetSynchro(Synchro * psynchro) } +void System::SetFunctions(Functions * pfunctions) +{ + functions = pfunctions; +} + void System::Init() @@ -92,7 +97,10 @@ bool ssl = false; if( can_use_ssl ) { - if( !config->use_ssl_only_for_logged_users || cur->session->puser ) + if( !config->use_ssl_only_for_logged_users || + cur->session->puser || + cur->request->function == &functions->fun_login || + cur->request->function == &functions->fun_adduser) { str += config->url_ssl_proto; ssl = true; diff --git a/core/system.h b/core/system.h index 549700e..bc1d403 100755 --- a/core/system.h +++ b/core/system.h @@ -27,6 +27,7 @@ #include "notify/notify.h" +class Functions; // file system @@ -71,6 +72,7 @@ public: void SetConfig(Config * pconfig); void SetDb(Db * pdb); void SetSynchro(Synchro * psynchro); + void SetFunctions(Functions * pfunctions); void Init(); void AddParams(const ParamTab & param_tab, std::wstring & str, bool clear_str = true); @@ -142,6 +144,7 @@ private: Db * db; Config * config; Synchro * synchro; + Functions * functions; Item item_temp; std::wstring link_to_temp, name_temp; diff --git a/static/basic/winix.css b/static/basic/winix.css index 28b599e..be75b08 100755 --- a/static/basic/winix.css +++ b/static/basic/winix.css @@ -44,6 +44,7 @@ blockquote:before, blockquote:after { content: ""; } + blockquote { margin-left: 40px; margin-right: 40px; @@ -67,6 +68,55 @@ strong { font-weight: bold; } +ul > li { +list-style-type: bullet; +margin-left: 2em; +padding: 0.4em 0 0.4em 15px; +} + +ol > li { +list-style-type: decimal; +margin-left: 3em; +padding: 0.4em 0 0.4em 5px; +} + + +* html ul li { +list-style-type: bullet; +margin-left: 2em; +padding: 0.4em 0 0.4em 15px; +} + +* html ol li { +list-style-type: decimal; +margin-left: 3em; +padding: 0.4em 0 0.4em 5px; +} + +span.strikethrough { +text-decoration: line-through; +} + +span.underline { +text-decoration: underline; +} + +table { +margin-left: 3em; +} + + +table th { +font-weight: bold; +padding-right: 2em; +} + +table td { +padding-right: 2em; +} + + + /* */ p.withnext { diff --git a/static/layout1/winix.css b/static/layout1/winix.css index 0c3cdda..d28cfef 100755 --- a/static/layout1/winix.css +++ b/static/layout1/winix.css @@ -69,10 +69,12 @@ font-weight: bold; ul li { list-style-type: bullet; +margin-left: 2em; } ol li { list-style-type: decimal; +margin-left: 2em; } /* ---------------------- index template -------------------------- */