summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/date_helper.php2
-rwxr-xr-xsystem/helpers/url_helper.php10
2 files changed, 9 insertions, 3 deletions
diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php
index 447bf55ac..8c92fdc89 100644
--- a/system/helpers/date_helper.php
+++ b/system/helpers/date_helper.php
@@ -132,7 +132,7 @@ if ( ! function_exists('standard_date'))
'DATE_COOKIE' => '%l, %d-%M-%y %H:%i:%s UTC',
'DATE_ISO8601' => '%Y-%m-%dT%H:%i:%s%Q',
'DATE_RFC822' => '%D, %d %M %y %H:%i:%s %O',
- 'DATE_RFC850' => '%l, %d-%M-%y %H:%m:%i UTC',
+ 'DATE_RFC850' => '%l, %d-%M-%y %H:%i:%s UTC',
'DATE_RFC1036' => '%D, %d %M %y %H:%i:%s %O',
'DATE_RFC1123' => '%D, %d %M %Y %H:%i:%s %O',
'DATE_RSS' => '%D, %d %M %Y %H:%i:%s %O',
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
index bfed96c6e..5d9afe457 100755
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.php
@@ -393,7 +393,7 @@ if ( ! function_exists('auto_link'))
{
if ($type != 'email')
{
- if (preg_match_all("#(^|\s|\()((http(s?)://)|(www\.))(\w+[^\s\)\<]+)#i", $str, $matches))
+ if (preg_match_all("#(^|\s|\(|\b)((http(s?)://)|(www\.))(\w+[^\s\)\<]+)#i", $str, $matches))
{
$pop = ($popup == TRUE) ? " target=\"_blank\" " : "";
@@ -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);