<?php
+
/**
- * @version $Id$
- * @copyright (c) 1999-2005 The SquirrelMail Project Team
+ * Message and Spam Filter Plugin - Setup
+ *
+ * @copyright 1999-2009 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';
}
/**
* @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 ();
}
* @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