Alexandros Vellis: Bugfix
[squirrelmail.git] / plugins / mail_fetch / options.php
index 1ba30642deeeba3b5581f6c60fde4569330ddb9c..2d019413bd9a4316db519a0f290725a32b675899 100644 (file)
@@ -339,10 +339,11 @@ require_once(SM_PATH . 'include/load_prefs.php');
         $boxes = sqimap_mailbox_list($imapConnection);
         echo '<select name="mf_subfolder">';
         $selected = 0;
-        if ( isset($mf_subfolder) )
-          $selected = array(strtolower($mf_subfolder));
-        echo sqimap_mailbox_option_list($imapConnection, $selected);
-        echo '</select></td></tr>' .
+        if ( isset($mailfetch_subfolder_[$mf_sn]) ) {
+            $selected = array(strtolower($mailfetch_subfolder_[$mf_sn]));
+       } 
+        echo sqimap_mailbox_option_list($imapConnection, $selected) .
+             '</select></td></tr>' .
 
                 html_tag( 'tr',
                     html_tag( 'th', '&nbsp;', 'right' ) .