Commit Graph

199 Commits

Author SHA1 Message Date
Tomasz Sowa e8ba2a7bd1 fixed: incorrect status was set when editing a file
now System::EditFile() returns boolean
2021-03-11 18:42:26 +01:00
Tomasz Sowa 23f1c112a4 make depend 2021-03-10 16:40:22 +01:00
Tomasz Sowa 4d76e53554 in after_insert() methods: changed get_last_sequence -> get_last_sequence_for_primary_key 2021-03-09 18:16:29 +01:00
Tomasz Sowa 73352e680e Make depend 2021-03-08 21:10:33 +01:00
Tomasz Sowa 57aad8b454 removed from Item: update() and save() methods which take the 'url_was_changed' argument
and added ItemModelData (based on morm::ModelData) class which has 'prepare_unique_url' field,
an object of this class is passed to update(), insert() and save() methods

fixed: Dirs::CheckRootDir(): update should update childs too (privileges)

WIP: #4
2021-03-08 21:06:50 +01:00
Tomasz Sowa ab5c44a2cb removed some old methods for adding/editing Item from Db 2021-02-25 00:17:07 +01:00
Tomasz Sowa 3e84eb9dbf Makefile deps 2021-02-25 00:15:03 +01:00
Tomasz Sowa afbe82e9f4 changed the way how prefixes are added to urls
instead at the end we adding a prefix before an extension, e.g: filename_(2).jpg
2021-02-25 00:12:45 +01:00
Tomasz Sowa 51b1aed483 removed DbItemQuery and DbItemColumns which were used for database accessing for Item class 2021-02-24 22:54:36 +01:00
Tomasz Sowa 32e93a04c5 Item class has been moved to a new directory 'models', a new class has been added: ItemContent
and same fields from Item were moved to ItemContent

Item
- id
- parent_id
- type (file, dir, symlink)
- url
- subject
- template (html template)
- sort_index
- content_id

ItemContent
- id
- ref -> references (renamed)
- user_id
- modification_user_id
- group_id
- privileges
- date_creation
- date_modification
- guest_name
- link_to
- link_redirect
- file_path
- file_fs
- file_type
- file_size
- has_thumb -> file_has_thumb (renamed)
- hash -> file_hash (renamed)
- hash_type -> file_hash_type (renamed)
- content -> content_raw (renamed)
- content_type -> content_raw_type (renamed)
- content_parsed
- content_parsed_type
- meta
- ameta -> meta_admin (renamed)
- modify_index (removed)

WIP: #4
2021-02-24 01:19:47 +01:00
Tomasz Sowa 3d7ece15f8 changed version to 0.7.2 2021-02-18 21:07:05 +01:00
Tomasz Sowa 541597f355 fixed: in TimeZone::SetTzDst() was used operator && instead of || 2021-02-17 18:36:50 +01:00
Tomasz Sowa 5fe843d76b set -std=c++20 in Makefile 2021-02-17 18:07:05 +01:00
Tomasz Sowa 3191369ece added 'using PT::FileLog::init' to FileLog to suppress clang warning:
warning: 'Winix::FileLog::init' hides overloaded virtual function [-Woverloaded-virtual]
2021-02-17 18:06:00 +01:00
Tomasz Sowa a4de11d69c fixed: Image did not use 'savelog' when creating logs
before commit 4832c7db4b the logs were lost, but after 4832c7db4b
the logs were printed when winix shuts down

in 4832c7db4b at the end of BaseThread::StartRoutine()
has been added a call to save_log()
2021-02-17 16:17:36 +01:00
Tomasz Sowa 4832c7db4b fixed: clang address sanitizer reports that there is an use after free bug at the end when winix shuts down:
==3859==ERROR: AddressSanitizer: heap-use-after-free on address 0x61b0000053e0 at pc 0x000800697160 bp 0x7fffffffcfb0 sp 0x7fffffffcfa8
READ of size 8 at 0x61b0000053e0 thread T0
    #0 0x80069715f in PT::MemBuffer<wchar_t, 256ul, 4096ul>::empty() const /usr/home/tomek/roboczy/prog/web.ttmath.org/../pikotools/membuffer/membuffer.h:675:9
    #1 0x80069700d in PT::TextStreamBase<wchar_t, 256ul, 4096ul>::empty() const /usr/home/tomek/roboczy/prog/web.ttmath.org/../pikotools/textstream/textstream.h:161:16
    #2 0x8009af0e3 in PT::FileLog::save_log(PT::TextStreamBase<wchar_t, 256ul, 4096ul>*) /usr/home/tomek/roboczy/prog/pikotools/log/filelog.cpp:105:14
    #3 0x8009b3f8a in PT::Log::save_log() /usr/home/tomek/roboczy/prog/pikotools/log/log.cpp:461:13
    #4 0x8009b3d72 in PT::Log::save_log_and_clear() /usr/home/tomek/roboczy/prog/pikotools/log/log.cpp:448:2
    #5 0x8009b0627 in PT::Log::~Log() /usr/home/tomek/roboczy/prog/pikotools/log/log.cpp:62:2
    #6 0x8007288e7 in Winix::Log::~Log() /usr/home/tomek/roboczy/prog/winix/winixd/core/log.cpp:56:1
    #7 0x8007eac96 in Winix::WinixBase::~WinixBase() /usr/home/tomek/roboczy/prog/winix/winixd/core/winixbase.cpp:51:1
    #8 0x8007eb097 in Winix::WinixModel::~WinixModel() /usr/home/tomek/roboczy/prog/winix/winixd/core/winixmodel.cpp:52:1
    #9 0x80069e552 in Winix::BaseThread::~BaseThread() /usr/home/tomek/roboczy/prog/winix/winixd/core/basethread.cpp:54:1
    #10 0x2f8132 in Winix::Job::~Job() /usr/home/tomek/roboczy/prog/web.ttmath.org/../winix/winixd/core/job.h:54:7
    #11 0x2e0c8a in Winix::System::~System() /usr/home/tomek/roboczy/prog/web.ttmath.org/../winix/winixd/core/system.h:67:7
    #12 0x2df017 in Winix::App::~App() /usr/home/tomek/roboczy/prog/web.ttmath.org/../winix/winixd/core/app.h:70:7
    #13 0x800cc9f50 in __cxa_finalize /hddraidzfs/usr/src/lib/libc/stdlib/atexit.c:238:5
    #14 0x800c5ef10 in exit /hddraidzfs/usr/src/lib/libc/stdlib/exit.c:74:2
    #15 0x25c935 in _start /hddraidzfs/usr/src/lib/csu/amd64/crt1.c:76:2

0x61b0000053e0 is located 1632 bytes inside of 1656-byte region [0x61b000004d80,0x61b0000053f8)
freed by thread T0 here:
    #0 0x2dc07d in operator delete(void*) /hddraidzfs/usr/src/contrib/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:160:3
    #1 0x8007c3b2c in Winix::ThreadManager::StopAll() /usr/home/tomek/roboczy/prog/winix/winixd/core/threadmanager.cpp:189:3
    #2 0x800647474 in Winix::App::WaitForThreads() /usr/home/tomek/roboczy/prog/winix/winixd/core/app.cpp:2122:24
    #3 0x800647311 in Winix::App::Close() /usr/home/tomek/roboczy/prog/winix/winixd/core/app.cpp:340:2
    #4 0x2dec7c in main /usr/home/tomek/roboczy/prog/winix/winixd/main/main.cpp:224:6
    #5 0x25c92e in _start /hddraidzfs/usr/src/lib/csu/amd64/crt1.c:76:7
    #6 0x80033efff  (<unknown module>)

previously allocated by thread T0 here:
    #0 0x2db81d in operator new(unsigned long) /hddraidzfs/usr/src/contrib/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:99:3
    #1 0x8007c17c3 in Winix::ThreadManager::Add(Winix::BaseThread*, wchar_t const*) /usr/home/tomek/roboczy/prog/winix/winixd/core/threadmanager.cpp:77:26
    #2 0x8007b0b81 in Winix::System::Init() /usr/home/tomek/roboczy/prog/winix/winixd/core/system.cpp:170:17
    #3 0x8006468d4 in Winix::App::Init() /usr/home/tomek/roboczy/prog/winix/winixd/core/app.cpp:295:9
    #4 0x2deb7e in main /usr/home/tomek/roboczy/prog/winix/winixd/main/main.cpp:206:11
    #5 0x25c92e in _start /hddraidzfs/usr/src/lib/csu/amd64/crt1.c:76:7
    #6 0x80033efff  (<unknown module>)

in ThreadManager::StopAll() there is item.thread_item_data pointer which was freed (the pointer was pointing to an object with a log_buffer)
but internal Log buffer from item.object was pointing to that object and when thread_tab.clear() was called then the d-ctor was called
and then save_log_and_clear() method was called and tried to use the freed object.
2021-02-17 15:58:05 +01:00
Tomasz Sowa be83d62f96 changed html in index templates: [include "index_head_functions_add.html"] -> [include "index_head_adder.html"] 2021-02-16 20:10:29 +01:00
Tomasz Sowa 3fd2ef1da4 renamed: html/index_head_functions_add.html -> html/index_head_adder.html 2021-02-16 20:01:38 +01:00
Tomasz Sowa d861384889 Merge pull request 'uikit' (#3) from uikit into master
Reviewed-on: #3
2021-02-16 19:52:36 +01:00
Tomasz Sowa cfd8e88e57 changed markup in fun_thread.html, removed item_options.html (was not used by winix)
WIP: #2
2021-02-16 19:44:57 +01:00
Tomasz Sowa 8169cb5a7e added uikit markup for uname winix function
WIP: #2
2021-02-16 19:28:42 +01:00
Tomasz Sowa 8c85cd7346 added uikit markup for stat winix function
WIP: #2
2021-02-16 19:25:36 +01:00
Tomasz Sowa 4e202833b2 added uikit markup for rmuser winix function
WIP: #2
2021-02-16 19:21:53 +01:00
Tomasz Sowa 4a163bd170 added uikit markup for pw winix function
WIP: #2
2021-02-16 19:12:15 +01:00
Tomasz Sowa 85fbc1b882 added uikit markup for man winix function
WIP: #2
2021-02-16 19:03:01 +01:00
Tomasz Sowa 61810ff6f9 added uikit markup for last winix function
WIP: #2
2021-02-16 18:56:18 +01:00
Tomasz Sowa 3a4a29f56d added uikit markup for ipban winix function
WIP: #2
2021-02-16 18:53:12 +01:00
Tomasz Sowa 1fb7ece1b3 fixed: in imgcrop: data-uk-lightbox interfere with menu buttons
WIP: #2
2021-02-16 18:46:39 +01:00
Tomasz Sowa f3879dd3a4 added lightbox effect on images in imgcrop winix function
WIP: #2
2021-02-16 18:40:48 +01:00
Tomasz Sowa 561014886f added uikit markup for imgcrop winix function
WIP: #2
2021-02-16 18:35:55 +01:00
Tomasz Sowa a2b19547a3 fixed: in Functions::CheckSpecialFile() after parsing new mount points
the cur->mount pointer was pointing at the old mount object
(which may no longer exists)
2021-02-16 17:23:36 +01:00
Tomasz Sowa 93477091d1 added uikit markup for gallery winix funcion (gallery plugin)
- the main gallery is now 'uikit'
- lightbox updated to version 2.11.3 (now it is using jQuery, beforehand prototype.js was used)
- aino-gallery is called galleriajs now (and updated to 1.6.1)
- themes from galleriajs were removed and some new themes has been added (azur, twelve, folio, fullscreen)
- removed some old mount types for galleries (galleriathumb, galleria1.2.9, galleriathumb1.2.9)

WIP: #2
2021-02-16 16:31:52 +01:00
Tomasz Sowa 64d3c62945 added uikit markup for export winix function (plugin export)
WIP: #2
2021-02-16 13:11:39 +01:00
Tomasz Sowa 134e27f70a modified login template - removed uk-border-pill class
WIP: #2
2021-02-16 12:56:15 +01:00
Tomasz Sowa 5205aa089b modified index templates
some meta information moved to index_head_functions_add.html

WIP: #2
2021-02-16 12:55:35 +01:00
Tomasz Sowa b5b9655c1e modified buttons in thread winix function
WIP: #2
2021-02-16 12:54:05 +01:00
Tomasz Sowa 173d0894fa modified buttons in showthreads winix function
WIP: #2
2021-02-16 12:52:49 +01:00
Tomasz Sowa de6b050fb5 fixed comment in ls html template 2021-02-16 12:51:06 +01:00
Tomasz Sowa 37da5e81c5 added uikit markup for createticket, showtickets, ticket winix functions (plugin ticket)
WIP: #2
2021-02-15 19:52:03 +01:00
Tomasz Sowa ae8637d455 added uikit markup for: createthread, reply, showthreads and thread winix functions 2021-02-12 18:57:14 +01:00
Tomasz Sowa 22a45697fa added uikit markup for subject winix function 2021-02-09 18:48:48 +01:00
Tomasz Sowa 55462fca9f added uikit markup for uptime winix function 2021-02-09 18:26:30 +01:00
Tomasz Sowa 2799a66c16 added uikit markup for who winix function 2021-02-09 18:11:37 +01:00
Tomasz Sowa 9832b17fc2 updated uikit to 3.6.16 2021-02-09 18:10:01 +01:00
Tomasz Sowa 8146f42492 added uikit markup for seo winix function 2021-02-08 02:01:37 +01:00
Tomasz Sowa 9df146af3b added: to 'sort' winix function: 'renumerate' button if 'index' param is present
WIP: #2
2021-01-29 08:35:17 +01:00
Tomasz Sowa a7629f638f added uikit markup for sort winix function
WIP: #2
2021-01-28 20:16:44 +01:00
Tomasz Sowa e75918f5ed added uikit markup for rm winix function
WIP: #2
2021-01-28 15:36:39 +01:00
Tomasz Sowa 9698c25bc4 added uikit markup for ln winix function
WIP: #2
2021-01-28 12:41:43 +01:00
Tomasz Sowa bbe2bd48d8 added uikit markup for meta winix function
WIP: #2
2021-01-28 11:49:10 +01:00
Tomasz Sowa 0cc565ae80 added uikit markup for env winix function
WIP: #2
2021-01-28 11:11:34 +01:00
Tomasz Sowa aa74d96fed included index_bottom_adder.html in index.html and index_generic.html 2021-01-27 18:50:03 +01:00
Tomasz Sowa ac6ede6aef added uikit markup for template winix function
WIP: #2
2021-01-27 18:44:58 +01:00
Tomasz Sowa 10e291bb39 added: generic html template: index_generic.html
(config option: templates_index_generic)
this is a generic template without additional site-css (only uikit),
at the moment used only in ckeditor file browser

added: to Request class: index_template (std::wstring) - a name of an index html template
2021-01-27 18:31:48 +01:00
Tomasz Sowa 7a25e333db added uikit markup for ls winix function
WIP: #2
2021-01-27 17:55:48 +01:00
Tomasz Sowa a9b9d0badf fixed: mv winix function didn't move a file correctly
- if a file was moved (renamed) into the same directory and a file with the new name
already existed then nothing was done (now a message is shown that such a file already exists)
- if a file was moved to another directory and there was a file wich such a name there
then the moved file had its original name (now a message is shown that such a file already exists)
2021-01-27 17:30:55 +01:00
Tomasz Sowa a69e160f85 added uikit markup for nicedit winix function and nicedit updated to 0.9_r25 version
WIP: #2
2021-01-26 17:24:48 +01:00
Tomasz Sowa 56d53a455d added uikit markup for cp winix function
WIP: #2
2021-01-26 16:52:11 +01:00
Tomasz Sowa 572afd360a added uikit markup for mv winix function
WIP: #2
2021-01-26 16:37:11 +01:00
Tomasz Sowa ec6f946b97 added uikit markup for mkdir winix function
WIP: #2
2021-01-26 16:26:34 +01:00
Tomasz Sowa acfd87e548 added uikit markup for 'default' winix function
WIP: #2
2021-01-26 16:19:20 +01:00
Tomasz Sowa aa228732e3 added uk-table-responsive attribute to mount winix function markup
WIP: #2
2021-01-26 16:11:09 +01:00
Tomasz Sowa 840c222190 added uikit markup for mount winix function
WIP: #2
2021-01-26 16:05:15 +01:00
Tomasz Sowa 4408957770 changed form width for locale template
WIP: #2
2021-01-26 15:57:55 +01:00
Tomasz Sowa 89814cbc2e updated uikit to 3.6.14 version
WIP: #2
2021-01-26 15:51:57 +01:00
Tomasz Sowa fdcefae264 added uikit markup for priv, chmod, chown winix functions
WIP: #2
2021-01-26 15:46:47 +01:00
Tomasz Sowa 0139919d14 added uikit markup for passwd winix function 2021-01-25 19:19:45 +01:00
Tomasz Sowa 9476bcc7b6 Merge branch 'master' into uikit 2021-01-25 18:45:07 +01:00
Tomasz Sowa 4625451c85 fixed: messages about password validity in adduser function were not shown,
slog and locale for functions->fun_passwd were not set
2021-01-25 18:41:28 +01:00
Tomasz Sowa 1e345f5010 changed: locale files 2021-01-25 18:19:30 +01:00
Tomasz Sowa 31befcba44 added uikit markup for slog.html 2021-01-25 18:15:26 +01:00
Tomasz Sowa f6077da614 Merge branch 'master' into uikit 2021-01-25 17:59:14 +01:00
Tomasz Sowa 499db7e3eb fixed: session logger didn't have 'cur' and 'locale' pointers set
but this is a temporary fix, the session logger will be moved to Session class
2021-01-25 17:55:07 +01:00
Tomasz Sowa 50da49a3ed added uikit markup for adduser winix function 2021-01-25 17:17:54 +01:00
Tomasz Sowa 6afd5c637e added: in account winix function: links to locale and timezone 2021-01-25 16:23:13 +01:00
Tomasz Sowa 31a6aac9d3 added uikit markup for locale winix function 2021-01-25 16:15:55 +01:00
Tomasz Sowa 3c3660914f added uikit markup for timezone winix function 2021-01-25 16:10:42 +01:00
Tomasz Sowa cd0ae231dc added uikit markup for account winix function 2021-01-25 15:57:37 +01:00
Tomasz Sowa a8bc741883 added uikit markup for vim editor (wymeditor) 2021-01-25 14:34:35 +01:00
Tomasz Sowa 05b3525863 changed: version to 0.7.1 2021-01-25 13:14:16 +01:00
Tomasz Sowa 337f563bd4 changed html markup for tinymce and added support for 5.6.2 version 2021-01-22 16:56:51 +01:00
Tomasz Sowa c9fe09ebe3 updated locale files 2021-01-22 14:18:50 +01:00
Tomasz Sowa db1c63a350 added html/index_bottom_adder.html template - at the moment empty,
will be used at the bottom of an index template - before </body> tag
2021-01-22 11:50:37 +01:00
Tomasz Sowa 7cc2dcd1fc jquery-file-upload updated to 10.31.0 version 2021-01-22 11:50:28 +01:00
Tomasz Sowa bcde392ce3 updated translations 2021-01-21 19:22:26 +01:00
Tomasz Sowa 8d046f6280 added UIkit markup for ckeditor winix function 2021-01-21 19:17:33 +01:00
Tomasz Sowa 9a6696699f added UIkit markup for emacs winix function 2021-01-21 19:17:06 +01:00
Tomasz Sowa 56f2eec597 CodeMirror editor updated to version 5.59.2 - it is used in emacs winix function 2021-01-21 19:08:48 +01:00
Tomasz Sowa d29b33532d added UIkit markup for login winix function 2021-01-21 17:13:27 +01:00
Tomasz Sowa 46c17cc441 added UIkit https://getuikit.com front-end framework to index_head_functions_add.html and index.html 2021-01-21 17:10:04 +01:00
Tomasz Sowa 619236329c Makefile.dep
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1223 e52654a7-88a9-db11-a3e9-0013d4bc506e
2019-09-26 18:25:21 +00:00
Tomasz Sowa 76160a5ba6 Makefile deps
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1219 e52654a7-88a9-db11-a3e9-0013d4bc506e
2019-09-25 16:25:44 +00:00
Tomasz Sowa e95f32231a fixed: FileLog::get_local_date we need to synchronize when using time_zones pointer
(FileLog::get_local_date is used by Log::PrintDate() and Log of course can be used from different threads)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1218 e52654a7-88a9-db11-a3e9-0013d4bc506e
2019-09-25 16:25:20 +00:00
Tomasz Sowa be81307faa Makefiles deps
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1199 e52654a7-88a9-db11-a3e9-0013d4bc506e
2019-08-20 12:24:22 +00:00
Tomasz Sowa 177e58da4e changed: if there is no body we do not parse application/json to space
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1183 e52654a7-88a9-db11-a3e9-0013d4bc506e
2019-03-25 00:51:51 +00:00
Tomasz Sowa 4c2efc08fd fixed: permissions to symlinks and directories with redirect flag were incorrectly checked
(there was no session set and the request was treated the same as from a not logged user)
fixed: in BaseThread there was used 'log' in the main thread (this logger is only for the other thread)
added: in BaseThread we have a main_log now - logger which puts to the main log buffer from the main thread




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1182 e52654a7-88a9-db11-a3e9-0013d4bc506e
2019-03-19 18:08:09 +00:00
Tomasz Sowa ae03922491 seo plugin: added calling WINIX_FILE_CHANGED
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1180 e52654a7-88a9-db11-a3e9-0013d4bc506e
2019-03-14 13:46:40 +00:00
Tomasz Sowa ab005118ba added: a new plugin: seo
new winix function: "seo", it allowes to edit subject, description and keywords for a page
description and keywords are stored in meta



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1179 e52654a7-88a9-db11-a3e9-0013d4bc506e
2019-03-14 13:33:40 +00:00
Tomasz Sowa eec8635af4 changed: templates/item.cpp to use last_item instead of item
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1178 e52654a7-88a9-db11-a3e9-0013d4bc506e
2019-03-14 13:31:35 +00:00
Tomasz Sowa 5060997d2a Makefile.dep
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1176 e52654a7-88a9-db11-a3e9-0013d4bc506e
2019-03-07 18:02:52 +00:00