X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Fsent_subfolders%2Ffunctions.php;h=89a694c0547cc77131e060b5bb52e5608980d5ae;hb=c997cbe6f5a46d432d7733acb207dfcdfd00e49e;hp=7ff8deb11e105ab30d25284ba5ba82e714373e6e;hpb=e84b24969cfd107c0d6fdb7807d9184815f45a4a;p=squirrelmail.git diff --git a/plugins/sent_subfolders/functions.php b/plugins/sent_subfolders/functions.php index 7ff8deb1..89a694c0 100644 --- a/plugins/sent_subfolders/functions.php +++ b/plugins/sent_subfolders/functions.php @@ -5,7 +5,7 @@ * * This is a standard SquirrelMail 1.2 API for plugins. * - * @copyright © 1999-2007 The SquirrelMail Project Team + * @copyright 1999-2021 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package plugins @@ -50,10 +50,10 @@ function sent_subfolders_check_handleAsSent_do($mailbox) { function sent_subfolders_optpage_loadhook_folders_do() { global $data_dir, $username, $optpage_data, $imapServerAddress, - $imapPort, $show_contain_subfolders_option, $sent_folder; + $imapPort, $imap_stream_options, $show_contain_subfolders_option, $sent_folder; /* Get some imap data we need later. */ - $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0); + $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options); $boxes = sqimap_mailbox_list($imapConnection); sqimap_logout($imapConnection); @@ -131,6 +131,10 @@ function save_option_sent_subfolders_setting($option) { } else { setPref($data_dir, $username, 'use_sent_subfolders', SMPREF_ON); setPref($data_dir, $username, 'move_to_sent', SMPREF_ON); + $check_sent_subfolders_base = getPref($data_dir, $username, 'sent_subfolders_base', ''); + if ($check_sent_subfolders_base === '') { + setPref($data_dir, $username, 'sent_subfolders_base', $sent_subfolders_base); + } } /* Now just save the option as normal. */ @@ -157,7 +161,7 @@ function save_option_sent_subfolders_base($option) { function sent_subfolders_update_sentfolder_do() { global $sent_folder, $username, $data_dir, $imapServerAddress, $imapPort, - $move_to_sent; + $imap_stream_options, $move_to_sent; sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); @@ -214,7 +218,7 @@ function sent_subfolders_update_sentfolder_do() { /* Auto-create folders, if they do not yet exist. */ if ($sent_subfolder != 'none') { /* Create the imap connection. */ - $ic = sqimap_login($username, false, $imapServerAddress, $imapPort, 10); + $ic = sqimap_login($username, false, $imapServerAddress, $imapPort, 10, $imap_stream_options); $boxes = false; /**