setup.php 1.9 KB

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