Alternc
latest
Alternc logiel libre pour l'hébergement
|
This class manage actions to be performed on the file system on behalf of alternc Classes It primary use is to store the actions to be performed ( creating file or folder, deleting, setting permissions etc..) in the action sql table. More...
Public Member Functions | |
do_action () | |
Tell the incron that an action should be performed. More... | |
create_file ($file, $content="", $user="root") | |
Plans a file creation. More... | |
chmod ($filename, $perms, $user="root") | |
Plans the a chmod on file or dir. More... | |
create_dir ($dir, $user="root") | |
Plans the creation of a dir. More... | |
fix_user ($uid, $user="root") | |
Plans a perms fix upon user creation. More... | |
fix_dir ($dir, $user="root") | |
Plans a dir permission fix. More... | |
fix_file ($file, $user="root") | |
Plans a file permission fix. More... | |
del ($dir, $user="root") | |
function to delete file / folder More... | |
move ($src, $dst, $user="root") | |
function returning the first not locked line of the action table More... | |
archive ($archive, $dir="html") | |
function archiving a directory ( upon account deletion ) More... | |
set ($type, $user, $parameters) | |
function inserting the action in the sql table More... | |
get_old () | |
This seems to be unused ? More... | |
purge ($all=null) | |
get_action () | |
function returning the first not locked line of the action table More... | |
begin ($id) | |
function locking an entry while it is being executed by the action script More... | |
finish ($id, $return=0) | |
function locking an entry while it is being executed by the action script More... | |
reset_job ($id) | |
get_job () | |
Returns a list of actions marked as executable and ready for execution. More... | |
cancel ($id) | |
function locking an entry while it is being executed by the action script More... | |
This class manage actions to be performed on the file system on behalf of alternc Classes It primary use is to store the actions to be performed ( creating file or folder, deleting, setting permissions etc..) in the action sql table.
The script /usr/lib/alternc/do_actions.php handled by cron and incron is then used to perform those actions.
Definition at line 28 of file m_action.php.
m_action::archive | ( | $archive, | |
$dir = "html" |
|||
) |
function archiving a directory ( upon account deletion )
global | int $cuid | |
global | m_mysql $db | |
global | m_messages $msg | |
string | $archive | Directory to archive within the archive_del_data folder if set in variable sql table If archive_del_data is not set we delete the folder |
string | $dir | sub_directory of the archive directory |
Definition at line 158 of file m_action.php.
References $cuid, $db, $msg, del(), move(), and variable_get().
m_action::begin | ( | $id | ) |
function locking an entry while it is being executed by the action script
global | m_mysql $db | |
global | m_messages $msg | |
int | $id |
Definition at line 290 of file m_action.php.
m_action::cancel | ( | $id | ) |
function locking an entry while it is being executed by the action script
global | m_mysql $db | |
int | $id |
Definition at line 363 of file m_action.php.
m_action::chmod | ( | $filename, | |
$perms, | |||
$user = "root" |
|||
) |
Plans the a chmod on file or dir.
string | $filename | |
int | $perms | |
string | $user |
Definition at line 69 of file m_action.php.
References $user.
m_action::create_dir | ( | $dir, | |
$user = "root" |
|||
) |
Plans the creation of a dir.
string | $dir | |
int | $user |
Definition at line 81 of file m_action.php.
References $user.
m_action::create_file | ( | $file, | |
$content = "" , |
|||
$user = "root" |
|||
) |
Plans a file creation.
string | $file | |
string | $content | |
int | $user |
Definition at line 56 of file m_action.php.
m_action::del | ( | $dir, | |
$user = "root" |
|||
) |
function to delete file / folder
string | $dir | |
m_user | $user |
Definition at line 128 of file m_action.php.
References $user.
Referenced by archive().
m_action::do_action | ( | ) |
Tell the incron that an action should be performed.
global | m_messages $msg |
global | string $L_INOTIFY_DO_ACTION |
Definition at line 38 of file m_action.php.
References $msg.
Referenced by set().
m_action::finish | ( | $id, | |
$return = 0 |
|||
) |
function locking an entry while it is being executed by the action script
global | m_mysql $db | |
global | m_messages $msg | |
int | $id | |
integer | $return |
Definition at line 309 of file m_action.php.
References $db, $id, and $msg.
Referenced by cancel().
m_action::fix_dir | ( | $dir, | |
$user = "root" |
|||
) |
Plans a dir permission fix.
string | $dir | |
m_user | $user |
Definition at line 104 of file m_action.php.
References $user.
m_action::fix_file | ( | $file, | |
$user = "root" |
|||
) |
Plans a file permission fix.
string | $file | |
m_user | $user |
Definition at line 116 of file m_action.php.
References $user.
m_action::fix_user | ( | $uid, | |
$user = "root" |
|||
) |
Plans a perms fix upon user creation.
int | $uid | |
string | $user |
Definition at line 92 of file m_action.php.
m_action::get_action | ( | ) |
function returning the first not locked line of the action table
global | m_mysql $db |
Definition at line 268 of file m_action.php.
m_action::get_job | ( | ) |
Returns a list of actions marked as executable and ready for execution.
global | m_mysql $db |
global | m_messages $msg |
Definition at line 343 of file m_action.php.
m_action::get_old | ( | ) |
This seems to be unused ?
global | m_messages $msg |
global | m_mysql $db |
Definition at line 226 of file m_action.php.
m_action::move | ( | $src, | |
$dst, | |||
$user = "root" |
|||
) |
function returning the first not locked line of the action table
string | $src | |
string | $dst | |
m_user | $user |
Definition at line 141 of file m_action.php.
References $user.
Referenced by archive().
m_action::purge | ( | $all = null | ) |
global | m_messages $msg | |
global | m_mysql $db | |
type | $all |
Definition at line 246 of file m_action.php.
m_action::reset_job | ( | $id | ) |
global | m_mysql $db | |
global | m_messages $msg | |
int | $id |
Definition at line 326 of file m_action.php.
m_action::set | ( | $type, | |
$user, | |||
$parameters | |||
) |
function inserting the action in the sql table
global | m_mysql $db | |
global | m_messages $msg | |
string | $type | |
string | integer | $user | wich user do we impersonate? |
mixed | $parameters |
Definition at line 193 of file m_action.php.
References $db, $msg, $query, and do_action().