summaryrefslogtreecommitdiffstats
path: root/system/helpers/url_helper.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-16 19:52:20 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-16 19:52:20 +0200
commitf0a8410a5cbe080b377ec352320872d27ce7d91f (patch)
tree5df8a4e77a054cdcac3e8c8133aee68832653ba5 /system/helpers/url_helper.php
parentf8480c376c43e2dee02a8240cc7c2f5ff631cae0 (diff)
Fix two anchor_popup() issues
Diffstat (limited to 'system/helpers/url_helper.php')
-rw-r--r--system/helpers/url_helper.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
index 2bd41b04d..58bde17b4 100644
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.php
@@ -204,7 +204,7 @@ if ( ! function_exists('anchor_popup'))
if ( ! is_array($attributes))
{
- $attributes = array();
+ $attributes = array($attributes);
}
foreach (array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0', ) as $key => $val)
@@ -213,10 +213,7 @@ if ( ! function_exists('anchor_popup'))
unset($attributes[$key]);
}
- if ($attributes !== '')
- {
- $attributes = _parse_attributes($attributes);
- }
+ $attributes = empty($attributes) ? '' : _parse_attributes($attributes);
return '<a href="javascript:void(0);" onclick="window.open(\''.$site_url."', '_blank', '"._parse_attributes($atts, TRUE)."');\"".$attributes.'>'.$title.'</a>';
}