Commit acf18c35 authored by tbrehm's avatar tbrehm

Prepared server events for new web_database_user table.

parent 41eaa874
......@@ -75,6 +75,7 @@ class database_module {
*/
$app->modules->registerTableHook('web_database','database_module','process');
//$app->modules->registerTableHook('web_database_user','database_module','process');
// Register service
//$app->services->registerService('httpd','web_module','restartHttpd');
......@@ -95,6 +96,13 @@ class database_module {
if($action == 'u') $app->plugins->raiseEvent('database_update',$data);
if($action == 'd') $app->plugins->raiseEvent('database_delete',$data);
break;
/*
case 'web_database_user':
if($action == 'i') $app->plugins->raiseEvent('database_user_insert',$data);
if($action == 'u') $app->plugins->raiseEvent('database_user_update',$data);
if($action == 'd') $app->plugins->raiseEvent('database_user_delete',$data);
break;
*/
} // end switch
} // end function
......
......@@ -58,11 +58,16 @@ class mysql_clientdb_plugin {
Register for the events
*/
//* Mailboxes
//* Databases
$app->plugins->registerEvent('database_insert',$this->plugin_name,'db_insert');
$app->plugins->registerEvent('database_update',$this->plugin_name,'db_update');
$app->plugins->registerEvent('database_delete',$this->plugin_name,'db_delete');
//* Database users
//$app->plugins->registerEvent('database_user_insert',$this->plugin_name,'db_user_insert');
//$app->plugins->registerEvent('database_user_update',$this->plugin_name,'db_user_update');
//$app->plugins->registerEvent('database_user_delete',$this->plugin_name,'db_user_delete');
}
......@@ -305,7 +310,22 @@ class mysql_clientdb_plugin {
}
/*
function db_user_insert($event_name,$data) {
global $app, $conf;
}
function db_user_update($event_name,$data) {
global $app, $conf;
}
function db_user_delete($event_name,$data) {
global $app, $conf;
}
*/
} // end class
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment