summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorBrennan Thompson <brenjt@gmail.com>2014-02-17 20:08:22 +0100
committerBrennan Thompson <brenjt@gmail.com>2014-02-17 20:08:22 +0100
commit1d03ef480c52546f6016cfda98dd82f341197a17 (patch)
tree22760c2fad6b3e10bdbc02997dffad8eb96d8ced /system
parent82c78a9c70e65793b7590ebe049e5d2632d04504 (diff)
Removed extra space, condensed $defaults
Diffstat (limited to 'system')
-rw-r--r--system/helpers/form_helper.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index da4646dd1..a724406f0 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -311,8 +311,7 @@ if ( ! function_exists('form_dropdown'))
*/
function form_dropdown($data = '', $options = array(), $selected = array(), $extra = '')
{
- $name = ! is_array($data) ? $data : '';
- $defaults = array('name' => $name);
+ $defaults = array('name' => is_array($data) ? '' : $data);
if (is_array($data) && isset($data['selected']))
{
@@ -336,11 +335,11 @@ if ( ! function_exists('form_dropdown'))
is_array($options) OR $options = array($options);
- $extra = _attributes_to_string($extra);
+ $extra = _attributes_to_string($extra);
$multiple = (count($selected) > 1 && strpos($extra, 'multiple') === FALSE) ? ' multiple="multiple"' : '';
- $form = '<select '.trim(_parse_form_attributes($data, $defaults)).$extra.$multiple.">\n";
+ $form = '<select '.rtrim(_parse_form_attributes($data, $defaults)).$extra.$multiple.">\n";
foreach ($options as $key => $val)
{