Commit Graph

902 Commits

Author SHA1 Message Date
Tomasz Sowa 1c4e010fc1 I have forgotten to add: html/fun_export.html
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@868 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-08-03 09:39:25 +00:00
Tomasz Sowa d8d523d983 added: 'export' winix function (export plugin)
exporting an item or the whole directory



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@867 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-08-03 09:25:17 +00:00
Tomasz Sowa 1c2589a2f2 added: to Log:
void LogBinary(const char * blob, size_t blob_len);
       void LogBinary(const std::string & blob);
       int LogLevel();



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@866 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-07-31 03:29:16 +00:00
Tomasz Sowa 1ec61ffa11 added: to Log:
operator<<(const PT::TextStreamBase<>())



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@865 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-07-25 10:28:41 +00:00
Tomasz Sowa ca0a5c9cbe changed: upload html
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@864 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-07-15 18:20:22 +00:00
Tomasz Sowa 8dd31e737f changed: css
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@862 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-07-15 15:57:45 +00:00
Tomasz Sowa e98cca7fbc updated: jquery upload plugin (upload winix function)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@861 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-07-15 15:49:48 +00:00
Tomasz Sowa 9830b0a50f added: to misc: UrlEncode which takes PT::TextStreamBase as an argument
added: to misc: QEncode which takes PT::TextStreamBase as an argument
added: to Locale: methods: IsKey, Get which takes PT::TextStreamBase as an argument




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@860 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-07-10 16:50:59 +00:00
Tomasz Sowa f76a0ca3e9 added: some ezc functions in menu plugin
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@859 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-07-02 19:15:50 +00:00
Tomasz Sowa 5a6d1991ac changed: config.space is available public now
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@858 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-06-30 23:20:18 +00:00
Tomasz Sowa 329e2d8001 fixed: when there is no option "locale_files" in the config
the "en" should be loaded by default
added: LDFLAGS option to Makefiles
added: compilation with CLANG (some const objects should have been created with default cctor)




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@856 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-06-30 18:37:52 +00:00
Tomasz Sowa 403cca5aad rewritten: public interface in TemplatesFunctions::Locale
added a default parameter bool try_default_too = true to some methods: Get(), IsKey()
           added more methods for accessing by an internal index



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@854 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-06-27 23:21:43 +00:00
Tomasz Sowa b8ff5d4cfc added: winix functions: locale, timezone
changed: time zones -- now we have the daylight saving time
       different for each year (start, end)
added: config option: time_zone_id (size_t)
       time zone identifier for not logged users
       or for newly created accounts
       those identifiers you can see in etc/time_zones.conf file
       or by using timezone winix function with 'a' parameter (timezone/a) (!!IMPROVE ME NOT IMPLEMENTED YET)
       default: 34 (Coordinated Universal Time UTC+00:00)
added: config option: locale_default_id (size_t)
       locale for not logged users
       or for newly created accounts
added: config option: locale_max_id (size_t)
       a maximum value of a locale identifier
       default: 100 (maximum: 1000)
       each locale files should have its own identifier (in "winix_locale_id" field)
       from zero to this value
added: config option: time_zone_max_id (size_t)
       maximum value of a time zone identifier
       time zones with an id greater than this will be skipped
       default: 130 (maximum: 1000)
removed: config option: locale_default



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@852 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-06-26 23:19:19 +00:00
Tomasz Sowa 54e6c07efc added: etc directory to Makefile install
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@850 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-06-22 23:41:12 +00:00
Tomasz Sowa d11cda3577 added: a new directory "etc"
there'll be some generic config files for winix
added: a new file in etc directory: time_zones_file
       list of time zones (not finished yet -- daylight saving time is needed)
added: option to config: etc_dir
       a directory in which there are some config files
       used mainly when winix starts
       default: empty (means not for using)
added: option to config: time_zones_file
       a file in etc_dir with time zones info
       default: time_zones.conf
       this is a Space structure with all time zones
added: to system: TimeZones struct
       list of time zones read from etc/time_zones.conf



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@849 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-06-22 23:34:33 +00:00
Tomasz Sowa abafb80caf added: time zone's names to locales
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@848 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-06-22 19:18:03 +00:00
Tomasz Sowa e0dd85ca99 changed: making a redirect from SSL connection to non SSL
if either use_ssl in the config if false
         or if use_ssl_only_for_logged_users is true
         and a user is not logged
added:   base url redirect HTTP codes to the config
         // if current connection is without SSL and should be made through SSL
         // or if is via SSL and should be done in plain text
         // then we make a redirect
         // default: 303
         int use_ssl_redirect_code;

         // when the HOST_HTTP environment variable is not equal to 'base_url'
         // (the part 'http://' and the last slash is removed)
         // the server will redirect into base_url + 'REQUEST_URI'
         // it's useful when you want to redirect from 'mydomain.tld' into 'www.mydomain.tld' etc.
         // set this option to false if you have multiple subdomains
         // default: false
         bool base_url_redirect;




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@847 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-06-07 00:26:37 +00:00
Tomasz Sowa 2c38fe180e added: new function for ezc templating:
void space_value_noescape(Info & i, PT::Space & space)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@846 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-06-05 21:31:12 +00:00
Tomasz Sowa 0d0f12b394 added: to Requst:
std::wstring * PostVarp(const std::wstring & var);
added: to misc:
       template<class CharType>
       bool Toa(unsigned/signed long/int value, CharType * buffer);
       some Toa methods which don't get the buffer len
       (the buffer has to be sufficient big)




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@845 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-06-04 17:51:43 +00:00
Tomasz Sowa 86d6c96aeb fixed: winix_subdomain ezc function
didn't print the subdomain
added: to rm winix function:
       bool Rm::RemoveItemByPath(const std::wstring & path, bool check_access)
fixed: in Upload winix function
       when uploading an image we have to get
       a mount point where the image is placed (parent dir)
       (it was cur->mount beforehand)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@844 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-06-03 02:14:33 +00:00
Tomasz Sowa b605fb0a77 added: some ezc functions for subdomains:
void winix_subdomain(Info & i);
       void winix_subdomain_is_empty(Info & i);
       void winix_subdomain_is_not_empty(Info & i);
       void winix_subdomain_is(Info & i);




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@843 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-05-30 21:14:03 +00:00
Tomasz Sowa ec773e5f29 added: TimeZone struct (core)
this class has information about a time zone (utf offset, daylight saving time)
       and methods for converting between UTC and local time
       structs User and Config has a TimeZone object
       System::ToLocal() and System::ToUTC() uses it for converting
       (depending whether a user is logged or not)


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@842 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-05-30 19:04:18 +00:00
Tomasz Sowa 9d5d088b4a removed: in some places a dependencies to tm struct has left
removed: operator<<(tm&) from streams: textstream, log, dbtextstream, htmltextstream



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@840 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-05-27 18:11:34 +00:00
Tomasz Sowa 1b858f5782 removed: dependencies to 'tz' system structure
now we are using PT::Date from pikotools



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@839 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-05-26 23:04:49 +00:00
Tomasz Sowa 5b845f1d03 changed: in Request:
removed start_tm
         added start_date (PT::Date)
changed: in Session:
         removed: tm_time
         added: start_date (PT::Date)
         renamed: time -> start_time
         the same is for last_time
         now we have (last_time and last_date)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@838 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-05-24 21:09:37 +00:00
Tomasz Sowa db9d381a43 added: to thread manager: names of the threads
the names are shown in the log file


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@837 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-05-19 17:04:33 +00:00
Tomasz Sowa 0df088e1e2 fixed: when demonizing there were some logs info put twice in the log file
now we first demonize (fork) and then open the log file
added: start adding support for PT::Date 
       we are using instead of tz system structure



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@836 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-05-19 15:14:35 +00:00
Tomasz Sowa 67099d5d06 changed: misc::OnlyDigit()
a comma is changed to a dot


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@835 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-05-12 20:30:34 +00:00
Tomasz Sowa 07e8e0c63c updated: to the new Space API (pikotools)
changed: in locale txt files:
         the '(' and ')' characters should be escaped '\(' and '\)'
         or the whole string should be quoted
added:   when parsing locale files we print the line number where there was a syntax error



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@833 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-05-12 16:37:44 +00:00
Tomasz Sowa ecc89d8596 added: two plugin's messages
// a session is going to be removed
// it is called from session manager's thread (with lock/unlock)
#define WINIX_PREPARE_SESSION_TO_REMOVE          30027

// a session has been removed
// it is called from session manager's thread (with lock/unlock)
// in l1 you have the old session id
#define WINIX_SESSION_REMOVED                    30029




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@832 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-05-01 17:58:42 +00:00
Tomasz Sowa c94b0311b6 updated: to the new Pikotools API
ConfParser is now SpaceParser
added:   to SessionManager
         Session * SessionManager::FindSession(long id)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@831 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-04-30 22:53:54 +00:00
Tomasz Sowa fc33b4f882 added: a deadlock counter to Synchro class
now we can use Lock() more than one in the same thread
       and next Unlock() will recognize it
       sample:
       Lock(); // first lock -- resources locked
       Lock(); // second lock -- skipped (counter incremented)
       ...
       Unlock(); // first unlock -- skipped (because counter greater than zero)
       Unlock(); // second unlock -- actually unlocking


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@830 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-04-28 20:57:57 +00:00
Tomasz Sowa 1da1eef768 fixed: ThreadMenager should use Lock/Unlock in StartAll() method
added: Job class (system->job object)
       a general mechanism for jobs (by using PT::Space as a job structure)
       WINIX_JOB plugin message will be sent with a pointer to PT::Space



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@829 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-04-25 22:24:37 +00:00
Tomasz Sowa baf10a9ba9 added: std::wstring Request::subdomain
support for subdomains



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@828 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-04-22 18:23:44 +00:00
Tomasz Sowa bcea4f9464 fixed: base_url_redirect config option was not read from the config file
and was not used when checking for base url redirect
fixed: return values from plugins should be given in a special structure
       they were remembered in plugin object (ret_false, ret_true)
       and consequently were not thread safe
       now all plugin.Call() methods return PluginRes structure 
       in which there are ret_false and ret_true variables       
changed: small refactoring in AddUser winix function



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@827 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-04-22 13:30:07 +00:00
Tomasz Sowa 920290e9dc changed: permission to winix function 'who' and 'last'
(only logged users can use these functions)


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@826 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-04-06 08:11:25 +00:00
Tomasz Sowa 1d83cf42a1 fixed: passwd winix funtion always changed a password for current user
(even if it was an administrator and has selected other people)


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@825 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-03-30 06:44:38 +00:00
Tomasz Sowa 09bfdf9e77 added: two ezc functions:
void winix_postvar_value_is(Info & i);
       void winix_postvar_value_is_not(Info & i);



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@824 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-03-28 00:09:27 +00:00
Tomasz Sowa e83fd91423 rewritten: sessions management
(Session, SessionContainer, SessionManager)
           now a Session object don't copy all fields in its copy constructor (only id)
           the rest fields are set after the object is inserted in SessionContainer
added:     after successfully login a session id is changed
added:     plugin.Call() methods with a first argument a pointer to a Session object



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@823 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-03-17 05:11:23 +00:00
Tomasz Sowa 70421b7bd1 reverted last commit (secure flag to cookie) with some info
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@822 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-03-15 17:50:19 +00:00
Tomasz Sowa 71ae70f670 added: to cookies: flag "; secure" if a connection is through SSL
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@821 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-03-15 10:43:29 +00:00
Tomasz Sowa b1b3cea64e added: new plugin message: WINIX_PREPARE_USER_TO_LOGIN
a user will be logged in
        set PluginInfo::res to false (it is by default) to prevent logging the user
        directly after this message (if you do not return false)
        a WINIX_USER_LOGGED is sent
        in p1 you have a pointer to User struct
        (if at least one plugin returns false then the user will not be logged)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@820 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-03-14 20:25:30 +00:00
Tomasz Sowa 2712c57f15 changed: Makefile dep (dependencies from pikotools and tito were missing)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@819 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-03-12 20:30:36 +00:00
Tomasz Sowa 0b528c7225 added: to misc:
void OnlyDigit(StringType & s, bool allow_comma = true)
       removes all non-digit characters from a string


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@818 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-03-11 16:21:52 +00:00
Tomasz Sowa b7007da5a9 fixed: misc: ValidateEmail() buffer overflow
added: notifications for resetting a user's password
       (there is no a winix function for this yet)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@817 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-03-09 22:56:54 +00:00
Tomasz Sowa 489310ba1c added: winix function: rmuser
changed: UGContainer<> now uses std::list as a storage
         (previously it was using std::vector with pointers)
removed: now we don't have the operator[] for UGContainer<>



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@816 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-03-09 02:36:25 +00:00
Tomasz Sowa 6c2c12fe5e added: html/fun_pw.html
default view for pw winix function


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@815 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-03-03 21:00:48 +00:00
Tomasz Sowa e61f0db57e changed: export plugin:
password is stored as a string (in database)


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@814 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-03-01 15:39:13 +00:00
Tomasz Sowa 3e3546a2fd fixed: plugin 'menu' incorrectly read directory items when the directory was en empty string
(the current directory should be used)


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@813 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-03-01 15:14:46 +00:00
Tomasz Sowa d2fa3b7171 corrected: in some places declarations of classes where mixed with struct (class/struct)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@812 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-02-29 22:52:55 +00:00