summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRick Ellis <rick.ellis@ellislab.com>2008-09-23 03:21:23 +0200
committerRick Ellis <rick.ellis@ellislab.com>2008-09-23 03:21:23 +0200
commit9b8bc35dbaf3aa0f37885122dccb24d1d7811f1e (patch)
tree009de4c77c5859e66349ae71fed5cdd19133f48e
parent96fabe576f4caf78d3c3af759d2d03bab64801f9 (diff)
-rw-r--r--system/libraries/Form_validation.php13
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;