Commit Graph

905 Commits

Author SHA1 Message Date
Tomasz Sowa 81160dbbe9 fixed: a passwd winix function should allow a non loged person to reset his password (permission fix)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@927 e52654a7-88a9-db11-a3e9-0013d4bc506e
2013-05-16 20:08:07 +00:00
Tomasz Sowa 7c266b85e2 added: winix function 'account'
code for activating an account has been moved here from Pw
changed: the form for reseting a user's password has been moved
         to 'passwd' winix function (it was in Pw before)




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@926 e52654a7-88a9-db11-a3e9-0013d4bc506e
2013-05-16 19:26:44 +00:00
Tomasz Sowa 48cdca7549 changed: in fun_gallery.html: added js code to get the proper image id from url
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@925 e52654a7-88a9-db11-a3e9-0013d4bc506e
2013-05-14 08:37:22 +00:00
Tomasz Sowa 1c401eae3b added: to Rm function:
bool Rm::RemoveFileOrSymlink(long item_id, bool check_access)
added: in ticket plugin: possibility to remove a file/image
       (not finished yet)




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@924 e52654a7-88a9-db11-a3e9-0013d4bc506e
2013-05-06 07:23:44 +00:00
Tomasz Sowa 0e9eb30b5d added: some ezc function to ticket plugin:
ticket_param_value_for_param_id
       tickets_tab_param_value_for_param_id
       tickets_tab_conf_tab_param_name
       tickets_tab_conf_tab_file_tab
       tickets_tab_conf_tab_file_tab_index
       tickets_tab_conf_tab_file_tab_path
       tickets_tab_conf_tab_file_tab_itemid
       tickets_tab_conf_tab_file_tab_meta




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@923 e52654a7-88a9-db11-a3e9-0013d4bc506e
2013-04-24 01:21:19 +00:00
Tomasz Sowa c10c9393c0 changed: plugin 'export': export winix function
the checkbox is now selected when we want to export static files too 
         (default it is not checked)
         



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@922 e52654a7-88a9-db11-a3e9-0013d4bc506e
2013-04-17 00:37:39 +00:00
Tomasz Sowa 8705b3437c fixed: imgcrop winix function should load only images
(when called in a directory)
added: to reload winix function:
       reloading (clearing) the cache from 'menu' plugin
added: to 'menu' plugin
       possibility to read 'meta' information from files 
       third argument 'withmeta' to menu_dir_tab ezc function
       e.g. [for menu_dir_tab "/directory" "..." "withmeta"]...[end]
       and some ezc functions to retrieve the meta values




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@921 e52654a7-88a9-db11-a3e9-0013d4bc506e
2013-04-16 09:51:36 +00:00
Tomasz Sowa aed891764a added: to config: HasValue() methods
for checking if a value exists (useful for checking lists -- they don't have to be copied out)




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@920 e52654a7-88a9-db11-a3e9-0013d4bc506e
2013-04-02 22:24:30 +00:00
Tomasz Sowa 495499d12f added: a new winix function: imgcrop
for cropping images (and thumbnails)
       www.domain.com/dir/file.jpg/imgcrop  -- crop an image
       www.domain.com/dir/file.jpg/imgcrop/thumb  -- crop an image's thumbnail
       www.domain.com/dir/file.jpg/imgcrop/newthumb  -- crop and create a new thumbnail (from an original image)
       www.domain.com/dir/imgcrop -- show images' list with above options
added: to Image class: some methods for cropping




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@919 e52654a7-88a9-db11-a3e9-0013d4bc506e
2013-03-29 22:03:28 +00:00
Tomasz Sowa 8d9a021eab changed: when there is reqtype:json parameter and there is not set request.ajax_serializer
then we are using a generic json serializer
changed: we are sending the application/json header when returning an json string
added:   to config: log_server_answer (default false)
         when true we put the whole string (server's answer) to the log file
added:   to Request: use_200_status_for_not_found_and_permission_denied
         if this is true then if the server http code would be 403 or 404
         then we return 200 OK (useful when using ajax)
changed: System::RedirectTo() methods take as the last parameter: use_reqtype
         if this is true (default) then reqtype:type parameter is automatically added to the redirecting path
         




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@918 e52654a7-88a9-db11-a3e9-0013d4bc506e
2013-03-26 00:04:01 +00:00
Tomasz Sowa be6e09c5af added: some ezc functions (item_tab_meta*)
added: some ezc functions (gallery_tab_meta*) to gallery plugin
added: to gallery plugin: a new gallery: Gallery version 1.2.9



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@917 e52654a7-88a9-db11-a3e9-0013d4bc506e
2013-02-26 11:49:22 +00:00
Tomasz Sowa 293e426ed4 fixed: plugin 'group'
Groups::ReindexGroups incorrectly read a field from a PT::Space (it used 'table' object directly)
       but the value was in 'table_single' 
       now we are using GetValue method



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@916 e52654a7-88a9-db11-a3e9-0013d4bc506e
2013-02-01 21:14:56 +00:00
Tomasz Sowa 60f2337b73 updated: paths in Makefile (prog subdirectory)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@915 e52654a7-88a9-db11-a3e9-0013d4bc506e
2013-01-19 16:31:15 +00:00
Tomasz Sowa ce8152de2f changed: added 'logsave' when we are waiting for the database to be ready
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@913 e52654a7-88a9-db11-a3e9-0013d4bc506e
2013-01-19 10:10:17 +00:00
Tomasz Sowa 496a1979d2 fixed: in ticket plugin: editticket incorrectly used ticket_info->Clear() method
it was called after some objects were set consequently we were not allowed to edit a ticket



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@912 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-12-30 15:33:08 +00:00
Tomasz Sowa fd698ca7b9 added: put the rebus answer into the log (when user has entered an incorrect answer)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@911 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-12-26 23:08:57 +00:00
Tomasz Sowa b4b368d324 changed: Makefile dep
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@910 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-11-17 01:10:00 +00:00
Tomasz Sowa 825694c880 changed: in editticket: closing ticket is better to do via POST request
added:   a new message sent by editticket when closing a ticket:
         #define WINIX_PL_TICKET_CLOSED                                 4105
         // a ticket has been closed (closed button pressed)
         // in p1 you have a pointer to the Item struct
         // in p2 you have a pointer to the Ticket struct





git-svn-id: svn://ttmath.org/publicrep/winix/trunk@909 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-11-05 23:13:52 +00:00
Tomasz Sowa 32750a7d50 changed: ticket plugin: redirect type in editticket winix function (when there is 'close' parameter)
fixed:   prototype doesn't work with jquery (in ticket winix function)
         (prototype was loaded for lightbox)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@908 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-11-04 22:39:02 +00:00
Tomasz Sowa 0045c6c72c added: to Item struct: ameta (PT::Space)
admin meta information
added: option "a" to meta winix function
       editing admin meta information
changed: now if you don't have write access to an item
         you can't see the meta information
         previous if you had read access you could have seen them
added: in plugin ticket and thread
       support for 'closing' (ticket, thread)
       (this is only logic, we need some html yet)
added: some ezc function for getting meta/admin meta information
       (for the current item and the last directory)




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@907 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-11-04 21:01:02 +00:00
Tomasz Sowa 4809016b78 changed: html (slog.html)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@906 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-11-01 17:56:00 +00:00
Tomasz Sowa 6e2ba65524 changed: added 'check_abuse' parameter to Login::LoginUser
bool Login::LoginUser(const std::wstring & login, const std::wstring & password, bool remember_me,
                               bool use_ses_log, bool check_abuse)
         default 'false' -- it test the time between GET and POST and the rebus (if exists)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@905 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-10-27 11:17:52 +00:00
Tomasz Sowa 8033ac66c4 added: locales to fun_ipban.html
changed: cosmetic changes in IPBanContainer




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@904 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-10-27 10:14:07 +00:00
Tomasz Sowa 9ef3736989 added: to 'ipban' winix function:
possibility to remove a ban (or all bans)
added: to SessionManager: sorting of the ban list (in the second thread)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@903 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-10-27 09:03:49 +00:00
Tomasz Sowa 099dd55d0c added: IP ban mechanism (not finished yet -- we need a winix function to remove a ban)
now after some incorrent login attempts your IP can be banned or blocked
       (see new config variables)


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@902 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-10-27 07:44:26 +00:00
Tomasz Sowa 53b4175d00 added: plugin message: WINIX_CHECK_PLUGIN_ACCESS
this message is sent before calling MakePost() or MakeGet()
       if you return false (which is default) you can prevent the access
       to the resource
       



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@901 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-10-17 19:52:55 +00:00
Tomasz Sowa 8aa6f08e08 updated: html (login and passwd)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@900 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-10-17 06:48:48 +00:00
Tomasz Sowa c5024598cb updated: html/css (added div.winix to templates)
now we have winix.css in common/winix directory
         it is automatically loaded by index_head_functions_add.html


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@898 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-10-17 06:00:00 +00:00
Tomasz Sowa dfcf6b29c0 added: to misc:
bool IsWhite(const wchar_t * str, bool treat_new_line_as_white)
       bool IsWhite(const std::wstring & str, bool treat_new_line_as_white)
       return true if the whole string is white (or an empty string)
added: global variable in admin environment for an user: "display_name"
       if defined it is used to display an user's name instead of its login
       it is used in: void print_user_name(Info & i, User & user);
       (tickets, threads, cat function etc)





git-svn-id: svn://ttmath.org/publicrep/winix/trunk@895 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-26 07:18:32 +00:00
Tomasz Sowa 7f48d1eb2e fixed: the way we check whether we need make the redirect from SSL to non SSL (or vice versa)
beforehand we didn't take into accout default winix functions



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@894 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-24 20:31:01 +00:00
Tomasz Sowa eaa97995d2 fixed: we should check cur.request->function is not null (in5D app when testing ssl/nossl redirect)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@893 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-24 18:59:08 +00:00
Tomasz Sowa 14f997b844 added: need_ssl flag to FunctionBase
// try to use SSL
       // if in the config 'use_ssl' is true and 'use_ssl_only_for_logged_users' is true
       // then ssl is used only for logged users but sometimes there is a need to use
       // SSL even if noone is logged (for example for such functions like 'login' or 'adduser')
       // default: false
       // (this option is ignored if 'use_ssl' in the config is false)
       bool need_ssl;




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@892 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-24 18:38:35 +00:00
Tomasz Sowa 26e87b20b1 changed: in Crypt:
renamed Hash() -> HashBin()
         HashBin() is using a binary output from OpenSSL now
	 previously we are using the hex output and with the new OpenSSL version
         the text has additional characters and causes some problems
	 added: HashHex() - it is using the HashBin() and then converts the output
	 to hex format itself
	 



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@891 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-19 23:17:10 +00:00
Tomasz Sowa 5cdf6eff36 added: to ticket plugin:
some messges:
// 
#define WINIX_PL_TICKET_PREPARE_TO_ADD_TICKET  4103

// a next ticket will be displayed
// in p1 you have a pointer to the Item struct
// this is call from tickets_tab ezc function
#define WINIX_PL_TICKET_TICKETS_TAB_IS_NEXT            4104

methods:
void ticket_meta_value(Info & i)
void tickets_tab_meta_value(Info & i)






git-svn-id: svn://ttmath.org/publicrep/winix/trunk@890 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-15 23:34:25 +00:00
Tomasz Sowa 4ed535a3b7 added: to plugin ticket: message WINIX_PL_TICKET_LOAD_TICKETS
someone can send this message with a directory id
       and tickets will be loaded from the directory
       (and to display them you can use ezc functions)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@889 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-14 23:48:39 +00:00
Tomasz Sowa da15323c2f added: to plugin thread: message WINIX_PL_THREAD_CAN_MAKE_REDIRECT
(similar as for ticket)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@888 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-14 07:14:54 +00:00
Tomasz Sowa bd1f717b4c added: some methods in Dystem::Dirs (takes wchar_t * as an argument, now only std::wstring were)
changed: in plugin ticket: added message: WINIX_PL_TICKET_CAN_MAKE_REDIRECT
         it is sent at the end of POST request (editticket, createticket)
         if we can make a redirect (useful with AJAX)





git-svn-id: svn://ttmath.org/publicrep/winix/trunk@887 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-13 23:12:48 +00:00
Tomasz Sowa 72013046fc added: Lock class -- locking resources by using Synchro object
the destructor automatically calls Unlock()



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@886 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-11 23:46:00 +00:00
Tomasz Sowa 14ae19143f added: new ezc filter: fil_new_line_to_br
added: PutChar() methods to HtmlTextFilter and TexTextFilter



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@885 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-11 21:41:10 +00:00
Tomasz Sowa d8260d8383 added: a new way: HEX format to saving/reading from PostgreSQL bytea columns
added: to Request:
       // binary page
       BinaryPage binary_page;

       // a compressed page ready to send to the client
       BinaryPage compressed_page;

       // if true then either page or ajaxpage will be sent to the client
       // if false then binary_page is sent
       // default: true
       bool use_text_page;

       BinaryPage is defined as (in requesttypes.h):
       typedef PT::TextStreamBase<char, 1, 4096> BinaryPage;

added: to Compress: now it can gets BinaryPage as arguments (input, output)
changed: winix version to: 0.5.0
added: in templates: TexTextStream class
       for taking input to the TeX typesetting system





git-svn-id: svn://ttmath.org/publicrep/winix/trunk@884 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-11 05:19:45 +00:00
Tomasz Sowa 9174555ff8 added: to config: log_time_zone_id (size_t) identifier
this is the time zone identifier used in log messages



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@882 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-06 17:50:14 +00:00
Tomasz Sowa 0c6ddc2218 added: 'subject' winix function is using WINIX_FILE_CHANGED message now (when changing a file's subject)
added: 'postredirect' global parameter (it can be a param or post value)
       you can use this parameter in a html POST form
       after processing the POST request winix will make a redirect to the value



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@881 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-04 20:24:42 +00:00
Tomasz Sowa 43b4075b16 added: ezc functions:
void dir_tab_subject(Info & i);
       void dir_tab_is_root(Info & i);
changed: in dir_tab_link:
         now it doesn't print the proto and base address - you should use [doc_base_url]




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@879 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-02 01:27:41 +00:00
Tomasz Sowa 8f8e44fee5 added: ezc functions:
void dir_is_no(Info & i)
       void dir_level_is(Info & i)
       void dir_last_url_is_no(Info & i)
       void item_no_is(Info & i)
       void item_url_is_no(Info & i)




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@878 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-08-26 22:30:25 +00:00
Tomasz Sowa 260c12894d added: to Request options used by ezc generators:
bool gen_trim_white;
       bool gen_skip_new_line;
       bool gen_use_special_chars;
added: new ezc filter: fil_csv_escape
       for escaping csv fields





git-svn-id: svn://ttmath.org/publicrep/winix/trunk@877 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-08-26 19:53:47 +00:00
Tomasz Sowa adf273479a fixed: WINIX_RAW_POST_STRING should have a different id
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@876 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-08-19 14:25:43 +00:00
Tomasz Sowa 54480da405 added: WINIX_RAW_POST_STRING plugin message
this is the raw string sent in POST method (in p1 pointer there is a pointer to std::string object)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@875 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-08-19 14:24:24 +00:00
Tomasz Sowa 90261b2005 added: a new plugin message: WINIX_POST_PARAMS
raw POST parameters
       in p1 there is a pointer to std::string meaning a parameter's name
       in p2 there is a pointer to std::string value
       this is sent only from PostParser
       PostMultiParser (multipart/form-data html forms) doesn't send this messsage
       there is no a session set (session pointer is null)




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@874 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-08-19 13:50:58 +00:00
Tomasz Sowa cc71c225a3 added: to DbBase:
bool EndTrans(bool everything_ok);



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@873 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-08-15 19:33:20 +00:00
Tomasz Sowa e739f30088 fixed: when using Request::ajax_serializer then we should not use html filter
(the filter can be used before we make the json answer -- not implemented yet)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@872 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-08-12 18:23:48 +00:00