Add RFC 2231 support. Thanks to Piotr Pawlow. (#2501379)
[squirrelmail.git] / plugins / mail_fetch / functions.php
index 436ef54fe30fc8a64832b94aa771710853dd08b3..6d48541c722c8662adb786dd33da3166b3e67791 100644 (file)
@@ -24,6 +24,21 @@ include_once (SM_PATH . 'plugins/mail_fetch/class.mail_fetch.php');
 /** declare plugin globals */
 global $mail_fetch_allow_unsubscribed;
 
+/**
+  * Add link to menu at top of content pane
+  *
+  * @return void
+  *
+  */
+function mail_fetch_link_do() {
+
+    global $oTemplate, $nbsp;
+    $output = makeInternalLink('plugins/mail_fetch/fetch.php', _("Fetch"), '')
+            . $nbsp . $nbsp;
+    return array('menuline' => $output);
+
+}
+
 /**
  * Controls use of unsubscribed folders in plugin
  * @global boolean $mail_fetch_allow_unsubscribed
@@ -64,8 +79,9 @@ function mail_fetch_login_function() {
         $mailfetch_login_[$i_loop] = getPref($data_dir, $username, "mailfetch_login_$i_loop");
         $mailfetch_fref_[$i_loop] = getPref($data_dir, $username, "mailfetch_fref_$i_loop");
         $mailfetch_pass_[$i_loop] = getPref($data_dir, $username, "mailfetch_pass_$i_loop");
-        if( $mailfetch_cypher == 'on' )
+        if( $mailfetch_cypher == 'on' ) {
             $mailfetch_pass_[$i_loop] = decrypt( $mailfetch_pass_[$i_loop] );
+        }
 
         if( $mailfetch_pass_[$i_loop] <> '' &&          // Empty passwords no allowed
                 ( ( $mailfetch_login_[$i_loop] == 'on' &&  $mailfetch_newlog == 'on' ) || $mailfetch_fref_[$i_loop] == 'on' ) ) {