X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=plugins%2Ffilters%2Fsetup.php;h=318ca68795e29d05d3ce65ced552eb9d1efca02e;hb=f8a1ed5aa365d515e4e2ac3602f900bfb9447fce;hp=aee73927645d2b28cec5aa6369b18bef6c7df8fb;hpb=eec8160076a4381b54b3c1ee0266d436721319f8;p=squirrelmail.git diff --git a/plugins/filters/setup.php b/plugins/filters/setup.php index aee73927..318ca687 100644 --- a/plugins/filters/setup.php +++ b/plugins/filters/setup.php @@ -1,94 +1,60 @@ _("Message Filters"), - 'url' => '../plugins/filters/options.php', - 'desc' => _("Filtering enables messages with different criteria to be automatically filtered into different folders for easier organization."), - 'js' => false - ); - - if ($AllowSpamFilters) { - $optpage_blocks[] = array( - 'name' => _("SPAM Filters"), - 'url' => '../plugins/filters/spamoptions.php', - 'desc' => _("SPAM filters allow you to select from various DNS based blacklists to detect junk email in your INBOX and move it to another folder (like Trash)."), - 'js' => false - ); - } - } -?> +/** + * Message and Spam Filter Plugin - Setup + * + * @version $Id$ + * @copyright (c) 1999-2005 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + * @package plugins + * @subpackage filters + */ + +/** + * Init plugin + * @access private + */ +function squirrelmail_plugin_init_filters() { + include_once(SM_PATH . 'plugins/filters/filters.php'); + filters_init_hooks (); +} + +/** + * Report spam folder as special mailbox + * @param string $mb variable used by hook + * @return string spam folder name + * @access private + */ +function filters_special_mailbox( $mb ) { + global $data_dir, $username; + return( $mb == getPref($data_dir, $username, 'filters_spam_folder', 'na' ) ); +} + +/** + * Called by hook to Register option blocks + * @access private + */ +function filters_optpage_register_block_hook() { + include_once(SM_PATH . 'plugins/filters/filters.php'); + filters_optpage_register_block (); +} + +/** + * Called by hook to Start Filtering + * @param mixed $args optional variable passed by hook + * @access private + */ +function start_filters_hook($args) { + include_once(SM_PATH . 'plugins/filters/filters.php'); + start_filters (); +} + +/** + * Called by hook to Update filters when Folders Change + * @access private + */ +function update_for_folder_hook($args) { + include_once(SM_PATH . 'plugins/filters/filters.php'); + update_for_folder ($args); +} + +?> \ No newline at end of file