summaryrefslogtreecommitdiffstats
path: root/system/helpers/form_helper.php
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2012-06-27 14:02:13 +0200
committerTimothy Warren <tim@timshomepage.net>2012-06-27 14:02:13 +0200
commit13077951b63cf9858dc14ec9cab7f2b53ec88a3e (patch)
treee1fc50ddb8c0a4103c945f15d674d85c6655231b /system/helpers/form_helper.php
parent9128231452f3ccea857a848b61bd0e6e9e319737 (diff)
parentb66664b5decd68de50ae6c239c8d995d6c088d94 (diff)
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into email
Diffstat (limited to 'system/helpers/form_helper.php')
-rw-r--r--system/helpers/form_helper.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 984634315..0c5d55037 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -62,9 +62,11 @@ if ( ! function_exists('form_open'))
{
$action = $CI->config->site_url($action);
}
-
- // If no action is provided then set to the current url
- $action OR $action = $CI->config->site_url($CI->uri->uri_string());
+ elseif ( ! $action)
+ {
+ // If no action is provided then set to the current url
+ $action = $CI->config->site_url($CI->uri->uri_string());
+ }
$form = '<form action="'.$action.'"'._attributes_to_string($attributes, TRUE).">\n";
@@ -76,7 +78,7 @@ if ( ! function_exists('form_open'))
if (is_array($hidden) && count($hidden) > 0)
{
- $form .= sprintf('<div style="display:none;">%s</div>', form_hidden($hidden));
+ $form .= '<div style="display:none;">'.form_hidden($hidden).'</div>';
}
return $form;