Sanitize integer option fields - only digits allowed
[squirrelmail.git] / plugins / mail_fetch / setup.php
CommitLineData
d622d38a 1<?php
4b4abf93 2
4f51df66 3/**
4 * mail_fetch/setup.php
5 *
4f51df66 6 * Setup of the mailfetch plugin.
7 *
ae5dddc0 8 * @copyright 1999-2011 The SquirrelMail Project Team
4b4abf93 9 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
4f51df66 10 * @version $Id$
11 * @package plugins
12 * @subpackage mail_fetch
13 */
14
4f51df66 15/**
16 * Initialize the plugin
17 */
18function squirrelmail_plugin_init_mail_fetch() {
19 global $squirrelmail_plugin_hooks;
20
09b143cc 21 $squirrelmail_plugin_hooks['template_construct_page_header.tpl']['mail_fetch'] = 'mail_fetch_link';
4f51df66 22 $squirrelmail_plugin_hooks['login_verified']['mail_fetch'] = 'mail_fetch_setnew';
23 $squirrelmail_plugin_hooks['left_main_before']['mail_fetch'] = 'mail_fetch_login';
24 $squirrelmail_plugin_hooks['optpage_register_block']['mail_fetch'] = 'mailfetch_optpage_register_block';
5f438206 25 $squirrelmail_plugin_hooks['rename_or_delete_folder']['mail_fetch'] = 'mail_fetch_folderact';
4f51df66 26}
27
60683821 28/**
29 * display link in menu line
30 * @private
31 */
4f51df66 32function mail_fetch_link() {
09b143cc 33 include_once (SM_PATH . 'plugins/mail_fetch/functions.php');
34 return mail_fetch_link_do();
4f51df66 35}
36
60683821 37/**
38 * Fetch pop3 mails on login.
39 * @private
40 */
4f51df66 41function mail_fetch_login() {
60683821 42 include_once (SM_PATH . 'plugins/mail_fetch/functions.php');
43 mail_fetch_login_function();
4f51df66 44}
d622d38a 45
60683821 46/**
47 * Adds preference that is used to detect new logins
48 * @private
49 */
4f51df66 50function mail_fetch_setnew() {
60683821 51 include_once (SM_PATH . 'plugins/mail_fetch/functions.php');
52 mail_fetch_setnew_function();
4f51df66 53}
d622d38a 54
60683821 55/**
56 * Add plugin option block
57 * @private
58 */
4f51df66 59function mailfetch_optpage_register_block() {
60683821 60 include_once (SM_PATH . 'plugins/mail_fetch/functions.php');
61 mailfetch_optpage_register_block_function();
4f51df66 62}
d622d38a 63
60683821 64/**
65 * Update mail_fetch settings when folders are renamed or deleted.
66 * @since 1.5.1 and 1.4.5
67 * @private
68 */
5f438206 69function mail_fetch_folderact($args) {
60683821 70 include_once (SM_PATH . 'plugins/mail_fetch/functions.php');
71 mail_fetch_folderact_function($args);
5f438206 72}