drop some unneeded globals / variables
[squirrelmail.git] / plugins / filters / setup.php
index 1dcd1e921b99d2a53265325e270f96c5a43b37c3..782e1ac587bce7efa62ea514c3b19e0c33e4726d 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * Message and Spam Filter Plugin - Setup
  *
- * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @copyright © 1999-2007 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
  * @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';
 }
 
 /**
@@ -46,7 +53,7 @@ function filters_optpage_register_block_hook() {
  */
 function start_filters_hook($args) {
     include_once(SM_PATH . 'plugins/filters/filters.php');
-    start_filters ();
+    start_filters ($args);
 }
 
 /**
@@ -57,5 +64,3 @@ function update_for_folder_hook($args) {
     include_once(SM_PATH . 'plugins/filters/filters.php');
     update_for_folder ($args);
 }
-
-?>
\ No newline at end of file