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