From c7f0b83c0da6f807f5859d5d666c1dfd009019b9 Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Tue, 06 Nov 2012 10:11:11 -0500 Subject: [PATCH] Implemented: FS#2437 - iterate_query in dovecot-sql.conf is missing The query is added for reference and is commented out by default as it is not compatible with dovecot 1.2 and not required by ispconfig. --- server/mods-available/database_module.inc.php | 28 ++++++++++++++++++++++++++-- 1 files changed, 26 insertions(+), 2 deletions(-) diff --git a/server/mods-available/database_module.inc.php b/server/mods-available/database_module.inc.php index 740e8f8..c3a99b6 100644 --- a/server/mods-available/database_module.inc.php +++ b/server/mods-available/database_module.inc.php @@ -1,7 +1,7 @@ <?php /* -Copyright (c) 2008, Till Brehm, projektfarm Gmbh +Copyright (c) 2007, Till Brehm, projektfarm Gmbh All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -34,8 +34,24 @@ var $class_name = 'database_module'; var $actions_available = array( 'database_insert', 'database_update', - 'database_delete' + 'database_delete', + 'database_user_insert', + 'database_user_update', + 'database_user_delete' ); + + //* This function is called during ispconfig installation to determine + // if a symlink shall be created for this plugin. + function onInstall() { + global $conf; + + if($conf['services']['db'] == true) { + return true; + } else { + return false; + } + + } /* This function is called when the module is loaded @@ -62,6 +78,7 @@ */ $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'); @@ -82,6 +99,13 @@ 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 -- Gitblit v1.9.1