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