Patches from Michael Long
[squirrelmail.git] / plugins / filters / setup.php
CommitLineData
849bdf42 1<?php
4b4abf93 2
15e6162e 3/**
15d98101 4 * Message and Spam Filter Plugin - Setup
5 *
47ccfad4 6 * @copyright &copy; 1999-2006 The SquirrelMail Project Team
b2d8bc6c 7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
4b4abf93 8 * @version $Id$
ea5f4b8e 9 * @package plugins
10 * @subpackage filters
15e6162e 11 */
849bdf42 12
0a1dc88e 13/**
14 * Init plugin
15 * @access private
16 */
10a26cea 17function squirrelmail_plugin_init_filters() {
8510adf2 18 include_once(SM_PATH . 'plugins/filters/filters.php');
9c655416 19 filters_init_hooks ();
10a26cea 20}
a2a566eb 21
0a1dc88e 22/**
0d725b45 23 * Report spam folder as special mailbox
0a1dc88e 24 * @param string $mb variable used by hook
25 * @return string spam folder name
91e0dccc 26 * @access private
0a1dc88e 27 */
10a26cea 28function filters_special_mailbox( $mb ) {
0a1dc88e 29 global $data_dir, $username;
10a26cea 30 return( $mb == getPref($data_dir, $username, 'filters_spam_folder', 'na' ) );
10a26cea 31}
849bdf42 32
0a1dc88e 33/**
9c655416 34 * Called by hook to Register option blocks
0a1dc88e 35 * @access private
36 */
9c655416 37function filters_optpage_register_block_hook() {
8510adf2 38 include_once(SM_PATH . 'plugins/filters/filters.php');
9c655416 39 filters_optpage_register_block ();
40}
849bdf42 41
9c655416 42/**
43 * Called by hook to Start Filtering
44 * @param mixed $args optional variable passed by hook
45 * @access private
46 */
47function start_filters_hook($args) {
8510adf2 48 include_once(SM_PATH . 'plugins/filters/filters.php');
9c655416 49 start_filters ();
50}
eec81600 51
9c655416 52/**
53 * Called by hook to Update filters when Folders Change
54 * @access private
55 */
6921d585 56function update_for_folder_hook($args) {
8510adf2 57 include_once(SM_PATH . 'plugins/filters/filters.php');
6921d585 58 update_for_folder ($args);
10a26cea 59}
9c655416 60
91e0dccc 61?>