Commit Graph

45 Commits

Author SHA1 Message Date
Tomasz Sowa 06f42dd9cb changed: winix 'upload' function is a file manager now
we're using an jquery upload plugin
added:   Item struct has new rows: hash, hash_type, file_size, sort_index
added:   css mount parameter
         you can specify css files there, and javascript wysiwyg editors
         (ckeditor, tinymce) can make use of it
changed: post parsers can parse post variables with the same name
         (a postfix is added in such a case)
added:   common_dir parameter to the config
         this is a path to common directory (directory with common static files)
         it is needed to the 'css' mount parameter
         


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@746 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-06-24 20:53:21 +00:00
Tomasz Sowa 583df13139 added: mount options: thumb_size(cx, cy)
size of a generated thumbnail (size in pixels)
added: plugin gallery: mount option gallery_type
       it can be:
       "lightbox"
       "galleria"
       "galleriathumb"


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@717 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-02-11 21:37:28 +00:00
Tomasz Sowa 915cabdf97 changed: added Cur structure
we have there two pointers: 
 Request * request;
 Session * session;
these are the current request and the current session


the session GC was moved to SessionManager (was in SessionContainer)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@708 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-01-23 14:15:30 +00:00
Tomasz Sowa ab84a5169e 'tickets' can use 'threads' now
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@706 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-01-20 18:37:51 +00:00
Tomasz Sowa 35efed9fef - now the mess with threads has gone away
- we have a class BaseThread -- this is a base class -- we can inherit from it when
  creating a new thread
- others treads are correctly stopped (when signal comes) -- pthread_join
- we have a special thread only for signals



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@685 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-12-02 01:02:02 +00:00
Tomasz Sowa 933c8841ff added: uptime winix function prints how many sessions there are
changed: functions for text/numbers conversions
         int Toi(const std::string & str,  int base = 10);
         int Toi(const std::wstring & str, int base = 10);
         int Toi(const char * str,         int base = 10);
         int Toi(const wchar_t * str,      int base = 10);

         long Tol(const std::string & str,  int base = 10);
         long Tol(const std::wstring & str, int base = 10);
         long Tol(const char * str,         int base = 10);
         long Tol(const wchar_t * str,      int base = 10);

         template<class CharType>
         bool Toa(unsigned long value, CharType * buffer, size_t buf_len, int base = 10);

         template<class CharType>
         bool Toa(long value, CharType * buffer, size_t buf_len, int base = 10);

         template<class CharType>
         bool Toa(unsigned int value, CharType * buffer, size_t buf_len, int base = 10);

         template<class CharType>
         bool Toa(int value, CharType * buffer, size_t buf_len, int base = 10);

         const wchar_t * Toa(unsigned int value,  int base = 10);
         const wchar_t * Toa(unsigned long value, int base = 10);
         const wchar_t * Toa(int value,  int base = 10);
         const wchar_t * Toa(long value, int base = 10);

         void Toa(int  value, std::string & res,  int base = 10, bool clear = true);
         void Toa(long value, std::string & res,  int base = 10, bool clear = true);
         void Toa(int  value, std::wstring & res, int base = 10, bool clear = true);
         void Toa(long value, std::wstring & res, int base = 10, bool clear = true);

added:   HtmlTextStream class (files htmltextstream.cpp htmltextstream.h in templates)
         this is a special stream for automatically escaping html tags
	     



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@682 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-11-25 01:34:46 +00:00
Tomasz Sowa 518281e101 fixed: when signal comes winix properly exits
fixed:   when winix exits the session data were not properly destroyed (memory leak)
         we should set request.session pointer to each session when deleting sessions
         from session_container
         the session data were not properly destroyed when winix checked for 
         outdated sessions (and when it was removing them)
fixed:   performance (memcpy used too often)
         in some places there were reserve method used (on std::wstring/std::string objects)
         especially in AssignString() method and TextStream<> object
         if we add a new string we should check the new size
         and only call reserve() if the new size will be greater than existing one
         (plus some constant)
changed: fcgi objects moved to App class (from Request)
         now we use thread safe methods (e.g. FCGX_Accept_r)
added:   log_plugin_call option to the config
         default: false
         when true winix log when a plugin function is called
added:   winix parameter 'nostat' for not calculating statistics
         (useful when making performance tests)


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@680 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-11-23 21:52:25 +00:00
Tomasz Sowa 8e72a820dd added support for UTF-8
now the UTF-8 is a default charset


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@677 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-11-21 00:19:17 +00:00
Tomasz Sowa 7bc17a9202 fixed: ticket sets a default function only for directories
fixed: reading a new url and subject in Functions::ReadItem()
added: tickets are sorted now (by date)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@659 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-09-30 20:58:20 +00:00
Tomasz Sowa 1e7d297c0e small changes in template winix function
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@637 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-08-14 14:45:25 +00:00
Tomasz Sowa f3cd3b88b9 some improvement in templates
(now we have O(1) time for selecting the right html template)
added: winix function: template
for selecting a template for an item (file or dir)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@636 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-08-13 20:04:57 +00:00
Tomasz Sowa 9a199cd834 part II of rewriting
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@635 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-08-12 19:10:12 +00:00
Tomasz Sowa 9901c63ede removed some thread and ticket information from request
they are in FunThread and FunTicket classes now
added funtion FunUptime (I forgot about it)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@631 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-08-10 20:43:38 +00:00
Tomasz Sowa 217cf1420b the first part of reimplementing has been done
now we have app object and singletons are only: log logn plugin and app



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@628 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-08-10 16:12:50 +00:00
Tomasz Sowa 50cb88c5ed added: parameters consist of a name and a value now
sample: /dir/dir2/function/paramname:paramvalue
removed: TemplatesMisc namespace



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@618 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-07-04 20:27:14 +00:00
Tomasz Sowa 16bb238518 added: bbcode
files: core/bbcodeparser.h core/bbcodeparser.cpp


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@615 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-06-30 18:42:50 +00:00
Tomasz Sowa 6fbcffe63b added: to the Item: auth_path - a path to a static file (if auth is different from auth_none)
added: function 'mv' (move)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@596 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-03-15 01:47:26 +00:00
Tomasz Sowa ebd868fa33 removed: Done class (core/done.h, core/done.cpp)
removed: from Session: done, done_status, timers



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@594 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-02-28 21:33:06 +00:00
Tomasz Sowa 71a63cc70e added: function adduser
changed: errors (removed enum, there are macros now)
added: error messages to locales (winix_err_NN)
removed: templates: err_abuse.html err_others.html


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@593 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-02-28 00:08:10 +00:00
Tomasz Sowa 16e51cd4e5 added: to mount points: file systems
we have two file systems now:
       - simplefs - the files stored on the hard drive have the same structure as in the database (dir1/dir2/file)
       - hashfs - files are stored in special directories
extented: the mountparser can read file system 
added: function download
       this is a default function for items which have static content
  


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@588 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-02-18 23:30:22 +00:00
Tomasz Sowa 87747fab06 added: functions: chmod, chown
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@587 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-02-16 18:34:41 +00:00
Tomasz Sowa 89daf6489d added: issues ticket system
added functions: ticket, createticket, editticket
         (there is no 'rm' function working for tickets yet)
changed: mount parser and mount points
         now we have more parameters (arguments in parameters)
some refactoring in functions 'emacs' and 'mkdir'



git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@554 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-01-25 04:52:17 +00:00
Tomasz Sowa 3c95b84633 added: item content type: raw
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@549 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-01-11 14:47:52 +00:00
Tomasz Sowa 81faca041a added: parser for multipart forms, files: postmultiparser.h postmultiparser.cpp
added: function: upload




git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@543 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-01-06 19:17:53 +00:00
Tomasz Sowa 60fccea703 fixed: dots in url-es (now only one dot is available in the whole name and it cannot be only one dot ".")
added:   cmslu can act as an authorizer (fast cgi authorize role)
added:   Item::static_auth we can have additional static content on the file system
         this content is authorized through cmslu (fastcgi authorizer mode)
changed: some changes in config
changed: the way how the www server is using cmslu
         added new virtuals: static static_auth
changed: cmslu returns correct http headers (200, 404, 403)
changed: in cookie parser: we get the last cookie (if the server has more than one cookie with the same name)



git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@540 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-12-30 20:46:12 +00:00
Tomasz Sowa 118bf1fc65 added: exception for the Konqueror browser
it has a problem with deflate compression


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@539 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-12-19 19:46:15 +00:00
Tomasz Sowa 717eb526fb * added: class HTMLFilter
files: htmlfilter.h htmlfilter.cpp
         this is an html filter used to make the html output looking better
         this is a very lightweight filter
         (without using any dynamic memory - some memory is allocated only at the beginning - in ctors)
         this filter has O(n) complexity over the whole html string
* added: antyspamming method
         if the POST request is sent too fast after the GET
         it is treated as a spam
         only for no logged users and only in 'emacs' and 'createthread' functions
       


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@534 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-12-09 00:42:40 +00:00
Tomasz Sowa 4827c116f0 added: 'remember me' flag when logging
added: the session file
       sessions can still be available between starting and stopping the cmslu system


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@529 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-11-20 23:09:52 +00:00
Tomasz Sowa dc5f002de3 refactoring
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@523 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-11-17 01:04:01 +00:00
Tomasz Sowa 2ca44ec361 added: Rebus
(when no logged user wants to send a message then he is asked a question)


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@521 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-11-16 23:36:38 +00:00
Tomasz Sowa 7db71d43e0 added: acceptbaseparser.h acceptbaseparser.cpp
class AcceptBaseParser for parsing http accept* headers
added: acceptencodingparser.h
       class AcceptEncodingParser for parsing HTTP_ACCEPT_ENCODING header
added: compresion only when HTTP_ACCEPT_ENCODING has 'deflate'
       and the browser is not the Internet Explorer


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@515 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-10-08 17:59:10 +00:00
Tomasz Sowa 85b678a8fb added: notifications to users' emails
(core/notify.h core/notify.cpp)
       templatesnotify directory
       all notifications are managed by a second thread


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@512 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-09-30 22:31:20 +00:00
Tomasz Sowa 9902ce2b78 added: support for output compression
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@511 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-09-21 23:05:05 +00:00
Tomasz Sowa 1eb42446f8 added: forum
added: mount params can have arguments (in parentheses)
added: mount params: withheader, withinfo, restrictcreatethread, only_root_can_remove,
       can_use_emacs_on(level), can_use_mkdir_on(level), 
added: table Item has 'subject' column now
removed: column 'subject' from table Content




git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@505 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-06-05 20:29:06 +00:00
Tomasz Sowa 3d001e7458 added: macro APPPREPARE
void AppFunction(int code);



git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@503 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-05-21 19:27:16 +00:00
Tomasz Sowa 2dd3fc7df8 changed: the way of building
core.a content.a templates.a confparser.a have gone away
	 there is only: cmslu.a now (in the global directory 'cmslu')
changed: the way of building
         in Makefile(s) we dont longer use explicitly a variable 'o = file1.o file2.o...'
	 it was put into Makefile.o.dep and is generated automatically 
         when 'make depend' is invoked
changed: some #include "..." directives were put from *.h to *.cpp files
         fewer dependences


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@501 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-04-21 20:50:55 +00:00
Tomasz Sowa f46677dfc0 added: mount points have parameters now
added: to the database: table 'thread'



git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@499 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-04-20 23:49:28 +00:00
Tomasz Sowa 20f6fbcf84 changed: the way of building the cmslu
main Makefile is in an application directory
         in cmslu/ there are only libraries:
         core.a content.a confparser.a templates.a
added:   macros APPTEMPLATES APPFUNCTIONS
         defined in the application's Makefile
added:   PatternCacher
added:   cmslu function 'run'
         files which have exec permissions
         can be run (run is a default function)
         after read from the database the content is parsed
         into Ezc::Pattern object, this object is then cached
         in PatternCacher
added:   FunctionCodeParser - will be used to parse the code
         from standard functions (ls/cat/...)


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@475 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-01-26 20:49:28 +00:00
Tomasz Sowa 3e328932fc added: created directory 'content' which has Content:: files
added:   created directory 'templates' which has Templates:: and TemplatesFunctions:: files
changed: content.cpp split into many files (directory 'content')
changed: templates.cpp split into many files (directory 'templates')
added:   full permissions
changed: building of the program (GNU make is used now)
         Makefile and Makefile.dep added into directories
added:   a parser 'FunctionParser'
         is used to parse the GET string
         it recognizes directories, items, functions, functions parameters
added:   other classes: Function, Functions 
added:   function: ls, privileges
changed: function 'id' to 'node'
changed: version: to 0.2.0
added/changed: a lot of work have been done


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@469 e52654a7-88a9-db11-a3e9-0013d4bc506e
2008-12-30 01:05:03 +00:00
Tomasz Sowa fac60a197b changed: there is one dir called root (has parent_id -1)
(we have an owner, group, privileges etc of the root dir)
         the root.id of course is not -1 


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@468 e52654a7-88a9-db11-a3e9-0013d4bc506e
2008-12-22 16:03:03 +00:00
Tomasz Sowa 55cd813141 added: privileges (user, groups, permissions)
(not finished yet)
       classes: User, Group, Users, Groups, UGContainer
changed: Dir class into Dirs


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@467 e52654a7-88a9-db11-a3e9-0013d4bc506e
2008-12-21 21:17:09 +00:00
Tomasz Sowa 86f28faf8d changed: db: table item: url_subject into url
changed: item.url_subject into item.url
changed: a new table: content
         with: id, subject, content, content_type
         (those from the item table)
         it helps to create hard links


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@466 e52654a7-88a9-db11-a3e9-0013d4bc506e
2008-12-14 05:28:28 +00:00
Tomasz Sowa 023faa66fc added: config: base_url_redirect
when true the server checks whether HTTP_HOST environment variable
       is the same as base_url from the config (of course without the 'http://' part
       and the last slash) - if it's not the same then the server
       redirects you into a new location base_url+REQUEST_URI
changed: variables env_* from Request are never null (after Request::Read())
       if the server didn't set such a variable it will be pointing into an empty string "\0"


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@465 e52654a7-88a9-db11-a3e9-0013d4bc506e
2008-12-12 03:11:29 +00:00
Tomasz Sowa 8aab988752 added: program reads its configuration from a config file
added: confparser directory and confparser.h and confparser.cpp
       class ConfParser used to parse a config file
       this is a generic parser, can be used by another project
added: config.h, config.cpp
       class Config used for assigning values from 
       a config file into the data object
added: function for signals: SIGINT, SIGHUP
       after receiving SIGHUP the program will read
       its config file again


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@463 e52654a7-88a9-db11-a3e9-0013d4bc506e
2008-12-11 02:46:16 +00:00
Tomasz Sowa c53e985a92 import the first version of cmslu
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@460 e52654a7-88a9-db11-a3e9-0013d4bc506e
2008-12-10 04:42:49 +00:00