From 7d52e00a51450bc4a080d4e21b7dda02c0a65191 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Thu, 14 Nov 2013 05:42:06 -0500
Subject: [PATCH] Fixed list sorting
---
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