Happy 2014
[squirrelmail.git] / plugins / filters / setup.php
index 8797acffcb8d04b983fce0f25534fcdf8367253f..878a7538c3a4b54ad0a2ac72d0201a4e7eb73e40 100644 (file)
@@ -1,8 +1,11 @@
 <?php
+
 /**
- * @version $Id$
- * @copyright (c) 1999-2005 The SquirrelMail Project Team
+ * Message and Spam Filter Plugin - Setup
+ *
+ * @copyright 1999-2014 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
  * @package plugins
  * @subpackage filters
  */
  * @access private
  */
 function squirrelmail_plugin_init_filters() {
-    @include_once(SM_PATH . 'plugins/filters/filters.php');
-    filters_init_hooks ();
+    global $squirrelmail_plugin_hooks;
+
+    $squirrelmail_plugin_hooks['left_main_before']['filters'] = 'start_filters_hook';
+    $squirrelmail_plugin_hooks['right_main_after_header']['filters'] = 'start_filters_hook';
+    $squirrelmail_plugin_hooks['optpage_register_block']['filters'] = 'filters_optpage_register_block_hook';
+    $squirrelmail_plugin_hooks['special_mailbox']['filters'] = 'filters_special_mailbox';
+    $squirrelmail_plugin_hooks['rename_or_delete_folder']['filters'] = 'update_for_folder_hook';
+    $squirrelmail_plugin_hooks['template_construct_login_webmail.tpl']['filters'] = 'start_filters_hook';
+    $squirrelmail_plugin_hooks['folder_status']['filters'] = 'filters_folder_status';
 }
 
 /**
@@ -32,7 +42,7 @@ function filters_special_mailbox( $mb ) {
  * @access private
  */
 function filters_optpage_register_block_hook() {
-    @include_once(SM_PATH . 'plugins/filters/filters.php');
+    include_once(SM_PATH . 'plugins/filters/filters.php');
     filters_optpage_register_block ();
 }
 
@@ -42,17 +52,15 @@ function filters_optpage_register_block_hook() {
  * @access private
  */
 function start_filters_hook($args) {
-    @include_once(SM_PATH . 'plugins/filters/filters.php');
-    start_filters ();
+    include_once(SM_PATH . 'plugins/filters/filters.php');
+    start_filters ($args);
 }
 
 /**
  * Called by hook to Update filters when Folders Change
  * @access private
  */
-function update_for_folder_hook() {
-    @include_once(SM_PATH . 'plugins/filters/filters.php');
-    update_for_folder ();
+function update_for_folder_hook($args) {
+    include_once(SM_PATH . 'plugins/filters/filters.php');
+    update_for_folder ($args);
 }
-
-?>
\ No newline at end of file