Commit Graph

479 Commits

Author SHA1 Message Date
Tomasz Sowa 2033168db2 Merge branch 'cli' into ajax 2022-02-08 14:01:50 +01:00
Tomasz Sowa e377f144fd fix: do not send headers again after binary content 2022-02-04 18:46:46 +01:00
Tomasz Sowa 234ebf8ce8 change HtmlTextStream iterators type to pt::WTextStream::iterator 2022-02-03 20:57:38 +01:00
Tomasz Sowa 09cf3c9fa9 add some comments in AcceptBaseParser 2022-02-02 18:34:56 +01:00
Tomasz Sowa df32899581 move AcceptEncodingParser to utils 2022-02-02 18:34:22 +01:00
Tomasz Sowa 33e8df11c5 parse Accept-Language header to Request::accept_languages table 2022-02-02 18:20:32 +01:00
Tomasz Sowa 75daf37bbd improve AcceptBaseParser parsing algorithm
remove AcceptParser - not needed now, AcceptBaseParser can prepare a table now
2022-02-02 17:58:27 +01:00
Tomasz Sowa d0d2cfb22c move AcceptBaseParser to utils directory 2022-02-02 17:11:46 +01:00
Tomasz Sowa f7b5ac0dc8 change the way how winix answer is created
Now we can return ezc content and models serialized in the same json structure,
Xml and Csv are not implemented yet.
Ezc frames are returned in 'ezc_frames' field.
Main ezc stream is returned in 'main_stream' field.
Frame url parameter can take more than one frame (names separated by commas).
Honor Accept http header (AcceptParser).

Samples:
--------
http://domain.tld/dir/controller
returns html answer from the main ezc stream

http://domain.tld/dir/controller/container:raw
returns html answer from the main ezc stream (the same as above)

http://domain.tld/dir/controller/frame:abc
returns "abc" frame as html

http://domain.tld/dir/controller/container:json
returns all serialized models to json and no ezc streams

http://domain.tld/dir/controller/container:xml
returns all serialized models to xml and no ezc streams (not implemented yet)

http://domain.tld/dir/controller/container:json/frame:abc,xyz
returns all serialized models to json and two frames in 'ezc_frames' object

http://domain.tld/dir/controller/container:json/all_frames
returns all serialized models to json and all frames in 'ezc_frames' object

http://domain.tld/dir/controller/container:json/main_stream
returns all serialized models and the main ezc stream in 'main_stream' field

http://domain.tld/dir/controller/container:json/main_stream/all_frames
returns all serialized models to json, all frames and the main stream
2022-02-01 18:44:23 +01:00
Tomasz Sowa 227dd923d6 fix: correctly escape ezc stream to json/xml/csv 2022-01-28 15:54:11 +01:00
Tomasz Sowa f6cb9a8aed set correct timetable dst for 'Sarajevo, Skopje, Warsaw, Zagreb'
year: 2022 and 2023
2022-01-26 22:34:13 +01:00
Tomasz Sowa 944560dd2b update uikit to 3.10.1 2022-01-19 15:47:11 +01:00
Tomasz Sowa 557555c4b3 htmx updated to 1.6.1 2021-12-08 15:19:35 +01:00
Tomasz Sowa f8e1037476 uikit updated to 3.9.4 2021-11-26 21:51:01 +01:00
Tomasz Sowa 35cb54324f added a new item content type: markdown
- emacs editor has an option to select markdown, now it has two planes: one for content editing and the other to show preview
- CodeMirror editor updated to 5.64.0
- to convert markdown to html we use showdown https://github.com/showdownjs/showdown (conversion is done on the client side)
2021-11-26 21:49:21 +01:00
Tomasz Sowa 119497bb01 added winix_frame_is ezc winix function 2021-10-24 22:27:52 +02:00
Tomasz Sowa dfd6475a81 uikit updated to 3.7.6 2021-10-24 22:27:35 +02:00
Tomasz Sowa d6d5236a03 added fil_json_escape filter 2021-10-21 13:42:41 +02:00
Tomasz Sowa a327a26bd5 added winix_uikit_version parameter to index_head_adder.html 2021-10-13 23:48:30 +02:00
Tomasz Sowa d5ebb7ca12 changed the way how the request's answer is created,
now winix can return json, xml, csv from out_main_stream or from frames and json from models

removed from Request:
  bool send_bin_stream
  bool return_json
  bool return_info_only
  pt::Space info
  bool page_generated
  bool out_main_stream_use_html_filter
  bool out_streams_use_html_filter

added to Request:
  enum AnswerSource
  enum AnswerContainer
  AnswerSource answer_source
  AnswerContainer answer_container
  bool use_ezc_engine
  std::wstring frame
  bool send_all_frames
  bool use_html_filter

added to Config:
 // the name of the url parameter for returning all frames, e.g. https://domain.tld/mydir/myfunction/allframes
 // default: allframes
 std::wstring request_all_frames_parameter;

 // the name of the root element when serializing request answer to xml
 // default: winix
 std::wstring xml_root;

algorithm (the whole algorithm is described in core/request.h):
at the beginning of a request winix sets
   answer_source to models
   answer_container to text
   use_ezc_engine to true

next answer_container and use_ezc_engine can be changed in the following way:

1. winix will look for 'Accept' http header and depending on the header winix will set:
   (not implemented yet)

             Accept | answer_container | use_ezc_engine
	     ------------------------------------|-----------------
	     application/json | json             | false
	      application/xml | xml              | false
	              text/csv | csv              | false

2. next answer_container is set depending on 'container' url parameter
       container | answer_container
 ---------------------------------------------------------
     not present | don't change the value
            text | text
            json | json
             xml | xml
             csv | csv

use_ezc_engine is set depending on 'answer' url parameter:
          answer | use_ezc_engine
 ---------------------------------
     not present | don't change the value
            html | true
            data | false

if 'answer' is html then we take into account two more parameters:
 frame: frame_name (empty default) - if set then winix returns this specific frame
 allframes: (if present then winix returns all frames)
2021-10-13 01:27:14 +02:00
Tomasz Sowa 3e46c5674c htmx updated to 1.6.0 2021-10-08 17:44:34 +02:00
Tomasz Sowa c4b5565995 don't check for request->is_htmx_request for sending frames, check only "frame" url paremeter
added config parameter: request_frame_parameter, default: "frame"
2021-10-08 03:08:11 +02:00
Tomasz Sowa 3f5eabeaa1 uikit updated to 3.7.5 2021-10-07 05:02:24 +02:00
Tomasz Sowa 9b8e48e7b2 added static libraries: clocklet (timepicker), flatpickr and litepicker (data pickers) 2021-10-07 04:42:46 +02:00
Tomasz Sowa c3122fb82f added [lang] ezc function for returning a localized string 2021-10-07 04:41:06 +02:00
Tomasz Sowa 1741597d52 uikit updated to 3.7.4 2021-09-27 02:53:16 +02:00
Tomasz Sowa 9c5c74ba84 added: setting a correct mime type for static files - using magic library
added: std::wstring file_mime_type to ItemContent - a mime type for static file
added: Header (core/header.h) - there will be header names defined, at the moment only content_type
added: FuncionsBase::Finish() - it is called at the end when the winix finishes
2021-09-22 00:23:25 +02:00
Tomasz Sowa 26ed7b80be changed values for send_file_mode config parameter:
0 - winix will read the content of the file and send it back to the webserver
  1 - winix will use send_file_header header with a full path to the file
  2 - winix will use send_file_header header with a relative path to the file
2021-09-17 03:35:56 +02:00
Tomasz Sowa 55ac9a61ed added possibility to send static files to nginx via X-Accel-Redirect header
added to config:
int send_file_mode;
    // 0 - full path to a file in send_file_header header
    // 1 - relative path to a file in send_file_header (need http_send_file_relative_prefix set) (used for nginx)
std::wstring send_file_header;
    // default: X-SENDFILE
    // for Apache set: X-SENDFILE
    // for Lighttpd set: X-LIGHTTPD-send-file
    // for Nginx set: X-Accel-Redirect
std::wstring send_file_relative_prefix;
    // relative prefix used for sending static files if send_file_mode is 1
    // default: "upload-files-internal"
2021-09-15 20:28:34 +02:00
Tomasz Sowa 7673264fe1 make depend 2021-08-12 21:57:03 +02:00
Tomasz Sowa 42dc43b036 added WINIX_MAKE_DATABASE_MIGRATION plugin message for making migrations from plugins 2021-08-11 22:18:14 +02:00
Tomasz Sowa ef22d951a0 fixed: base class of System should be derived as public 2021-08-10 22:06:53 +02:00
Tomasz Sowa e95dc834a3 uikit updated to 3.7.2 2021-08-07 21:23:47 +02:00
Tomasz Sowa b424988d1b updated to the new pikotools api (api2021): HTMLFilter renamed to HTMLParser
added to config: int html_filter_white_char_mode;
  how white characters between html tags are treated
  0 - WHITE_MODE_ORIGIN - they are copied from input to output
  1 - WHITE_MODE_SINGLE_LINE - new line characters are removed
  2 - WHITE_MODE_TREE - try to create a tree (some kind of pretty printing)
  default: 2
2021-08-07 02:16:48 +02:00
Tomasz Sowa 22134b6cc0 commented some method calls to html_filter 2021-07-26 03:54:02 +02:00
Tomasz Sowa f861c0761e make depend 2021-07-17 13:57:39 +02:00
Tomasz Sowa 1899d5ee17 BBCODEParser has been moved to pikotools library 2021-07-17 13:56:37 +02:00
Tomasz Sowa 17bd48ece3 HTMLFilter has been moved to pikotools library 2021-07-17 13:42:04 +02:00
Tomasz Sowa c5c02d7f44 HtmlTextStream has now pt::Stream as a based class and uses pt::WTextStream as a buffer 2021-07-16 18:17:57 +02:00
Tomasz Sowa ba6159964b htmx updated to 1.5.0 2021-07-16 13:16:02 +02:00
Tomasz Sowa b834971f5e uikit updated to 3.7.1 2021-07-16 12:28:38 +02:00
Tomasz Sowa 9dc15d536c Makefile: removed macros: EZC_GENERATOR_HAS_PT_STREAM and EZC_GENERATOR_HAS_WINIX_STREAM 2021-07-13 01:49:58 +02:00
Tomasz Sowa 2e45cb6ac9 updated to the new ezc api (Generator has three additional parameters now) 2021-07-13 01:46:07 +02:00
Tomasz Sowa 2dcfeaa688 fixed: in Item do_migration_to_3(...) admin meta was called admin_meta (not meta_admin) 2021-07-07 01:04:48 +02:00
Tomasz Sowa 9d65d931d0 moved some ezc functions from templates/item.cpp to Item and ItemContent
removed: templates/item.cpp
updated: some html templates which use [item] or [item_tab]
removed some old html templates: item_info.html and itam_tab_info.html
2021-07-06 21:52:29 +02:00
Tomasz Sowa 746aa41111 renamed: ItemContent::meta_admin -> ItemContent::admin_meta 2021-07-03 01:18:28 +02:00
Tomasz Sowa 175dd17416 added request.last_item ezc function 2021-07-03 01:14:53 +02:00
Tomasz Sowa 619936c12e make depend 2021-07-01 23:35:08 +02:00
Tomasz Sowa 732144df01 updated to the new morm api - models methods which take 'morm::ModelWrapper ** model_wrapper' now take 'morm::Wrapper & wrapper' 2021-07-01 23:34:49 +02:00
Tomasz Sowa df3f04a951 added to misc: timespec_to_stream_with_unit() for printing times either is seconds or miliseconds 2021-06-30 16:30:11 +02:00
Tomasz Sowa 0f78968579 updated ticket plugin to the new ezc api (child spaces were removed) 2021-06-29 23:42:57 +02:00
Tomasz Sowa 66173c7a31 removed old meta ezc functions from gallery plugin 2021-06-28 21:34:41 +02:00
Tomasz Sowa 3f934d9aec removed old meta ezc functions from menu plugin 2021-06-28 21:34:22 +02:00
Tomasz Sowa df0cc131fe fixed in thread winix function: answers were not sorted correctly 2021-06-28 21:33:33 +02:00
Tomasz Sowa ba60f9da8a updated group plugin to the new pikotools api (child spaces were removed) 2021-06-28 20:58:39 +02:00
Tomasz Sowa 4569198b9d fixed in index_head_adder.html: winix_function_is "emacs" should be in parentheses 2021-06-27 23:43:01 +02:00
Tomasz Sowa ccbbb59af7 make depend 2021-06-27 23:34:06 +02:00
Tomasz Sowa 3a5af25eaf updated some html templates 2021-06-27 23:33:10 +02:00
Tomasz Sowa 1d18b7fa12 - updated to the new pikotools api (child spaces were removed)
some plugins need to be fixed yet: ticket, gallery, group, menu
- added current user to default models as "user"
- renamed in User: super_user -> is_super_user, env -> admin_env, pass_hash_salted -> is_pass_hash_salted
- now Users class has a WinixModel as a base class
  some plugin calls have to be fixed yet
- added UserWrapper model with a pointer to User class
- removed from ItemContent: methods for accessing 'meta' and 'admin_meta', now ezc can iterate through Space classes
- fixed in env winix function: if there is "changeuser" parameter then we should only switch the user (not save anything)
2021-06-27 23:31:50 +02:00
Tomasz Sowa 472490c239 make depend 2021-06-24 21:17:11 +02:00
Tomasz Sowa b6340a30d2 updated to the new pikotools api (changes in Log) 2021-06-24 21:17:03 +02:00
Tomasz Sowa bf1f0954b9 fixed: changed "%g" to "%f" when printing request/ezc times
SetNonZeroDigitsAfterComma() incorrectly terminated the string if the format was "%g" (in the case where it was used as %e)
2021-06-24 16:11:02 +02:00
Tomasz Sowa 2f1cdcf379 added printing info how much time winix spent in the ezc engine
added to Request:
timespec timespec_req_stop;
timespec timespec_req_diff;
timespec timespec_ezc_engine_start;
timespec timespec_ezc_engine_stop;
2021-06-24 15:33:44 +02:00
Tomasz Sowa 443c2023d9 make depend 2021-06-23 17:04:21 +02:00
Tomasz Sowa 2c5062ba22 UrlEncode() methods from core/misc.h are now thread safe 2021-06-23 17:04:07 +02:00
Tomasz Sowa 99df807095 Makefile: added new macros to CFLAGS 2021-06-21 20:22:15 +02:00
Tomasz Sowa 8ab07d11b1 fixed: cur.request->function->fun didn't have a model connector set when a request started 2021-06-21 16:51:35 +02:00
Tomasz Sowa a1c0f6f7f0 added config option: add_header_cache_no_store_in_htmx_request
send "Cache-Control: no-store, max-age=0" http header if a request is made by htmx library (ajax)
if a webbrowser get a page from the cache then it will render just the last request without the whole html page (css, js, etc)
https://github.com/bigskysoftware/htmx/issues/497
2021-06-21 11:43:59 +02:00
Tomasz Sowa 672737a0d8 added a comment in ItemContent 2021-06-20 22:27:06 +02:00
Tomasz Sowa ade96bf6d3 some methods from templates/item.cpp moved to ItemContent 2021-06-20 21:22:08 +02:00
Tomasz Sowa 801fc062ef added FunctionBase::Clear() which is called at the end of a request 2021-06-20 20:47:59 +02:00
Tomasz Sowa f35840e7de some work in html templates: changed some functions from item_* to item.* 2021-06-20 18:12:43 +02:00
Tomasz Sowa 79eda7abb0 - added to FunctionBase: bool register_default_models (default true)
if true then winix will add default models for ezc templates such as "request", "item", etc.
- some methods from templates/item.cpp moved to Item
2021-06-20 18:04:50 +02:00
Tomasz Sowa e7c7324058 ItemContent::user_name(EzcEnv & env) changed to ItemContent::user(morm::ModelWrapper ** model_wrapper) and we return a User class
ItemContent::group_name(EzcEnv & env) changed to ItemContent::group(morm::ModelWrapper ** model_wrapper) and we return a Group class
added ItemContent::display_user_name(EzcEnv & env)
some functions in templates/item.cpp moved to Item
2021-06-19 23:48:12 +02:00
Tomasz Sowa d8c1a81bcb removed config options: ezc_error_prefix and ezc_error_postfix
Ezc::PatternParser and Ezc::Generator use only pt::Log as a logger now
2021-06-19 20:33:35 +02:00
Tomasz Sowa 94f96c11cb make depend 2021-06-18 19:18:46 +02:00
Tomasz Sowa ec94dff7d7 some ezc functions from templates/item.cpp moved to Item and ItemContent
methods HasAccess() HasReadAccess() and similar moved from System to Item and ItemContent
2021-06-18 19:18:13 +02:00
Tomasz Sowa ebd791a256 changed: now Request class is a model class - we have fields() method there to map fields for ezc templates (currently only dir_tab)
removed: [dir_tab] ezc statement
changed: Ls winix function loads its own dir_tab container (beforehand it was loaded by [dir_tab] ezc statement)
         it's available by [child_dirs] name
2021-06-17 21:44:29 +02:00
Tomasz Sowa 4db421d6c3 make depend 2021-06-16 23:43:57 +02:00
Tomasz Sowa ab89ffe096 fixed in Item: void Item::link(Ezc::FunInfo<HtmlTextStream> & env) now returns a correct directory for the item (before the current directory was returned)
added to Item: void Item::dir_link(Ezc::FunInfo<HtmlTextStream> & env)
added to WinixModel:
  Dirs * get_dirs();
  Mounts * get_mounts();
  Users * get_users();
  Groups * get_groups();
  SLog * get_session_logger(); // not finished yet
2021-06-16 23:42:23 +02:00
Tomasz Sowa f2f2c851df make depend 2021-06-16 18:09:01 +02:00
Tomasz Sowa 6dddc5e948 renamed: WinixModel -> WinixModelDeprecated (this class will be removed)
added: WinixModel (models/winixmodel.h|cpp) - a class inheriting from morm::WinixModel, we have methods such as: get_config(), get_logger(), get_request()
       and this class will be a base class for our models
added: WinixModelConnector (models/winixmodelconnector.h|cpp) - a class inheriting from morm::WinixModelConnector
       this connector we are using instead of morm::ModelConnector - there are pointers to winix objects there (config, request, log)
added to Request: Ezc::Models models
removed from TemplatesFunctions: Ezc::Models ezc_models;
changed: ImgCrop winix functions is using its own item_tab vector now (not finished yet)
added: Item::is(), Item::link(), ItemContent::print_content()
2021-06-16 18:07:44 +02:00
Tomasz Sowa 9688b1a26a htmx updated to 1.4.1 2021-06-09 01:56:47 +02:00
Tomasz Sowa 81df52f6ca make depend 2021-05-31 18:59:49 +02:00
Tomasz Sowa 6e4f8f5191 start adding support for Models objects from Ezc 2021-05-31 18:59:20 +02:00
Tomasz Sowa 22de3322ae - added to Request: is_htmx_request (bool) - true if the request is made by htmx library (ajax)
- commented out using mount_page_arg_is "subject" and "info" from fun_cat.html and fun_run.html - they will be removed soon
- some improvements in fun_reply.html, fun_showthreads.html and fun_thread.html (scrolling)
2021-05-31 10:58:34 +02:00
Tomasz Sowa e6fae4598c updated to the new pikotools api: [ezc out] and [out] changed to [ezc frame] or just [frame]
- when returning json streams changed "out" field to "frames"
- renamed config parameter: allow_ezc_out_in_executable_items -> allow_ezc_frames_in_executable_items
- added basic support for ajax requests in thread plugin
2021-05-28 18:36:19 +02:00
Tomasz Sowa ba331dea4a added basic support for htmx (ajax)
- if there is HX-Request header present we sent only a part of the whole html
- we return only specific stream defined by [out ...] ezc statement
- the name of the stream is passed in the 'frame' parameter
  (if not present then 'content' is assumed)
- added ezc function: winix_is_htmx_request
2021-05-27 19:36:04 +02:00
Tomasz Sowa 1292a56d1b added htmx 1.4.0 loaded by default in html/index_head_adder.html 2021-05-27 13:41:29 +02:00
Tomasz Sowa 6a452ffed0 version changed to 0.7.3 2021-05-27 12:21:59 +02:00
Tomek fc24570062 fixed compilation: pikotools is in src subdirectory now 2021-05-27 12:04:41 +02:00
Tomasz Sowa aa71abd725 some workarounds in Thread plugin (don't show stale info in html forms) 2021-05-27 10:29:26 +02:00
Tomasz Sowa fb64f5e456 fixed: reply winix function (from thread plugin) didn't add a reply - system->Add() didn't set the model_connector to the item 2021-05-26 19:55:50 +02:00
Tomasz Sowa 61fe6ea219 updated to the new api from ezc: changed semantic of [def] and Vars moved outside of Generator 2021-05-23 10:14:08 +02:00
Tomasz Sowa d30c7254eb updated uikit to 3.6.22 2021-05-22 13:03:15 +02:00
Tomasz Sowa 06be33ba5f make depend 2021-05-21 23:06:57 +02:00
Tomasz Sowa b2cffa39e1 added models Thread and ThreadFiles in thread plugin 2021-05-21 23:06:48 +02:00
Tomasz Sowa 86ef2529b1 fixed in some places: system->AddFile() returns bool now instead of Error 2021-05-21 17:41:16 +02:00
Tomasz Sowa f1b9d1b870 updated to the new pikotools api: changed the way how child_spaces are created in Space class 2021-05-21 17:17:17 +02:00
Tomasz Sowa fe67b5d72a updated to the new pikotools api: snake_case names of methods from SpaceParser 2021-05-21 04:51:58 +02:00
Tomasz Sowa 27720afaf2 updated to the new pikotools api: SpaceParser::SetSpace(...) methods have been removed 2021-05-21 01:37:42 +02:00
Tomasz Sowa 8bb585d97d updated to the new pikotools api: changed utf8 functions PascalCase to snake_case 2021-05-21 00:41:27 +02:00
Tomasz Sowa 8c523ce8b9 make depend 2021-05-21 00:32:58 +02:00
Tomasz Sowa e48a28a5c8 namespace PT renamed to pt 2021-05-20 20:59:12 +02:00
Tomasz Sowa d66a36cf21 make depend 2021-05-14 03:32:03 +02:00
Tomasz Sowa a94e09f0aa added support for Model migrations
now we have a table core.migration and each model (User, Group, Item, ItemContent and a new Migration) have its own
row in the table with a version number

added to config:
db_make_migration_if_needed and db_stop_if_migration_fails (need description yet)
2021-05-14 03:31:29 +02:00
Tomasz Sowa 4df10de6b7 methods eq() from finder can have now a table name 2021-05-13 19:33:19 +02:00
Tomasz Sowa 6d07535dad updated uikit to 3.6.21 version 2021-05-13 06:24:44 +02:00
Tomasz Sowa ee354d2ded renamed in Models: map_fields() to fields(), prepare_table() to table() 2021-05-13 03:29:41 +02:00
Tomasz Sowa e64bd1fba8 added more html tags to extraAllowedContent (ckeditor) 2021-05-13 03:24:37 +02:00
Tomasz Sowa 031e673c51 fixed: passwd winix function: pass_encrypted was not cleared if we are not using rsa for encrypting passwords anymore 2021-05-13 02:02:15 +02:00
Tomasz Sowa 801c9a2cda make depend 2021-05-11 22:22:10 +02:00
Tomasz Sowa 685b3ca5ee Makefile: source files from pikotools are now in pikotools/src 2021-05-11 22:22:03 +02:00
Tomasz Sowa f1af7e2eeb updated to the current pikotools api from branch api2021 2021-05-11 22:20:46 +02:00
Tomasz Sowa 85f9fda984 fixed: in passwd winix function: clear password hash when using rsa encoding 2021-05-11 22:15:52 +02:00
Tomasz Sowa bb513b0187 make depend 2021-04-30 01:35:40 +02:00
Tomasz Sowa 4277f90bad start working on User and Group classes
- User and Group has been moved to 'models' directory
- removed UserPass struct (passwords fields were put to User struct)
not working yet, we need support for binary blobs in morm
2021-04-30 01:34:48 +02:00
Tomasz Sowa ccda2bc2fd added option do_migration_to_winix_fullmorm do the config (only temporarily)
if true then we make Item::do_migration() and exit
2021-04-14 14:13:47 +02:00
Tomasz Sowa 4b71530f4c added to Config:
bool Config::HasValue(const wchar_t * name, const wchar_t * value)
2021-04-12 18:55:04 +02:00
Tomasz Sowa a8a9db53be remove some Lock() and Unlock() from Plugin 2021-04-11 12:09:42 +02:00
Tomasz Sowa 634cf07d44 using Winix::Lock object instead of Lock() method in ThreadManager 2021-04-10 21:12:28 +02:00
Tomasz Sowa 0e0c006d5a fixed: thread locking problem in Image: method Lock() was used instead of Winix::Lock object 2021-04-10 19:46:50 +02:00
Tomasz Sowa 486067a4b2 clang thread sanitizer reported a data race in App::Start()
synchro.was_stop_signal was read without locking

==================
WARNING: ThreadSanitizer: data race (pid=13831)
  Write of size 1 at 0x000000dc4d18 by thread T1 (mutexes: write M44):
    #0 Winix::App::SpecialThreadForSignals(void*) /disk2Tc/home/tomek/roboczy/prog/winix/winixd/core/app.cpp:2226:31 (winix.so+0x1f7465)

  Previous read of size 1 at 0x000000dc4d18 by main thread:
    #0 Winix::App::Start() /disk2Tc/home/tomek/roboczy/prog/winix/winixd/core/app.cpp:651:18 (winix.so+0x1ee9af)
    #1 main /disk2Tc/home/tomek/roboczy/prog/winix/winixd/main/main.cpp:222:6 (winix+0x2d74c1)

  Location is global 'Winix::app' of size 65840 at 0x000000db5908 (winix+0x000000dc4d18)

  Mutex M44 (0x000000dc4d10) created at:
    #0 pthread_mutex_lock /disk2Tb/usr/src/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:4153:3 (winix+0x2ac204)
    #1 Winix::Synchro::Lock() /disk2Tc/home/tomek/roboczy/prog/winix/winixd/core/synchro.cpp:68:12 (winix.so+0x2e5822)
    #2 Winix::Lock::Lock(Winix::Synchro*) /disk2Tc/home/tomek/roboczy/prog/winix/winixd/core/lock.cpp:53:11 (winix.so+0x295522)
    #3 Winix::FileLog::get_local_date(PT::Date const&) /disk2Tc/home/tomek/roboczy/prog/winix/winixd/core/filelog.cpp:98:8 (winix.so+0x261183)
    #4 Winix::Log::PrintDate(PT::Date const&) /disk2Tc/home/tomek/roboczy/prog/winix/winixd/core/log.cpp:80:30 (winix.so+0x295a21)
    #5 Winix::LogInfo(Winix::Log&, Winix::LogManipulators, char const*, bool, char const*) /disk2Tc/home/tomek/roboczy/prog/winix/winixd/main/main.cpp:104:6 (winix+0x2d69ec)
    #6 main /disk2Tc/home/tomek/roboczy/prog/winix/winixd/main/main.cpp:190:2 (winix+0x2d7363)

  Thread T1 (tid=100187, running) created by main thread at:
    #0 pthread_create /disk2Tb/usr/src/contrib/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:962:3 (winix+0x295bb3)
    #1 Winix::App::StartThreads() /disk2Tc/home/tomek/roboczy/prog/winix/winixd/core/app.cpp:2246:2 (winix.so+0x1f7549)
    #2 main /disk2Tc/home/tomek/roboczy/prog/winix/winixd/main/main.cpp:212:6 (winix+0x2d743e)

SUMMARY: ThreadSanitizer: data race /disk2Tc/home/tomek/roboczy/prog/winix/winixd/core/app.cpp:2226:31 in Winix::App::SpecialThreadForSignals(void*)
==================
2021-04-10 17:14:51 +02:00
Tomasz Sowa 35e10ed469 updated to the new Pikotools api (new Space struct) 2021-04-09 17:50:58 +02:00
Tomasz Sowa 00b980e74b make depend 2021-04-09 16:02:54 +02:00
Tomasz Sowa efdc0e7c97 etc/time_zones.conf changed values: "true" -> true, "false" -> false 2021-04-09 10:25:10 +02:00
Tomasz Sowa 8b64d2066f changed: new space characters in etc/time_zones.conf:
( -> {
 ) -> }
2021-03-31 20:26:30 +02:00
Tomasz Sowa 8d87d9a875 changed in Makefile: we have now one lib pikotools/pikotools.a
make depend
2021-03-31 20:25:09 +02:00
Tomasz Sowa 8fc1848ecc uikit updated to 3.6.18 2021-03-31 20:21:24 +02:00
Tomasz Sowa bbc0a67153 added support for new morm api
- field(...) methods from Model take now FT structure instead of insertable/updatable/primary_key boolean flags
- table name is set in a prepare_table() method now
- added meta and admin_meta from ItemContent (morm has a field() method with PT::Space argument now)
2021-03-11 18:48:18 +01:00
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
Tomasz Sowa 0ac5a21a14 Makefile.dep
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1172 e52654a7-88a9-db11-a3e9-0013d4bc506e
2019-03-06 18:19:29 +00:00
Tomasz Sowa 8895f0dcac - json_generic_serializer was not set when there was a redirect
- if there is a redirect and the json return answer is requested
  then we send 'redirect_to' field in 'info' space




git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1169 e52654a7-88a9-db11-a3e9-0013d4bc506e
2019-02-19 10:36:20 +00:00
Tomasz Sowa 4f8db81c85 added to Locale:
const std::wstring & GetReplace(const wchar_t * key, Types ... types)
key is a string pattern which has %0, %1 parameters which will be replaced with 'types'




git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1164 e52654a7-88a9-db11-a3e9-0013d4bc506e
2019-01-07 03:32:17 +00:00
Tomasz Sowa aa388e248d fixed: crash in thread plugin
ThreadInfo was not correctly initialized (plugin pointer was null)
added to PluginInfo: set_dependency_for(WinixModel * winix_model)




git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1162 e52654a7-88a9-db11-a3e9-0013d4bc506e
2019-01-02 11:33:19 +00:00
Tomasz Sowa e5d7403c54 Makefile.dep
git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1161 e52654a7-88a9-db11-a3e9-0013d4bc506e
2019-01-02 09:12:42 +00:00
Tomasz Sowa 4f57d6134c fixed: in Templates: TemplatesFunctions::plugin was not set
git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1160 e52654a7-88a9-db11-a3e9-0013d4bc506e
2019-01-02 04:36:24 +00:00
Tomasz Sowa 03f6b54a5b Makefile dep
git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1158 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-11-24 17:09:48 +00:00
Tomasz Sowa 63ef007ca1 changed: class Cur -> struct Cur in plugin.h
git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1154 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-11-23 18:34:01 +00:00
Tomasz Sowa 603e0679e7 Makefiles: added path to morm/src to -I flags
git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1152 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-11-23 18:28:15 +00:00
Tomasz Sowa b90445de4a updated to the new pikotools api - we have a logger for morm and ezc
pikotools has now Log and FileLog classes
which are base classes for winix Log and FileLog classes




git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1151 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-11-23 17:53:43 +00:00
Tomasz Sowa 491dd27ebf some work in the new api:
- log_level and save_each_line moved from Log to FileLog
- other fixes in loggers
- DirContainer from Dirs and LoadAvg had no dependencies set




git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1148 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-11-21 22:53:24 +00:00
Tomasz Sowa 89d303f375 some work on dependency injection
git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1147 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-11-21 17:51:15 +00:00
Tomasz Sowa a2ffc1e81c start working on 0.7.x branch
- added FileLog which stores content to the file log
- now Log is only a wrapper - it puts messages to the local buffer and when logsave is used then the buffer is put to FileLog
- new base classes:
  WinixBase (Log, Config*, Synchro*)
  WinixModel : public WinixBase (morm::ModelConnector*, Plugin*)
  WinixSystem : public WinixModel (System*)
  WinixRequest : public WinixSystem (SLog, Cur*)
- singletons: log, slog, plugin are depracated - now references to them are in base classses (WinixBase, WinixModel)
- DbBase,  DbConn and Db are depracated - now we are using Morm project (in WinixModel there is a model_connector pointer)
  each thread will have its own ModelConnector





git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1146 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-11-21 11:03:53 +00:00
Tomasz Sowa ebd7f85fdb updated: html files for jquery-file-upload
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1143 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-11-15 17:01:40 +00:00
Tomasz Sowa 833c04776f changed Makefile.dep
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1141 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-11-14 17:15:03 +00:00
Tomasz Sowa 919c2f62f5 using PT::IsSubString* methods from pikotools
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1138 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-11-01 00:46:44 +00:00
Tomasz Sowa 8f6004d444 removed some IsSubstring* functions
(they are in Pikotools in text/convert.h now)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1135 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-10-29 23:51:11 +00:00
Tomasz Sowa 1b8f5dc673 added to HTMLFilter:
- possibility to remove html entities
  method: SkipEntity(bool)




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1132 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-10-24 16:31:42 +00:00
Tomasz Sowa 027a8ec428 added to HTMLFilter:
- now we can parse " and ' in html attributes
- we can skip html tags and commentaries, added method:
  void SkipAllTags(bool skip_all_tags, bool skip_commentaries);
- there is virtual method: virtual void ItemFound();
  which is called when a html tag is parsed




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1129 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-10-23 23:28:45 +00:00
Tomasz Sowa d1e7765e98 backend winix
dodanie opisu strefy czasowej dla Warszawy na 2018 rok




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1128 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-10-23 21:00:36 +00:00