Changing back to messages.
[squirrelmail.git] / plugins / mail_fetch / fetch.php
index 918fe2981b004c9a46a4c7e7adc84716c3c93166..5a7a065aee6772ddf675845423a1835ab8651c52 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Fetch code.
  *
- * @copyright © 1999-2007 The SquirrelMail Project Team
+ * @copyright © 1999-2009 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
@@ -20,6 +20,11 @@ require('../../include/init.php');
 include_once(SM_PATH . 'functions/imap_general.php');
 include_once(SM_PATH . 'plugins/mail_fetch/functions.php' );
 
+// don't load this page if this plugin is not enabled
+//
+global $plugins;
+if (!in_array('mail_fetch', $plugins)) exit;
+
 /* globals */
 sqgetGlobalVar('delimiter',  $delimiter,  SQ_SESSION);
 /* end globals */
@@ -119,7 +124,7 @@ function Mail_Fetch_Select_Server($mailfetch) {
 }
 
 $mailfetch = Mail_Fetch_Servers();
-displayPageHeader($color, 'None');
+displayPageHeader($color);
 
 echo '<br />';
 
@@ -132,8 +137,9 @@ echo html_tag( 'table',
 
 /* there are no servers defined yet... */
 if($mailfetch['server_number'] == 0) {
+//FIXME: do not echo directly to browser -- use templates only
     echo '<p>' . _("No POP3 servers configured yet.") . '</p>';
-    displayInternalLink('plugins/mail_fetch/options.php',
+    echo makeInternalLink('plugins/mail_fetch/options.php',
                         _("Click here to go to the options page.") );
     $oTemplate->display('footer.tpl');
     exit();
@@ -264,7 +270,7 @@ for ($i_loop=$i_start;$i_loop<$i_stop;$i_loop++) {
     }
 
     if ($mailfetch_lmos == 'on') {
-        Mail_Fetch_Status(_("Leaving mail on server..."));
+        Mail_Fetch_Status(_("Leaving messages on server..."));
     } else {
         Mail_Fetch_Status(_("Deleting messages from server..."));
     }
@@ -343,4 +349,3 @@ for ($i_loop=$i_start;$i_loop<$i_stop;$i_loop++) {
 }
 
 $oTemplate->display('footer.tpl');
-