Prepared server events for new web_database_user table.
| | |
| | | */ |
| | | |
| | | $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'); |
| | |
| | | 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 |
| | | |
| | |
| | | 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'); |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | /* |
| | | 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 |