summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorRick Ellis <rick.ellis@ellislab.com>2008-09-22 23:55:12 +0200
committerRick Ellis <rick.ellis@ellislab.com>2008-09-22 23:55:12 +0200
commitfe61d63138f4534125e2250cc2f6809613fe9e90 (patch)
treef7d74caabc6b3c4b3a9b96d70f0469724cb106bc /system
parent39f6f5a7eafe05b6388833149c23cad809de53f6 (diff)
Fixed a language bug when setting errors manually
Diffstat (limited to 'system')
-rw-r--r--system/libraries/Form_validation.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 6ef11e345..42ce433c7 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -690,13 +690,22 @@ class CI_Form_validation {
// We look for the prefix lang: to determine this
if (substr($fieldname, 0, 5) == 'lang:')
{
- $label = $this->CI->lang->line(substr($fieldname, 5));
+ $line = substr($fieldname, 5);
+
+ $fieldname = $this->CI->lang->line($line);
// Were we able to translate the field name?
- $fieldname = ($label === FALSE) ? substr($fieldname, 5) : $label;
+ if ($fieldname === FALSE)
+ {
+ return $this->CI->lang->line($line);
+ }
+ else
+ {
+ return $label;
+ }
}
- return $fieldname;
+ return $this->CI->lang->line($fieldname);
}
// --------------------------------------------------------------------