From e862ddd7c33cc41f306d21725c93170daf864c52 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Wed, 26 Oct 2011 22:45:00 -0300 Subject: Crypt isn't set and it causes extensive script time when specifying a custom SMTP server --- system/libraries/Email.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'system') diff --git a/system/libraries/Email.php b/system/libraries/Email.php index db6ea8f90..6739db33b 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1718,12 +1718,12 @@ class CI_Email { $this->_send_command('hello'); $this->_send_command('starttls'); $crypto = stream_socket_enable_crypto($this->_smtp_connect, TRUE, STREAM_CRYPTO_METHOD_TLS_CLIENT); - } - if ($crypto !== TRUE) - { - $this->_set_error_message('lang:email_smtp_error', $this->_get_smtp_data()); - return FALSE; + if ($crypto !== TRUE) + { + $this->_set_error_message('lang:email_smtp_error', $this->_get_smtp_data()); + return FALSE; + } } return $this->_send_command('hello'); -- cgit v1.2.3-24-g4f1b From 50e5dbb6079380d2e79e2fbbb39adfeaa40a33ea Mon Sep 17 00:00:00 2001 From: Brandon Jones Date: Mon, 7 Nov 2011 15:51:05 -0500 Subject: Adding auto-detection of best redirect method in url_helper. --- system/helpers/url_helper.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'system') diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index bfed96c6e..5d907d00e 100755 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php @@ -544,13 +544,19 @@ if ( ! function_exists('url_title')) */ if ( ! function_exists('redirect')) { - function redirect($uri = '', $method = 'location', $http_response_code = 302) + function redirect($uri = '', $method = 'auto', $http_response_code = 302) { if ( ! preg_match('#^https?://#i', $uri)) { $uri = site_url($uri); } + // IIS environment likely? Use 'refresh' for better compatibility + if (DIRECTORY_SEPARATOR != '/' && $method == 'auto') + { + $method = 'refresh'; + } + switch($method) { case 'refresh' : header("Refresh:0;url=".$uri); -- cgit v1.2.3-24-g4f1b