fsf changes, meant to be rebased on upstream
[squirrelmail.git] / plugins / spamcop / setup.php
CommitLineData
772be735 1<?php
4b4abf93 2
91e0dccc 3/**
f3a91d6b 4 * setup.php -- SpamCop plugin - setup script
5 *
c997cbe6 6 * @copyright 1999-2021 The SquirrelMail Project Team
f3a91d6b 7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
8 * @version $Id$
9 * @package plugins
10 * @subpackage spamcop
11 */
772be735 12
f3a91d6b 13/**
91e0dccc 14 * Initialize the plugin
f3a91d6b 15 * @access private
16 */
772be735 17function squirrelmail_plugin_init_spamcop() {
9f06a087 18 global $squirrelmail_plugin_hooks;
772be735 19
91e0dccc 20 $squirrelmail_plugin_hooks['optpage_register_block']['spamcop'] =
21 'spamcop_options';
22 $squirrelmail_plugin_hooks['loading_prefs']['spamcop'] =
23 'spamcop_load';
24 $squirrelmail_plugin_hooks['read_body_header_right']['spamcop'] =
25 'spamcop_show_link';
9f06a087 26 $squirrelmail_plugin_hooks['compose_send']['spamcop'] =
27 'spamcop_while_sending';
772be735 28}
29
9a422982 30/**
31 * Loads spamcop settings and validates some of values (make '' into 'default', etc.)
f3a91d6b 32 * @access private
9a422982 33 */
772be735 34function spamcop_load() {
da297dd0 35 include_once(SM_PATH . 'plugins/spamcop/functions.php');
36 spamcop_load_function();
772be735 37}
38
39
9a422982 40/**
41 * Shows spamcop link on the read-a-message screen
f3a91d6b 42 * @access private
9a422982 43 */
7dc06407 44function spamcop_show_link(&$links) {
da297dd0 45 include_once(SM_PATH . 'plugins/spamcop/functions.php');
7dc06407 46 spamcop_show_link_function($links);
772be735 47}
48
9a422982 49/**
50 * Show spamcop options block
f3a91d6b 51 * @access private
9a422982 52 */
9f06a087 53function spamcop_options() {
da297dd0 54 include_once(SM_PATH . 'plugins/spamcop/functions.php');
55 spamcop_options_function();
772be735 56}
57
58
9a422982 59/**
da297dd0 60 * Process messages submitted by email
f3a91d6b 61 * @access private
9a422982 62 */
9f06a087 63function spamcop_while_sending() {
da297dd0 64 include_once(SM_PATH . 'plugins/spamcop/functions.php');
65 spamcop_while_sending_function();
772be735 66}