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