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