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
This commit is contained in:
@@ -29,121 +29,137 @@
|
||||
// winix function and parameters have been parsed
|
||||
// the request.status is OK
|
||||
// (the winix function was not called yet)
|
||||
#define WINIX_PREPARE_REQUEST 2000
|
||||
#define WINIX_PREPARE_REQUEST 20000
|
||||
|
||||
// post and get functions have done their jobs
|
||||
// now you can act
|
||||
// this is called only if the request.status is OK
|
||||
#define WINIX_PROCESS_REQUEST 2001
|
||||
#define WINIX_PROCESS_REQUEST 20010
|
||||
|
||||
// prepere your content for displaying
|
||||
// this is called after WINIX_PROCESS_REQUEST
|
||||
// and when there is not a redirect
|
||||
// request.status is not checked here
|
||||
#define WINIX_CONTENT_MAKE 2002
|
||||
#define WINIX_CONTENT_MAKE 20020
|
||||
|
||||
// here you can attach your own session data (based on PluginDataBase class)
|
||||
// call cur->session->plugin_data.Assign(pointer)
|
||||
#define WINIX_SESSION_CREATED 3000
|
||||
#define WINIX_SESSION_CREATED 30000
|
||||
|
||||
// here you should remove your session data
|
||||
// this message can be sent even if you don't assing your plugin data
|
||||
#define WINIX_SESSION_REMOVE 3001
|
||||
#define WINIX_SESSION_REMOVE 30010
|
||||
|
||||
// when a session is changed (you can save a pointer to your data here)
|
||||
#define WINIX_SESSION_CHANGED 3002
|
||||
#define WINIX_SESSION_CHANGED 30020
|
||||
|
||||
// the winix is closing
|
||||
// the is not any session available (cur->session is null)
|
||||
#define WINIX_CLOSE 3004
|
||||
#define WINIX_CLOSE 30040
|
||||
|
||||
// preparing to remove a file (rm function)
|
||||
// in p1 you have a pointer to the Item struct (file)
|
||||
// valid members are:
|
||||
// id, parent_id, type, url, file_path, file_fs, file_type, has_thumb, hash, hash_type, file_size
|
||||
// user_id, group_id, privileges
|
||||
// (sometimes rest members can be valid as well -- when you call directly fun_rm->RemoveFileOrSymlink() method)
|
||||
#define WINIX_FILE_PREPARE_TO_REMOVE 30045
|
||||
|
||||
// a file or symlink was removed (rm function)
|
||||
// in p1 you have a pointer to the Item struct (old file)
|
||||
#define WINIX_FILE_REMOVED 3005
|
||||
|
||||
// directory was removed (rm function)
|
||||
// PluginInfo::l1 is the dir id
|
||||
#define WINIX_DIR_REMOVED 3006
|
||||
// valid members are the same as in WINIX_FILE_PREPARE_TO_REMOVE
|
||||
#define WINIX_FILE_REMOVED 30050
|
||||
|
||||
// preparing to remove a directory (rm function)
|
||||
// in p1 you have a pointer to the Item struct (directory)
|
||||
#define WINIX_DIR_PREPARE_TO_REMOVE 3007
|
||||
// this message is sent after checking the directory permissions
|
||||
// so consequently if there is no any database error then the
|
||||
// directory will be removed
|
||||
// and after removed WINIX_DIR_REMOVED message is sent
|
||||
#define WINIX_DIR_PREPARE_TO_REMOVE 30070
|
||||
|
||||
// directory was removed (rm function)
|
||||
// PluginInfo::l1 is the directory id
|
||||
#define WINIX_DIR_REMOVED 30060
|
||||
|
||||
// winix is initialized,
|
||||
// now you can initialize your plugin
|
||||
#define WINIX_PLUGIN_INIT 3008
|
||||
#define WINIX_PLUGIN_INIT 30080
|
||||
|
||||
// here you can add your own mount point, file systems, mount parameters
|
||||
// for adding a new mount type call: system->mounts.AddMountType("new_mount_name")
|
||||
#define WINIX_ADD_MOUNTS 3009
|
||||
#define WINIX_ADD_MOUNTS 30090
|
||||
|
||||
// add plugin functions (winix functions) here
|
||||
// call info.functions->Add() to add a function
|
||||
#define WINIX_CREATE_FUNCTIONS 3010
|
||||
#define WINIX_CREATE_FUNCTIONS 30100
|
||||
|
||||
// choose a default function
|
||||
// if you do not select it then it will be choosen by winix
|
||||
#define WINIX_SELECT_DEFAULT_FUNCTION 3011
|
||||
#define WINIX_SELECT_DEFAULT_FUNCTION 30110
|
||||
|
||||
// /etc/fstab has been changed
|
||||
// now we have new mount points
|
||||
#define WINIX_FSTAB_CHANGED 3012
|
||||
#define WINIX_FSTAB_CHANGED 30120
|
||||
|
||||
// here you add your own template to notification system
|
||||
// call system->notify.AddTemplate() method
|
||||
// with a template file name
|
||||
#define WINIX_NOTIFY_ADD_TEMPLATE 3013
|
||||
#define WINIX_NOTIFY_ADD_TEMPLATE 30130
|
||||
|
||||
// the request is being ended
|
||||
// you can clear some of your objects here
|
||||
#define WINIX_END_REQUEST 3014
|
||||
#define WINIX_END_REQUEST 30140
|
||||
|
||||
// a new file (page) has been added
|
||||
// in p1 you have a pointer to the Item struct
|
||||
#define WINIX_FILE_ADDED 3015
|
||||
#define WINIX_FILE_ADDED 30150
|
||||
|
||||
// a file (page) has been changed (edited)
|
||||
// in p1 you have a pointer to the Item struct
|
||||
#define WINIX_FILE_CHANGED 3016
|
||||
#define WINIX_FILE_CHANGED 30160
|
||||
|
||||
// a file (page) has been copied
|
||||
// in p1 you have a pointer to the Item struct
|
||||
// not every fields of Item struct are filled
|
||||
#define WINIX_FILE_COPIED 3017
|
||||
#define WINIX_FILE_COPIED 30170
|
||||
|
||||
// a file will be moved
|
||||
// in p1 you have a pointer to the Item struct
|
||||
// not every fields of Item struct are filled
|
||||
#define WINIX_FILE_PREPARE_TO_MOVE 3018
|
||||
// valid members are:
|
||||
// id, parent_id, type, url, file_path, file_fs, file_type, has_thumb, hash, hash_type, file_size
|
||||
// user_id, group_id, privileges, meta
|
||||
// (sometimes rest members can be valid as well -- when you call directly fun_rm->RemoveFileOrSymlink() method)
|
||||
#define WINIX_FILE_PREPARE_TO_MOVE 30180
|
||||
|
||||
// a file has been moved
|
||||
// in p1 you have a pointer to the Item struct (new file)
|
||||
// not every fields of Item struct are filled
|
||||
#define WINIX_FILE_MOVED 3019
|
||||
// valid members are the same as in WINIX_FILE_PREPARE_TO_MOVE
|
||||
#define WINIX_FILE_MOVED 30190
|
||||
|
||||
// a thumbnail was created
|
||||
// this message is called from another thread
|
||||
// the thread is called Lock() before sending this message
|
||||
// in p1 you have a pointer to the Item struct
|
||||
#define WINIX_CREATED_THUMB 3050
|
||||
#define WINIX_CREATED_THUMB 30500
|
||||
|
||||
// an image has been resized
|
||||
// this message is called from another thread
|
||||
// the thread is called Lock() before sending this message
|
||||
// in p1 you have a pointer to the Item struct
|
||||
#define WINIX_IMAGE_RESIZED 3052
|
||||
#define WINIX_IMAGE_RESIZED 30520
|
||||
|
||||
// content of a directory was sorted
|
||||
// (winix 'sort' function was used)
|
||||
// in p1 you have a pointer to the Item struct (of the directory)
|
||||
// this is from system->dirs so you should not change the item
|
||||
#define WINIX_DIR_CONTENT_SORTED 3050
|
||||
#define WINIX_DIR_CONTENT_SORTED 30500
|
||||
|
||||
// a user has been logged
|
||||
// send from 'login' winix function
|
||||
// this message is also called when winix starts and reads sessions
|
||||
// from the session file
|
||||
#define WINIX_USER_LOGGED 3060
|
||||
#define WINIX_USER_LOGGED 30600
|
||||
|
||||
|
||||
// here you add your own html templates
|
||||
@@ -154,7 +170,7 @@
|
||||
// the message will be sent too whenever 'reload/templates' winix function is called
|
||||
// templates you should add only in this message
|
||||
// in other cases after 'reload' function the indexes would be wrong
|
||||
#define WINIX_ADD_TEMPLATE 3100
|
||||
#define WINIX_ADD_TEMPLATE 31000
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user