From: pdontthink Date: Tue, 21 Jan 2014 22:15:03 +0000 (+0000) Subject: Variable name correction X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a9805897ba12de9a63b9a435ccbb49a027d86e4a;p=squirrelmail.git Variable name correction git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14437 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/class/deliver/Deliver.class.php b/class/deliver/Deliver.class.php index 73f243ab..39a2a15e 100644 --- a/class/deliver/Deliver.class.php +++ b/class/deliver/Deliver.class.php @@ -90,7 +90,7 @@ class Deliver { // if ($reply_id) { global $imapConnection, $username, $imapServerAddress, - $imapPort, $imapSslOptions, $mailbox; + $imapPort, $imap_stream_options, $mailbox; // try our best to use an existing IMAP handle // @@ -104,7 +104,7 @@ class Deliver { } else { $close_imap_stream = TRUE; $my_imap_stream = sqimap_login($username, FALSE, $imapServerAddress, - $imapPort, 0, $imapSslOptions); + $imapPort, 0, $imap_stream_options); } sqimap_mailbox_select($my_imap_stream, $mailbox); @@ -453,11 +453,11 @@ class Deliver { * @param string $pass password to log into the SMTP server with * @param boolean $authpop whether or not to use POP-before-SMTP authorization * @param string $pop_host host name or IP to connect to for POP-before-SMTP authorization - * @param array $ssl_options SSL context options, see config_local.php for more details (OPTIONAL) + * @param array $stream_options SSL context options, see config_local.example.php for more details (OPTIONAL) * * @return handle $stream file handle resource to SMTP stream */ - function initStream($message, $domain, $length=0, $host='', $port='', $user='', $pass='', $authpop=false, $pop_host='', $ssl_options=array()) { + function initStream($message, $domain, $length=0, $host='', $port='', $user='', $pass='', $authpop=false, $pop_host='', $stream_options=array()) { return $stream; } diff --git a/class/deliver/Deliver_SMTP.class.php b/class/deliver/Deliver_SMTP.class.php index fc61d352..98eec1dd 100644 --- a/class/deliver/Deliver_SMTP.class.php +++ b/class/deliver/Deliver_SMTP.class.php @@ -62,7 +62,7 @@ class Deliver_SMTP extends Deliver { } } - function initStream($message, $domain, $length=0, $host='', $port='', $user='', $pass='', $authpop=false, $pop_host='', $ssl_options=array()) { + function initStream($message, $domain, $length=0, $host='', $port='', $user='', $pass='', $authpop=false, $pop_host='', $stream_options=array()) { global $use_smtp_tls,$smtp_auth_mech; if ($authpop) { @@ -98,7 +98,7 @@ class Deliver_SMTP extends Deliver { if ((check_php_version(4,3)) && (extension_loaded('openssl'))) { if (function_exists('stream_socket_client')) { $server_address = 'ssl://' . $host . ':' . $port; - $ssl_context = @stream_context_create($ssl_options); + $ssl_context = @stream_context_create($stream_options); $connect_timeout = ini_get('default_socket_timeout'); // null timeout is broken if ($connect_timeout == 0) diff --git a/class/deliver/Deliver_SendMail.class.php b/class/deliver/Deliver_SendMail.class.php index a1394173..978b7bb4 100644 --- a/class/deliver/Deliver_SendMail.class.php +++ b/class/deliver/Deliver_SendMail.class.php @@ -86,7 +86,7 @@ class Deliver_SendMail extends Deliver { * * @param Message $message Message object containing the from address * @param string $sendmail_path Location of sendmail binary - * @param mixed $ignore Seven extra arguments that the parent class + * @param mixed $ignore Eight extra arguments that the parent class * requires which are not used here * @return resource * @access public diff --git a/config/config_local.example.php b/config/config_local.example.php index eb425007..e200206d 100644 --- a/config/config_local.example.php +++ b/config/config_local.example.php @@ -52,14 +52,14 @@ * (those that are displayed in a different color than other * "normal" mailboxes). * - * $smtpSslOptions allows more control over the SSL context used - * when connecting to the SMTP server over SSL/TLS. See: + * $smtp_stream_options allows more control over the SSL context + * used when connecting to the SMTP server over SSL/TLS. See: * http://www.php.net/manual/context.php and in particular * http://php.net/manual/context.ssl.php * For example, you can specify a CA file that corresponds * to your server's certificate and make sure that the * server's certificate is validated when connecting: - * $smtpSslOptions = array( + * $smtp_stream_options = array( * 'ssl' => array( * 'cafile' => '/etc/pki/tls/certs/ca-bundle.crt', * 'verify_peer' => true, @@ -67,14 +67,14 @@ * ), * ); * - * $imapSslOptions allows more control over the SSL context used - * when connecting to the IMAP server over SSL/TLS. See: - * http://www.php.net/manual/context.php and in particular - * http://php.net/manual/context.ssl.php + * $imap_stream_options allows more control over the SSL + * context used when connecting to the IMAP server over + * SSL/TLS. See: http://www.php.net/manual/context.php + * and in particular http://php.net/manual/context.ssl.php * For example, you can specify a CA file that corresponds * to your server's certificate and make sure that the * server's certificate is validated when connecting: - * $imapSslOptions = array( + * $imap_stream_options = array( * 'ssl' => array( * 'cafile' => '/etc/pki/tls/certs/ca-bundle.crt', * 'verify_peer' => true, diff --git a/doc/ChangeLog b/doc/ChangeLog index 131881ff..efb3074c 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -385,7 +385,7 @@ Version 1.5.2 - SVN shown on the message list screen - Added advanced control over the SSL context used when connecting to the SMTP and IMAP servers over SSL/TLS (thanks to Emmanuel - Dreyfus). See $imapSslOptions and $smtpSslOptions in + Dreyfus). See $imap_stream_options and $smtp_stream_options in config_local.example.php for more information. - Added ability to show login error from the IMAP server instead of traditional "Unknown user or password incorrect" (thanks to Alain diff --git a/functions/imap_general.php b/functions/imap_general.php index 56cc9bae..f7f371a9 100755 --- a/functions/imap_general.php +++ b/functions/imap_general.php @@ -670,12 +670,12 @@ function sqimap_read_data ($imap_stream, $tag_uid, $handle_errors, * @param int port port number to connect to * @param integer $tls whether to use plain text(0), TLS(1) or STARTTLS(2) when connecting. * Argument was boolean before 1.5.1. - * @param array $ssl_options SSL context options, see config_local.php + * @param array $stream_options Stream context options, see config_local.php * for more details (OPTIONAL) * @return imap-stream resource identifier * @since 1.5.0 (usable only in 1.5.1 or later) */ -function sqimap_create_stream($server,$port,$tls=0,$ssl_options=array()) { +function sqimap_create_stream($server,$port,$tls=0,$stream_options=array()) { global $squirrelmail_language; if (strstr($server,':') && ! preg_match("/^\[.*\]$/",$server)) { @@ -691,7 +691,7 @@ function sqimap_create_stream($server,$port,$tls=0,$ssl_options=array()) { if ((check_php_version(4,3)) and (extension_loaded('openssl'))) { if (function_exists('stream_socket_client')) { $server_address = 'ssl://' . $server . ':' . $port; - $ssl_context = @stream_context_create($ssl_options); + $ssl_context = @stream_context_create($stream_options); $connect_timeout = ini_get('default_socket_timeout'); // null timeout is broken if ($connect_timeout == 0) @@ -810,14 +810,14 @@ function sqimap_create_stream($server,$port,$tls=0,$ssl_options=array()) { * 1 = show no errors (just exit) * 2 = show no errors (return FALSE) * 3 = show no errors (return error string) - * @param array $ssl_options SSL context options, see config_local.php + * @param array $stream_options Stream context options, see config_local.php * for more details (OPTIONAL) * @return mixed The IMAP connection stream, or if the connection fails, * FALSE if $hide is set to 2 or an error string if $hide * is set to 3. */ function sqimap_login ($username, $password, $imap_server_address, - $imap_port, $hide, $ssl_options=array()) { + $imap_port, $hide, $stream_options=array()) { global $color, $squirrelmail_language, $onetimepad, $use_imap_tls, $imap_auth_mech, $sqimap_capabilities, $display_imap_login_error; @@ -865,7 +865,7 @@ function sqimap_login ($username, $password, $imap_server_address, $host = $imap_server_address; $imap_server_address = sqimap_get_user_server($imap_server_address, $username); - $imap_stream = sqimap_create_stream($imap_server_address,$imap_port,$use_imap_tls,$ssl_options); + $imap_stream = sqimap_create_stream($imap_server_address,$imap_port,$use_imap_tls,$stream_options); if (($imap_auth_mech == 'cram-md5') OR ($imap_auth_mech == 'digest-md5')) { // We're using some sort of authentication OTHER than plain or login diff --git a/include/options/folder.php b/include/options/folder.php index d60e4f63..f5910eaf 100644 --- a/include/options/folder.php +++ b/include/options/folder.php @@ -33,12 +33,12 @@ define('SMOPT_GRP_FOLDERSELECT', 2); * @return array all option information */ function load_optpage_data_folder() { - global $username, $imapServerAddress, $imapPort, $imapSslOptions, + global $username, $imapServerAddress, $imapPort, $imap_stream_options, $oTemplate, $nbsp, $folder_prefix, $default_folder_prefix, $show_prefix_option; /* Get some imap data we need later. */ - $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions); + $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options); $boxes = sqimap_mailbox_list($imapConnection); /* Build a simple array into which we will build options. */ diff --git a/plugins/filters/filters.php b/plugins/filters/filters.php index 2086c2cd..2af249e4 100644 --- a/plugins/filters/filters.php +++ b/plugins/filters/filters.php @@ -190,7 +190,7 @@ function filters_bulkquery($filters, $IPs) { * @access private */ function start_filters($hook_args) { - global $imapServerAddress, $imapPort, $imapSslOptions, $imap_stream, + global $imapServerAddress, $imapPort, $imap_stream_options, $imap_stream, $imapConnection, $UseSeparateImapConnection, $AllowSpamFilters, $filter_inbox_count, $username; @@ -229,7 +229,7 @@ function start_filters($hook_args) { if ((!isset($imap_stream) && !isset($imapConnection)) || $UseSeparateImapConnection ) { $stream = sqimap_login($username, false, $imapServerAddress, - $imapPort, 10, $imapSslOptions); + $imapPort, 10, $imap_stream_options); $previously_connected = false; } else if (isset($imapConnection)) { $stream = $imapConnection; diff --git a/plugins/filters/options.php b/plugins/filters/options.php index 6ea5290e..6f0d87da 100644 --- a/plugins/filters/options.php +++ b/plugins/filters/options.php @@ -25,7 +25,7 @@ sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); sqgetGlobalVar('theid', $theid); sqgetGlobalVar('action', $action, SQ_GET); -global $imapSslOptions; // in case not defined in config +global $imap_stream_options; // in case not defined in config if (sqgetGlobalVar('filter_submit',$filter_submit,SQ_POST)) { @@ -126,7 +126,7 @@ if (sqgetGlobalVar('filter_submit',$filter_submit,SQ_POST)) { if (isset($action) && ($action == 'add' || $action == 'edit')) { - $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions); + $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options); $boxes = sqimap_mailbox_list($imapConnection); for ($a = 0, $cnt = count($boxes); $a < $cnt; $a++) { diff --git a/plugins/filters/spamoptions.php b/plugins/filters/spamoptions.php index 8f390615..c7f8b739 100644 --- a/plugins/filters/spamoptions.php +++ b/plugins/filters/spamoptions.php @@ -23,7 +23,7 @@ include_once(SM_PATH . 'plugins/filters/filters.php'); sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); sqgetGlobalVar('action', $action, SQ_GET); -global $imapSslOptions; // in case not defined in config +global $imap_stream_options; // in case not defined in config /* end globals */ displayPageHeader($color); @@ -78,7 +78,7 @@ if ($SpamFilters_YourHop == ' ') { if (isset($action) && $action == 'spam') { - $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions); + $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options); $boxes = sqimap_mailbox_list($imapConnection); sqimap_logout($imapConnection); $numboxes = count($boxes); diff --git a/plugins/info/options.php b/plugins/info/options.php index b64e107f..9268995b 100644 --- a/plugins/info/options.php +++ b/plugins/info/options.php @@ -53,8 +53,8 @@ for($i = 0; $i <= 9; $i++){ /* END GLOBALS */ -global $imapSslOptions; // in case not defined in config -$imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions); +global $imap_stream_options; // in case not defined in config +$imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options); $caps_array = get_caps($imap_stream); $list = array ('TEST_0', 'TEST_1', diff --git a/plugins/mail_fetch/fetch.php b/plugins/mail_fetch/fetch.php index 330c0711..dd2db317 100644 --- a/plugins/mail_fetch/fetch.php +++ b/plugins/mail_fetch/fetch.php @@ -27,7 +27,7 @@ if (!in_array('mail_fetch', $plugins)) exit; /* globals */ sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); -global $imapSslOptions; // in case not defined in config +global $imap_stream_options; // in case not defined in config /* end globals */ /** @@ -198,7 +198,7 @@ for ($i_loop=$i_start;$i_loop<$i_stop;$i_loop++) { } Mail_Fetch_Status(_("Opening IMAP server")); - $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 10, $imapSslOptions); + $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 10, $imap_stream_options); // check if destination folder is not set, is not subscribed and is not \noselect folder if($mailfetch_subfolder == '' || diff --git a/plugins/mail_fetch/functions.php b/plugins/mail_fetch/functions.php index c67d9771..259ef61f 100644 --- a/plugins/mail_fetch/functions.php +++ b/plugins/mail_fetch/functions.php @@ -64,7 +64,7 @@ if (file_exists(SM_PATH . 'config/mail_fetch_config.php')) { function mail_fetch_login_function() { include_once (SM_PATH . 'functions/imap_general.php'); - global $username, $data_dir, $imapServerAddress, $imapPort, $imapSslOptions; + global $username, $data_dir, $imapServerAddress, $imapPort, $imap_stream_options; $mailfetch_newlog = getPref($data_dir, $username, 'mailfetch_newlog'); @@ -129,7 +129,7 @@ function mail_fetch_login_function() { continue; } - $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 10, $imapSslOptions); + $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 10, $imap_stream_options); /* log into pop server*/ if (! $pop3->login($mailfetch_user, $mailfetch_pass)) { diff --git a/plugins/mail_fetch/options.php b/plugins/mail_fetch/options.php index d6f4f0d0..d9e0802c 100644 --- a/plugins/mail_fetch/options.php +++ b/plugins/mail_fetch/options.php @@ -59,7 +59,7 @@ sqgetGlobalVar('submit_mailfetch', $submit_mailfetch, SQ_POST); $mf_port = trim($mf_port); $mf_server = trim($mf_server); -global $imapSslOptions; // in case not defined in config +global $imap_stream_options; // in case not defined in config /* end globals */ @@ -302,7 +302,7 @@ switch( $mf_action ) { html_tag( 'tr' ) . html_tag( 'th', _("Store in Folder:"), 'right' ) . html_tag( 'td', '', 'left' ); - $imapConnection = sqimap_login ($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions); + $imapConnection = sqimap_login ($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options); $boxes = sqimap_mailbox_list($imapConnection); echo ''; $selected = 0; diff --git a/plugins/message_details/message_details_bottom.php b/plugins/message_details/message_details_bottom.php index a5980ebd..87ce0d13 100644 --- a/plugins/message_details/message_details_bottom.php +++ b/plugins/message_details/message_details_bottom.php @@ -112,12 +112,12 @@ function CalcEntity($entString, $direction) { * @access public */ function get_message_details($mailbox, $passed_id, $passed_ent_id=0, $stripHTML=FALSE) { - global $imapServerAddress, $imapPort, $imapSslOptions, + global $imapServerAddress, $imapPort, $imap_stream_options, $color,$msgd_8bit_in_hex, $username; $returnValue = ''; - $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions); + $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options); $read = sqimap_mailbox_select($imapConnection, $mailbox); if (!empty($passed_ent_id)) $body = sqimap_run_command($imapConnection, "FETCH $passed_id BODY[$passed_ent_id]",true, $response, $readmessage, TRUE); diff --git a/plugins/sent_subfolders/functions.php b/plugins/sent_subfolders/functions.php index 9afab661..0e53a9c9 100644 --- a/plugins/sent_subfolders/functions.php +++ b/plugins/sent_subfolders/functions.php @@ -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, $imapSslOptions, $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, $imapSslOptions); + $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options); $boxes = sqimap_mailbox_list($imapConnection); sqimap_logout($imapConnection); @@ -161,7 +161,7 @@ function save_option_sent_subfolders_base($option) { function sent_subfolders_update_sentfolder_do() { global $sent_folder, $username, $data_dir, $imapServerAddress, $imapPort, - $imapSslOptions, $move_to_sent; + $imap_stream_options, $move_to_sent; sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); @@ -218,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, $imapSslOptions); + $ic = sqimap_login($username, false, $imapServerAddress, $imapPort, 10, $imap_stream_options); $boxes = false; /** diff --git a/plugins/spamcop/functions.php b/plugins/spamcop/functions.php index 5d0d4c66..2d025fee 100644 --- a/plugins/spamcop/functions.php +++ b/plugins/spamcop/functions.php @@ -134,12 +134,12 @@ function spamcop_options_function() { */ function spamcop_while_sending_function() { global $mailbox, $spamcop_delete, $spamcop_save, $spamcop_is_composing, $auto_expunge, - $username, $imapServerAddress, $imapPort, $imapSslOptions; + $username, $imapServerAddress, $imapPort, $imap_stream_options; if (sqgetGlobalVar('spamcop_is_composing' , $spamcop_is_composing)) { // delete spam message if ($spamcop_delete) { - $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions); + $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options); sqimap_mailbox_select($imapConnection, $mailbox); sqimap_msgs_list_delete($imapConnection, $mailbox, array($spamcop_is_composing)); if ($auto_expunge) diff --git a/plugins/spamcop/spamcop.php b/plugins/spamcop/spamcop.php index abaee516..2e89c14c 100644 --- a/plugins/spamcop/spamcop.php +++ b/plugins/spamcop/spamcop.php @@ -66,8 +66,8 @@ if (! is_plugin_enabled('spamcop')) { exit(); } - global $imapSslOptions; // in case not defined in config - $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions); + global $imap_stream_options; // in case not defined in config + $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options); sqimap_mailbox_select($imap_stream, $mailbox); if ($spamcop_method == 'quick_email' || diff --git a/src/compose.php b/src/compose.php index a84c33b8..2f37a6ad 100644 --- a/src/compose.php +++ b/src/compose.php @@ -41,7 +41,7 @@ require_once(SM_PATH . 'class/deliver/Deliver.class.php'); require_once(SM_PATH . 'functions/addressbook.php'); require_once(SM_PATH . 'functions/forms.php'); require_once(SM_PATH . 'functions/identity.php'); -global $imapSslOptions; // in case not defined in config +global $imap_stream_options; // in case not defined in config /* --------------------- Get globals ------------------------------------- */ @@ -430,7 +430,7 @@ if ($draft) { $draft_message = _("Draft Email Saved"); /* If this is a resumed draft, then delete the original */ if(isset($delete_draft)) { - $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, false, $imapSslOptions); + $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, false, $imap_stream_options); sqimap_mailbox_select($imap_stream, $draft_folder); // force bypass_trash=true because message should be saved when deliverMessage() returns true. // in current implementation of sqimap_msgs_list_flag() single message id can @@ -543,7 +543,7 @@ if ($send) { /* if it is resumed draft, delete draft message */ if ( isset($delete_draft)) { - $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, false, $imapSslOptions); + $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, false, $imap_stream_options); sqimap_mailbox_select($imap_stream, $draft_folder); // bypass_trash=true because message should be saved when deliverMessage() returns true. // in current implementation of sqimap_msgs_list_flag() single message id can @@ -774,7 +774,7 @@ function getforwardSubject($subject) function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $session='') { global $editor_size, $default_use_priority, $body, $idents, $use_signature, $data_dir, $username, - $key, $imapServerAddress, $imapPort, $imapSslOptions, + $key, $imapServerAddress, $imapPort, $imap_stream_options, $composeMessage, $body_quote, $request_mdn, $request_dr, $mdn_user_support, $languages, $squirrelmail_language, $default_charset, $do_not_reply_to_self; @@ -791,7 +791,7 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se if ($passed_id) { $imapConnection = sqimap_login($username, false, $imapServerAddress, - $imapPort, 0, $imapSslOptions); + $imapPort, 0, $imap_stream_options); sqimap_mailbox_select($imapConnection, $mailbox); $message = sqimap_get_message($imapConnection, $passed_id, $mailbox); @@ -1681,7 +1681,7 @@ function deliverMessage(&$composeMessage, $draft=false) { $username, $identity, $idents, $data_dir, $request_mdn, $request_dr, $default_charset, $useSendmail, $domain, $action, $default_move_to_sent, $move_to_sent, - $imapServerAddress, $imapPort, $imapSslOptions, $sent_folder, $key; + $imapServerAddress, $imapPort, $imap_stream_options, $sent_folder, $key; $rfc822_header = $composeMessage->rfc822_header; @@ -1778,13 +1778,13 @@ function deliverMessage(&$composeMessage, $draft=false) { if (!$useSendmail && !$draft) { require_once(SM_PATH . 'class/deliver/Deliver_SMTP.class.php'); $deliver = new Deliver_SMTP(); - global $smtpServerAddress, $smtpPort, $smtpSslOptions, $pop_before_smtp, $pop_before_smtp_host; + global $smtpServerAddress, $smtpPort, $smtp_stream_options, $pop_before_smtp, $pop_before_smtp_host; $authPop = (isset($pop_before_smtp) && $pop_before_smtp) ? true : false; if (empty($pop_before_smtp_host)) $pop_before_smtp_host = $smtpServerAddress; get_smtp_user($user, $pass); $stream = $deliver->initStream($composeMessage,$domain,0, - $smtpServerAddress, $smtpPort, $user, $pass, $authPop, $pop_before_smtp_host, $smtpSslOptions); + $smtpServerAddress, $smtpPort, $user, $pass, $authPop, $pop_before_smtp_host, $smtp_stream_options); } elseif (!$draft) { require_once(SM_PATH . 'class/deliver/Deliver_SendMail.class.php'); global $sendmail_path, $sendmail_args; @@ -1801,7 +1801,7 @@ function deliverMessage(&$composeMessage, $draft=false) { } elseif ($draft) { global $draft_folder; $imap_stream = sqimap_login($username, false, $imapServerAddress, - $imapPort, 0, $imapSslOptions); + $imapPort, 0, $imap_stream_options); if (sqimap_mailbox_exists ($imap_stream, $draft_folder)) { require_once(SM_PATH . 'class/deliver/Deliver_IMAP.class.php'); $imap_deliver = new Deliver_IMAP(); @@ -1837,7 +1837,7 @@ function deliverMessage(&$composeMessage, $draft=false) { plain_error_message($msg); } else { unset ($deliver); - $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions); + $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options); // mark as replied or forwarded if applicable diff --git a/src/download.php b/src/download.php index 780ff9f5..a0c3b4bd 100644 --- a/src/download.php +++ b/src/download.php @@ -58,8 +58,8 @@ set_my_charset(); /* end globals */ -global $imapSslOptions; // in case not defined in config -$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions); +global $imap_stream_options; // in case not defined in config +$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options); $aMailbox = sqm_api_mailbox_select($imapConnection, $account, $mailbox,array(),array()); if (isset($aMailbox['MSG_HEADERS'][$passed_id]['MESSAGE_OBJECT']) && diff --git a/src/empty_trash.php b/src/empty_trash.php index b3f4c476..3b094f87 100644 --- a/src/empty_trash.php +++ b/src/empty_trash.php @@ -34,8 +34,8 @@ sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); sqgetGlobalVar('smtoken', $submitted_token, SQ_GET, ''); sm_validate_security_token($submitted_token, -1, TRUE); -global $imapSslOptions; // in case not defined in config -$imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions); +global $imap_stream_options; // in case not defined in config +$imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options); $mailbox = $trash_folder; $boxes = sqimap_mailbox_list($imap_stream); diff --git a/src/folders.php b/src/folders.php index 87b48b04..186ce628 100644 --- a/src/folders.php +++ b/src/folders.php @@ -34,8 +34,8 @@ sqgetGlobalVar('smtoken', $submitted_token, SQ_POST, ''); /* end of get globals */ -global $imapSslOptions; // in case not defined in config -$imapConnection = sqimap_login ($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions); +global $imap_stream_options; // in case not defined in config +$imapConnection = sqimap_login ($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options); /* switch to the right function based on what the user selected */ if ( sqgetGlobalVar('smaction', $action, SQ_POST) ) { diff --git a/src/left_main.php b/src/left_main.php index 5f75070b..bb96f98c 100644 --- a/src/left_main.php +++ b/src/left_main.php @@ -38,8 +38,8 @@ sqgetGlobalVar('unfold', $unfold, SQ_GET); // open a connection on the imap port (143) // why hide the output? -global $imapSslOptions; // in case not defined in config -$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, true, $imapSslOptions); +global $imap_stream_options; // in case not defined in config +$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, true, $imap_stream_options); /** * Using stristr since very old preferences may contain "None" and "none". diff --git a/src/redirect.php b/src/redirect.php index c8af1367..97600d23 100644 --- a/src/redirect.php +++ b/src/redirect.php @@ -71,8 +71,8 @@ if ($force_username_lowercase) { } /* Verify that username and password are correct. */ -global $imapSslOptions; // in case not defined in config -$imapConnection = sqimap_login($login_username, $key, $imapServerAddress, $imapPort, 0, $imapSslOptions); +global $imap_stream_options; // in case not defined in config +$imapConnection = sqimap_login($login_username, $key, $imapServerAddress, $imapPort, 0, $imap_stream_options); /* From now on we are logged it. If the login failed then sqimap_login handles it */ /** diff --git a/src/right_main.php b/src/right_main.php index ea2f3af5..4b85b1a7 100644 --- a/src/right_main.php +++ b/src/right_main.php @@ -88,8 +88,8 @@ if ( sqgetGlobalVar('account', $account, SQ_GET) ) { /* Open an imap connection */ -global $imapSslOptions; // in case not defined in config -$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions); +global $imap_stream_options; // in case not defined in config +$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options); $mailbox = (isset($mailbox) && $mailbox) ? $mailbox : 'INBOX'; diff --git a/src/search.php b/src/search.php index ce868b73..77c89004 100644 --- a/src/search.php +++ b/src/search.php @@ -1321,8 +1321,8 @@ if ($search_advanced) { uasort($imap_asearch_options, 'asearch_unhtml_strcoll'); /* open IMAP connection */ -global $imapSslOptions; // in case not defined in config -$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions); +global $imap_stream_options; // in case not defined in config +$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options); /* get mailboxes once here */ diff --git a/src/vcard.php b/src/vcard.php index e3529c8e..d1768448 100644 --- a/src/vcard.php +++ b/src/vcard.php @@ -41,8 +41,8 @@ sqgetGlobalVar('ent_id', $ent_id, SQ_GET); sqgetGlobalVar('startMessage', $startMessage, SQ_GET); /* end globals */ -global $imapSslOptions; // in case not defined in config -$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions); +global $imap_stream_options; // in case not defined in config +$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options); sqimap_mailbox_select($imapConnection, $mailbox); displayPageHeader($color); diff --git a/src/view_header.php b/src/view_header.php index 65214f91..016c3331 100644 --- a/src/view_header.php +++ b/src/view_header.php @@ -93,9 +93,9 @@ if ( !sqgetGlobalVar('passed_ent_id', $passed_ent_id, SQ_GET) ) { } sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); -global $imapSslOptions; // in case not defined in config +global $imap_stream_options; // in case not defined in config $imapConnection = sqimap_login($username, false, $imapServerAddress, - $imapPort, 0, $imapSslOptions); + $imapPort, 0, $imap_stream_options); $mbx_response = sqimap_mailbox_select($imapConnection, $mailbox, false, false, true); $header = parse_viewheader($imapConnection,$passed_id, $passed_ent_id); diff --git a/src/view_html.php b/src/view_html.php index 185349f8..5f172409 100644 --- a/src/view_html.php +++ b/src/view_html.php @@ -38,8 +38,8 @@ sqgetGlobalVar('passed_id', $passed_id, SQ_GET, NULL, SQ_TYPE_BIGINT); // TODO: add required var checks here. -global $imapSslOptions; // in case not defined in config -$imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions); +global $imap_stream_options; // in case not defined in config +$imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options); $mbx_response = sqimap_mailbox_select($imap_stream, $mailbox); $message = &$messages[$mbx_response['UIDVALIDITY']][$passed_id]; diff --git a/src/view_text.php b/src/view_text.php index 382d9dde..a8325aa1 100644 --- a/src/view_text.php +++ b/src/view_text.php @@ -29,8 +29,8 @@ sqgetGlobalVar('passed_ent_id', $passed_ent_id, SQ_GET); sqgetGlobalVar('QUERY_STRING', $QUERY_STRING, SQ_SERVER); sqgetGlobalVar('passed_id', $passed_id, SQ_GET, NULL, SQ_TYPE_BIGINT); -global $imapSslOptions; // in case not defined in config -$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imapSslOptions); +global $imap_stream_options; // in case not defined in config +$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options); $mbx_response = sqimap_mailbox_select($imapConnection, $mailbox); $message = &$messages[$mbx_response['UIDVALIDITY']][$passed_id];