Commit Graph

697 Commits

Author SHA1 Message Date
Tomasz Sowa 9d2be5c50d added: to misc:
void MaxSize(StringType & str, size_t max_size)
       if a string is larger than max_size then it is truncated to max_size characters


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@805 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-02-14 20:35:35 +00:00
Tomasz Sowa f381f24402 fixed: in DbBase: removed:
DbBase::AssertQuery(const std::wstring & q)
       there was a recurrence calling (the method called itself)
       we don't need a method which get a wstring as an argument
added: DbBase::AssertQuery(const char * q, ExecStatusType t)
       DbBase::AssertQuery(const DbTextStream & query, ExecStatusType t)
       (AssertQuery with a second argument -- the same as to AssertResult)
       we don't have to use AssertQuery and AssertResult
       only one AssertQuery now
added: to plugins: two messages:
       // preparing a current user to logout
       // send from 'logout' winix function
       // !! IMPROVE ME this message can be sent when winix is making the shutdown
       // (for sessions which are not mark as 'remember me')
       // and when the SessionManager deletes a session (from the special thread)
       #define WINIX_PREPARE_USER_LOGGED_OUT          30610

       // a user has been logged out
       // send from 'logout' winix function
       // in l1 you have the old user_id
       // !! IMPROVE ME this message can be sent when winix is making the shutdown
       // (for sessions which are not mark as 'remember me')
       // and when the SessionManager deletes a session (from the special thread)
       #define WINIX_USER_LOGGED_OUT                          30620



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@804 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-02-12 14:52:52 +00:00
Tomasz Sowa f6db85fcdb fixed: uninitialized variable in 'rm' winix function (in HasAccess method)
sometimes for directories the rm function could return 'access true' (even without 'r' parameter)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@803 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-02-10 00:50:05 +00:00
Tomasz Sowa 9687d5cd66 removed: operator<<(const PT::Space * space)
from textstream, log, dbtextstream, htmltextstream
added: compile option: -pthread



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@802 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-02-10 00:29:54 +00:00
Tomasz Sowa 6e2d00bc5b added: now we have a fourth part in permissions (guests)
e.g.: 07555 means:
           7 for owner
           5 for group
           5 for others
           5 for guests (not logged users)
added:     the sticky bit for directories
           e.g. permissions to a directory with a sticky bit set
           can be set to: 017555
rewritten: rm/mv winix functions to correctly understand the sticky bit
added:     Dir::FollowLink() recognizes ".." and "." now
           consequently System::FollowAllLinks recognizes it too
added:     umask -- calculating privileges for new files/directories
           all users have their own umask (in meta)
           and there is one in the config
           (for guests and when a user has not definied its own one)
removed:   mount option: only_root_remove



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@801 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-01-24 23:03:36 +00:00
Tomasz Sowa 5aaab89cd8 added: to locale: comparing lexicographically two characters/strings
int Compare(wchar_t c1, wchar_t c2);
       int Compare(const std::wstring & str1, const std::wstring & str2);
       
	   


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@800 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-01-21 20:51:13 +00:00
Tomasz Sowa 7407d24586 added: new ezc filter: fil_first_wordup
first character in a word is capitalized


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@799 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-01-21 17:13:00 +00:00
Tomasz Sowa c9931da5ba fixed: plugin ticket: when a session expires all files from editticket were removed
it should be removed only those new added


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@798 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-01-21 12:29:44 +00:00
Tomasz Sowa 4311f06ade added: to TextStream<> and Log:
operator<<(const tm & tm_)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@797 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-01-19 20:50:42 +00:00
Tomasz Sowa 8b64b5d372 updated plugins/ticket templates functions
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@796 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-01-18 17:55:28 +00:00
Tomasz Sowa 631ca4f8a3 plugin ticket: rewritten templates ezc functions
(now images/files are working fine)


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@795 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-01-17 22:54:41 +00:00
Tomasz Sowa 424618de38 added: to templates: an interface for getting information from Space
miscspace.h, miscspace.cpp
changed: plugin ticket
         now as a config we use a PT::Space struct
         (not finished yet, only 'integer', 'select' and 'progress' are done)


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@794 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-01-16 10:12:38 +00:00
Tomasz Sowa b2d3ca9543 now winix is using 'pikotools' (confparser, utf8, mainparser)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@792 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-01-12 02:24:08 +00:00
Tomasz Sowa cb33f20a24 removing: confparser.h confparser.cpp
(moving to pikotools)


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@791 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-01-11 11:32:01 +00:00
Tomasz Sowa 973d804db2 added: TextStream<> DbTextStream<> and HtmlTextStream<> have operator<<(Space&) now
added: to db: bool DbBase::AssertValueSpace(PGresult * r, int row, int col, Space & space, bool split_single)
added: environment variables for users
       User::env (of type Space) and
       User::aenv (of type Space) for admin variables (can be changed only by a super user)
added: winix function 'env'
       for changing User::env and User::aenv ('env' winix function with a 'a' parameter)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@790 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-01-08 03:59:51 +00:00
Tomasz Sowa 84eaa6b7b6 changed: rewritten templates/man
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@789 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-01-06 12:55:08 +00:00
Tomasz Sowa f967a428ce added: winix function 'man'
displaying all winix functions and ezc templates functions


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@787 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-01-06 12:07:23 +00:00
Tomasz Sowa 543d464cbc changed: plugin 'menu': ezc funtion: menu_dir_tab
now we have two parameters: first is a path and second is: "images", "dirs", "files" or empty
          


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@786 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-01-02 02:05:12 +00:00
Tomasz Sowa 43470b2a41 forgotten to add html/index_rawcontent.html
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@785 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-12-17 22:02:49 +00:00
Tomasz Sowa fa05e25a9d added: to config: 'content_type_header' parameter
the kind of "Content-Type" header send to the client
       if utf8 is enabled then 'charset=UTF-8' will also be appended
added: to templates: an index pattern for 'rawcontent'
       used when 'rawcontent' parameter is present
       by default the template has only one [content] ezc function
       useful in AJAX requests       


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@784 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-12-17 21:59:22 +00:00
Tomasz Sowa fe2f1605f1 changed: core/misc: date format in Time() methods
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@783 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-12-14 20:35:19 +00:00
Tomasz Sowa 48b5c167bf added to db stream: DbTextStream::operator<<(const std::vector<long> & tabid)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@782 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-12-08 22:01:19 +00:00
Tomasz Sowa 08a0a36dfd changed: html (upload winix function)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@781 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-12-05 18:20:48 +00:00
Tomasz Sowa d135c31ca0 added: to htmlfilter: html "col" tag is a 'simple' tag
added: ezc functions: winix_function_param_value_is and winix_function_param_value_is_not
       they take two arguments: param_name and param_value



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@780 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-12-04 19:34:39 +00:00
Tomasz Sowa dce68221ad changed: plugin 'export'
rewritten changing of strings in html output
         (added support for https:// prefix)


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@779 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-12-03 19:34:58 +00:00
Tomasz Sowa 93273bd470 changed: upload template
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@778 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-12-02 14:38:26 +00:00
Tomasz Sowa 92f7c11999 added: 'export' plugin can make use of some meta informations (from items)
additional export currently


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@777 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-12-01 20:45:06 +00:00
Tomasz Sowa 024ce8e73c added: a new index template: index_fullscreen.html
is chosen automatically when 'fullscreen' parameter is passed


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@776 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-12-01 18:54:09 +00:00
Tomasz Sowa 7902389ef1 changed: in plugin 'menu'
menu_dir_tab ezc functions can be nested now
         (not finished yet)
added:   'meta' winix function
         additional meta information for files and directories
         (not finished yet)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@775 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-11-25 04:51:55 +00:00
Tomasz Sowa 1e9ab2f805 added: to 'group' plugin: new ezc function: group_tab_is_current_link
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@774 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-10-30 23:47:43 +00:00
Tomasz Sowa 0550212b64 changed: GroupItem plugin has been renamed to Group
it's nearly finished
         now we are using three levels from Space (ConfParser)
         - group set
         - group
         - values
         


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@773 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-10-16 21:33:45 +00:00
Tomasz Sowa c7b6ca67a2 changed: plugin messages:
WINIX_FILE_REMOVED and WINIX_DIR_PREPARE_TO_REMOVE
         now as a parameter we have a pointer to the Item struct
changed: export plugin now exports all files from a directory
         (in the future there'll be an option how the plugin should behave)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@772 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-09-30 01:33:42 +00:00
Tomasz Sowa 9dae2de2fa fixed: FunctionParser skipped a function name after an item (file) if the name was not a name for a function
it should report a 404 in such a case


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@771 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-09-28 22:24:24 +00:00
Tomasz Sowa 968593106e fixed: menu plugin: static files were not correctly skipped
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@770 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-09-26 06:56:35 +00:00
Tomasz Sowa 302cb0130d changed: menu plugin (static files are skipped)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@769 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-09-26 06:39:05 +00:00
Tomasz Sowa 89efaa790f changed: ConfParser -- now we can have a tree (spaces can have more than one level)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@768 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-09-26 05:40:26 +00:00
Tomasz Sowa 60f0e62c23 changed: we do not make a 'base redirect' when the request method is POST
changed: ConfParser -- now we have spaces (only one level)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@767 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-09-16 22:46:42 +00:00
Tomasz Sowa f113e2ef31 changed: we should use SSL connection for such functions as:
adduser, login


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@766 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-09-14 09:56:00 +00:00
Tomasz Sowa 39923d6617 fixed: UGContainer<Type> used a std::vector<Type> and when a new item was inserted
then current iterators (and pointers) were invalidated
         now we are using std::vector<Type*>
         this caused some crashes when a new user was added by 'adduser' winix function
added:   plugin 'export' is able to upload files on a remote server now
         (not finished yet)
changed: Thumb class is now called: Image
         and we are able to resize images too
         (some new options in the config and in mount points)
added:   some new plugin messages



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@764 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-09-13 06:08:34 +00:00
Tomasz Sowa 72be443414 added: new flag: Request::using_ssl
true if the connections is encrypted by using SSL
changed: in BaseUrlRedirect
         we also check if the connection should use SSL 
         and if so then we make a redirect to "https://.."
changed: in 'static' mount points:
         if the request was e.g. "/styles/default.js?t=B49E5BQ"
         we should return a file "/styles/default.js" (without the "?..." part)
         additionally '#' character is checked



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@762 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-09-06 22:46:15 +00:00
Tomasz Sowa 392e8060ba added: some work in Export plugin
changed: in base redirect we are using 301 moved permanently status code now (was 303)


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@761 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-09-05 15:38:09 +00:00
Tomasz Sowa 8c01b0f6c0 added: two tables to locales/substitute: smallleters, capitalics
added: locale.ToSmall(wchar_t), locale.ToCapital(wchar_t)
       now we are able to recognize other than ASCII characters
added: static/basic/winix.css with basic styles
removed: [include "item_options.html"] from html templates (fun_cat.html and others)




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@760 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-08-29 22:23:54 +00:00
Tomasz Sowa b984475e49 fixed: index templates and 'change' templates were not cleared when 'reload' function was called
so wrong indexes have been assigned


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@759 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-08-27 03:12:33 +00:00
Tomasz Sowa 4f114ea33c added: ezc function: dir_has_parents
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@758 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-08-26 20:45:58 +00:00
Tomasz Sowa 5b8a9c0108 added: Patterns class (in templates)
ezc patterns are managed by this class
added: some work in groupitem plugin (not finished yet)
changed: ConfParser can read a string from memory now
         (need some testing yet)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@757 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-08-25 23:53:49 +00:00
Tomasz Sowa ee6500ac65 added: some more orphans to polish default locale
added: new options to the config:
  url_proto: default: http://
  url_ssl_proto: default: https://
  use_ssl, use_ssl_static, use_ssl_common (whether or not to use SSL protocol)
  use_ssl_only_for_logged_users
  now we are able to use SSL encryption (https) together with normal connections
removed: config option: base_server




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@755 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-08-17 23:09:47 +00:00
Tomasz Sowa 3b2a1c3f25 added: new winix function: "sort"
sorting items in a directory (Item::sort_index is used)


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@754 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-08-02 00:10:45 +00:00
Tomasz Sowa 4d87359aca added: Export plugin (not finished yet)
added:   ThreadManager
         all threads are connected to the ThreadManager
         they are started/stopped by the manager
changed: FunctionParser
         now we are parsing directly what is in URI
         (we were using GetParser beforehand)
         we are able to recognize ordinary URI scheme (with '?' and '#' characters)
         sample:
         http://domain.com/dir1/dir2/item/function?par1=val2&par2=val2#htmlanchor
         is the same as:
         http://domain.com/dir1/dir2/item/function/par1:val2/par2:val2#htmlanchor
         'htmlanchor' is put in Request::anchor field,
         and the default function can be used like this:
         http://domain.com/dir1/dir2/item?par1=val2&par2=val2#htmlanchor
         but there is not an equivalent in winix form
         e.g. http://domain.com/dir1/dir2/item/par1:val2/par2:val2#htmlanchor
         because 'par1:val2' would be treated as a function name
removed: GetParser
         now we don't have Request::get_tab structure
removed: CKEditorGetParser
         it is not needed now



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@752 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-07-28 22:18:10 +00:00
Tomasz Sowa c37c1ff812 fixed: as we have insert_page ezc function now
we cannot delete ezc patterns when PatternCacher::GetPattern() method is called
       because we can delete a pattern which is in use
       now deleting is performed at the end of a request


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@751 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-07-15 02:09:02 +00:00
Tomasz Sowa 1812a2e9ad added: new plugin: menu
fixed: System::FollowAllLinks didn't check permissions to a file (only to a simlink or a directory)
added: new ezc function: insert_page
       now we are able to nest pages in pages



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@750 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-07-13 23:14:10 +00:00