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