Add RFC 2231 support. Thanks to Piotr Pawlow. (#2501379)
[squirrelmail.git] / plugins / mail_fetch / setup.php
index 9a43f75b5dc840172b4ed3832e9e51b0649c2bd2..397fc0834eb8d2ba5e13123a42e9a469ba7257dc 100644 (file)
@@ -5,24 +5,20 @@
  *
  * Setup of the mailfetch plugin.
  *
- * @copyright © 1999-2005 The SquirrelMail Project Team
+ * @copyright © 1999-2007 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
  * @subpackage mail_fetch
  */
 
-/** @ignore */
-if (! defined('SM_PATH')) define('SM_PATH','../../');
-
 /**
  * Initialize the plugin
  */
 function squirrelmail_plugin_init_mail_fetch() {
     global $squirrelmail_plugin_hooks;
 
-    $squirrelmail_plugin_hooks['menuline']['mail_fetch'] = 'mail_fetch_link';
-    $squirrelmail_plugin_hooks['loading_prefs']['mail_fetch'] = 'mail_fetch_load_pref';
+    $squirrelmail_plugin_hooks['template_construct_page_header.tpl']['mail_fetch'] = 'mail_fetch_link';
     $squirrelmail_plugin_hooks['login_verified']['mail_fetch'] = 'mail_fetch_setnew';
     $squirrelmail_plugin_hooks['left_main_before']['mail_fetch'] = 'mail_fetch_login';
     $squirrelmail_plugin_hooks['optpage_register_block']['mail_fetch'] = 'mailfetch_optpage_register_block';
@@ -34,17 +30,8 @@ function squirrelmail_plugin_init_mail_fetch() {
  * @private
  */
 function mail_fetch_link() {
-    displayInternalLink('plugins/mail_fetch/fetch.php', _("Fetch"), '');
-    echo '  ';
-}
-
-/**
- * load preferences
- * @private
- */
-function mail_fetch_load_pref() {
-    include_once(SM_PATH . 'plugins/mail_fetch/functions.php');
-    mail_fetch_load_pref_function();
+    include_once (SM_PATH . 'plugins/mail_fetch/functions.php');
+    return mail_fetch_link_do();
 }
 
 /**
@@ -83,4 +70,3 @@ function mail_fetch_folderact($args) {
     include_once (SM_PATH . 'plugins/mail_fetch/functions.php');
     mail_fetch_folderact_function($args);
 }
-?>
\ No newline at end of file