summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-11-08 15:51:29 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-11-08 15:51:29 +0100
commit46a1de68a663fd7af1a0a08124738cecc84fd5c7 (patch)
treee172949e46eb15b6861c9b6945ce62f1d4ca13c0 /system
parent3b3782a8e039f70379afd775a2155b8b1ae1334d (diff)
parent39f118c73d62510d3676ad1ece53c6fe2cc43f64 (diff)
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into develop
Diffstat (limited to 'system')
-rwxr-xr-xsystem/helpers/url_helper.php8
-rw-r--r--system/libraries/Email.php10
2 files changed, 12 insertions, 6 deletions
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);
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');