diff options
author | Eric Barnes <eric@ericlbarnes.com> | 2012-07-29 06:15:40 +0200 |
---|---|---|
committer | Eric Barnes <eric@ericlbarnes.com> | 2012-07-29 06:15:40 +0200 |
commit | acedd2b1a37b22cb04b01038f21876ddfe38b83a (patch) | |
tree | b3b0a1a347abcbe9c2484072f8d859575654a9aa /system/helpers/date_helper.php | |
parent | 62ab8b24fc37a25eab9205c46321fa41729e5faf (diff) |
Adding a common stringify_attributes function for dealing with attributes through out various helpers.
Signed-off-by: Eric Barnes <eric@ericlbarnes.com>
Diffstat (limited to 'system/helpers/date_helper.php')
-rw-r--r-- | system/helpers/date_helper.php | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php index a45b3d7ac..a792f09a2 100644 --- a/system/helpers/date_helper.php +++ b/system/helpers/date_helper.php @@ -575,22 +575,7 @@ if ( ! function_exists('timezone_menu')) $menu .= ' class="'.$class.'"'; } - // Generate a string from the attributes submitted, if any - if (is_array($attributes)) - { - $atts = ''; - foreach ($attributes as $key => $val) - { - $atts .= ' '.$key.'="'.$val.'"'; - } - $attributes = $atts; - } - elseif (is_string($attributes) && strlen($attributes) > 0) - { - $attributes = ' '.$attributes; - } - - $menu .= $attributes.">\n"; + $menu .= _stringify_attributes($attributes).">\n"; foreach (timezones() as $key => $val) { |