diff options
author | Rick Ellis <rick.ellis@ellislab.com> | 2008-09-23 03:21:23 +0200 |
---|---|---|
committer | Rick Ellis <rick.ellis@ellislab.com> | 2008-09-23 03:21:23 +0200 |
commit | 9b8bc35dbaf3aa0f37885122dccb24d1d7811f1e (patch) | |
tree | 009de4c77c5859e66349ae71fed5cdd19133f48e /system/libraries | |
parent | 96fabe576f4caf78d3c3af759d2d03bab64801f9 (diff) |
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Form_validation.php | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index f0c1500df..df57f80ff 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -691,20 +691,13 @@ class CI_Form_validation { if (substr($fieldname, 0, 5) == 'lang:')
{
// Grab the variable
- $line = substr($fieldname, 5);
-
- // Translate it
- $fieldname = $this->CI->lang->line($line);
+ $line = substr($fieldname, 5);
- // Were we able to translate the field name?
- if ($fieldname === FALSE)
+ // Were we able to translate the field name? If not we use $line
+ if (FALSE === ($fieldname = $this->CI->lang->line($line)))
{
return $line;
}
- else
- {
- return $fieldname;
- }
}
return $fieldname;
|