Uniformizing sql action table and calls
This commit is contained in:
parent
53d89c5016
commit
e9c44fe621
|
@ -91,7 +91,7 @@ class m_action {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* function archiving a directory ( upon account deletion )
|
* function archiving a directory ( upon account deletion )
|
||||||
* @param: $archive : directory to archive within the archive_del_data global variable folder if set.
|
* @param: $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.
|
* If archive_del_data is not set we delete the folder.
|
||||||
* @param: $dir : sub_directory of the archive directory
|
* @param: $dir : sub_directory of the archive directory
|
||||||
*/
|
*/
|
||||||
|
@ -138,13 +138,13 @@ class m_action {
|
||||||
$query="insert into actions values ('','MOVE','$serialized',now(),'','','$user','');";
|
$query="insert into actions values ('','MOVE','$serialized',now(),'','','$user','');";
|
||||||
break;
|
break;
|
||||||
case 'fix_user':
|
case 'fix_user':
|
||||||
$query="insert into actions values ('','FIXUSER','$serialized',now(),'','','$user','');";
|
$query="insert into actions values ('','FIX_USER','$serialized',now(),'','','$user','');";
|
||||||
break;
|
break;
|
||||||
case 'fix_file':
|
case 'fix_file':
|
||||||
$query="insert into actions values ('','FIXFILE','$serialized',now(),'','','$user','');";
|
$query="insert into actions values ('','FIX_FILE','$serialized',now(),'','','$user','');";
|
||||||
break;
|
break;
|
||||||
case 'fix_dir':
|
case 'fix_dir':
|
||||||
$query="insert into actions values ('','FIXDIR','$serialized',now(),'','','$user','');";
|
$query="insert into actions values ('','FIX_DIR','$serialized',now(),'','','$user','');";
|
||||||
break;
|
break;
|
||||||
case 'delete':
|
case 'delete':
|
||||||
$query="insert into actions values ('','DELETE','$serialized',now(),'','','$user','');";
|
$query="insert into actions values ('','DELETE','$serialized',now(),'','','$user','');";
|
||||||
|
@ -152,6 +152,7 @@ class m_action {
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
printvar($query);
|
||||||
if(!$db->query($query)){
|
if(!$db->query($query)){
|
||||||
$err->raise("action",_("Error setting actions"));
|
$err->raise("action",_("Error setting actions"));
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -733,7 +733,7 @@ CREATE TABLE IF NOT EXISTS `vm_history` (
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `actions` (
|
CREATE TABLE IF NOT EXISTS `actions` (
|
||||||
id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
type enum ('CREATE_FILE','FIX_USER','CREATE_DIR','DELETE','MOVE','FIXDIR','FIXFILE'),
|
type enum ('CREATE_FILE','FIX_USER','CREATE_DIR','DELETE','MOVE','FIX_DIR','FIX_FILE'),
|
||||||
parameters longtext default NULL,
|
parameters longtext default NULL,
|
||||||
creation timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
creation timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
begin timestamp,
|
begin timestamp,
|
||||||
|
|
Loading…
Reference in New Issue