phpDocumentor updates
[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 &copy; 1999-2005 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 /** @ignore */
16 if (! defined('SM_PATH')) define('SM_PATH','../../');
17
18 /**
19 * Initialize the plugin
20 */
21 function 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';
29 $squirrelmail_plugin_hooks['rename_or_delete_folder']['mail_fetch'] = 'mail_fetch_folderact';
30 }
31
32 /**
33 * display link in menu line
34 * @private
35 */
36 function mail_fetch_link() {
37 displayInternalLink('plugins/mail_fetch/fetch.php', _("Fetch"), '');
38 echo '&nbsp;&nbsp;';
39 }
40
41 /**
42 * load preferences
43 * @private
44 */
45 function mail_fetch_load_pref() {
46 include_once(SM_PATH . 'plugins/mail_fetch/functions.php');
47 mail_fetch_load_pref_function();
48 }
49
50 /**
51 * Fetch pop3 mails on login.
52 * @private
53 */
54 function mail_fetch_login() {
55 include_once (SM_PATH . 'plugins/mail_fetch/functions.php');
56 mail_fetch_login_function();
57 }
58
59 /**
60 * Adds preference that is used to detect new logins
61 * @private
62 */
63 function mail_fetch_setnew() {
64 include_once (SM_PATH . 'plugins/mail_fetch/functions.php');
65 mail_fetch_setnew_function();
66 }
67
68 /**
69 * Add plugin option block
70 * @private
71 */
72 function mailfetch_optpage_register_block() {
73 include_once (SM_PATH . 'plugins/mail_fetch/functions.php');
74 mailfetch_optpage_register_block_function();
75 }
76
77 /**
78 * Update mail_fetch settings when folders are renamed or deleted.
79 * @since 1.5.1 and 1.4.5
80 * @private
81 */
82 function mail_fetch_folderact($args) {
83 include_once (SM_PATH . 'plugins/mail_fetch/functions.php');
84 mail_fetch_folderact_function($args);
85 }
86 ?>