From 32b40db8d2e799588bb78e8c07cb70105e4e5d8e Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 28 May 2007 17:07:54 -0400
Subject: [PATCH] Added getmail module.

---
 server/mods-enabled/mail_module.inc.php |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/server/mods-available/mail_module.inc.php b/server/mods-enabled/mail_module.inc.php
similarity index 89%
rename from server/mods-available/mail_module.inc.php
rename to server/mods-enabled/mail_module.inc.php
index 0f13f05..e1dfe08 100644
--- a/server/mods-available/mail_module.inc.php
+++ b/server/mods-enabled/mail_module.inc.php
@@ -46,20 +46,24 @@
 									'mail_forwarding_delete',
 									'mail_transport_insert',
 									'mail_transport_update',
-									'mail_transport_delete');
+									'mail_transport_delete',
+									'mail_get_insert',
+									'mail_get_update',
+									'mail_get_delete');
 	
 	/*
 	 	This function is called when the module is loaded
 	*/
 	
 	function onLoad() {
+		global $app;
 		
 		/*
 		Annonce the actions that where provided by this module, so plugins 
 		can register on them.
 		*/
 		
-		$app->plugins->registerEvents($this->module_name,$this->actions_available);
+		$app->plugins->announceEvents($this->module_name,$this->actions_available);
 		
 		/*
 		As we want to get notified of any changes on several database tables,
@@ -76,6 +80,7 @@
 		$app->modules->registerTableHook('mail_forwarding','mail_module','process');
 		$app->modules->registerTableHook('mail_transport','mail_module','process');
 		$app->modules->registerTableHook('mail_user','mail_module','process');
+		$app->modules->registerTableHook('mail_get','mail_module','process');
 		
 	}
 	
@@ -113,6 +118,11 @@
 				if($action == 'u') $app->plugins->raiseEvent('mail_user_update',$data);
 				if($action == 'd') $app->plugins->raiseEvent('mail_user_delete',$data);
 			break;
+			case 'mail_get':
+				if($action == 'i') $app->plugins->raiseEvent('mail_get_insert',$data);
+				if($action == 'u') $app->plugins->raiseEvent('mail_get_update',$data);
+				if($action == 'd') $app->plugins->raiseEvent('mail_get_delete',$data);
+			break;
 		} // end switch
 	} // end function
 

--
Gitblit v1.9.1