From f4038a2160d55a7f519a3b42be1aa96e29e9a908 Mon Sep 17 00:00:00 2001 From: ftimme <ft@falkotimme.com> Date: Wed, 27 Feb 2013 09:01:40 -0500 Subject: [PATCH] - Fixed "FUNCTION databasename.CONCAT does not exist" error for older MySQL versions. --- 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