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
This commit is contained in:
2012-06-26 23:19:19 +00:00
parent 54e6c07efc
commit b8ff5d4cfc
53 changed files with 4618 additions and 3053 deletions

View File

@@ -13,7 +13,7 @@
#include <string>
#include "space/spaceparser.h"
#include "htmlfilter.h"
#include "timezone.h"
@@ -289,7 +289,7 @@ public:
// default: 92
int image_quality;
// the convert program (for images and thumbnails)
// the convert program (ImageMagic) (for images and thumbnails)
// default: /usr/local/bin/convert
std::wstring convert_cmd;
@@ -303,14 +303,16 @@ public:
// default: only one item: en
std::vector<std::wstring> locale_files;
// default locale
// default: the first item from locale_files
std::wstring locale_default;
// default locale - index to locale_files
// not available in config -- set automatically based on locale_default
size_t locale_default_index;
// 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
size_t locale_max_id;
// locale for not logged users
// or for newly created accounts
// default: 0
size_t locale_default_id;
// url protocol
// default: http://
@@ -485,16 +487,17 @@ public:
// default: 86400 (24 hours)
long reset_password_code_expiration_time;
// time zone for guests
// or for users who don't have time zone set
// following options are read:
// "tz_offset" (long)
// "tz_has_dst" (bool)
// if tz_has_dst is true then also:
// "tz_dst_start" date in the following format: MM:DD HH[:MM[:SS]]
// "tz_dst_end" the same as above
// "tz_dst_offset" (long)
TimeZone time_zone;
// 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)
size_t time_zone_default_id;
// a maximum value of a time zone identifier
// time zones with an id greater than this will be skipped
// default: 130 (maximum: 1000)
size_t time_zone_max_id;
// a directory in which there are some config files
// used mainly when winix starts
@@ -548,7 +551,6 @@ private:
void ShowError();
void AssignValues(bool stdout_is_closed);
void SetAdditionalVariables();
void CheckLocale();
void CheckPasswd();
PT::Space space;