removed local directory name used for testing.
[squirrelmail.git] / plugins / mail_fetch / setup.php
CommitLineData
d622d38a 1<?php
4f51df66 2/**
3 * mail_fetch/setup.php
4 *
5 * Copyright (c) 1999-2005 The SquirrelMail Project Team
6 * Licensed under the GNU GPL. For full terms see the file COPYING.
7 *
8 * Setup of the mailfetch plugin.
9 *
10 * @version $Id$
11 * @package plugins
12 * @subpackage mail_fetch
13 */
14
60683821 15/** @ignore */
16if (! defined('SM_PATH')) define('SM_PATH','../../');
4f51df66 17
18/**
19 * Initialize the plugin
20 */
21function squirrelmail_plugin_init_mail_fetch() {
22 global $squirrelmail_plugin_hooks;
23
24 $squirrelmail_plugin_hooks['menuline']['mail_fetch'] = 'mail_fetch_link';
25 $squirrelmail_plugin_hooks['loading_prefs']['mail_fetch'] = 'mail_fetch_load_pref';
26 $squirrelmail_plugin_hooks['login_verified']['mail_fetch'] = 'mail_fetch_setnew';
27 $squirrelmail_plugin_hooks['left_main_before']['mail_fetch'] = 'mail_fetch_login';
28 $squirrelmail_plugin_hooks['optpage_register_block']['mail_fetch'] = 'mailfetch_optpage_register_block';
5f438206 29 $squirrelmail_plugin_hooks['rename_or_delete_folder']['mail_fetch'] = 'mail_fetch_folderact';
4f51df66 30}
31
60683821 32/**
33 * display link in menu line
34 * @private
35 */
4f51df66 36function mail_fetch_link() {
4f51df66 37 displayInternalLink('plugins/mail_fetch/fetch.php', _("Fetch"), '');
38 echo '&nbsp;&nbsp;';
4f51df66 39}
40
60683821 41/**
42 * load preferences
43 * @private
44 */
4f51df66 45function mail_fetch_load_pref() {
60683821 46 include_once(SM_PATH . 'plugins/mail_fetch/functions.php');
47 mail_fetch_load_pref_function();
4f51df66 48}
d622d38a 49
60683821 50/**
51 * Fetch pop3 mails on login.
52 * @private
53 */
4f51df66 54function mail_fetch_login() {
60683821 55 include_once (SM_PATH . 'plugins/mail_fetch/functions.php');
56 mail_fetch_login_function();
4f51df66 57}
d622d38a 58
60683821 59/**
60 * Adds preference that is used to detect new logins
61 * @private
62 */
4f51df66 63function mail_fetch_setnew() {
60683821 64 include_once (SM_PATH . 'plugins/mail_fetch/functions.php');
65 mail_fetch_setnew_function();
4f51df66 66}
d622d38a 67
60683821 68/**
69 * Add plugin option block
70 * @private
71 */
4f51df66 72function mailfetch_optpage_register_block() {
60683821 73 include_once (SM_PATH . 'plugins/mail_fetch/functions.php');
74 mailfetch_optpage_register_block_function();
4f51df66 75}
d622d38a 76
60683821 77/**
78 * Update mail_fetch settings when folders are renamed or deleted.
79 * @since 1.5.1 and 1.4.5
80 * @private
81 */
5f438206 82function mail_fetch_folderact($args) {
60683821 83 include_once (SM_PATH . 'plugins/mail_fetch/functions.php');
84 mail_fetch_folderact_function($args);
5f438206 85}
91e0dccc 86?>