summaryrefslogtreecommitdiffstats
path: root/system/libraries/Form_validation.php
diff options
context:
space:
mode:
authorMike Funk <mfunk@xulonpress.com>2012-03-08 15:00:57 +0100
committerMike Funk <mfunk@xulonpress.com>2012-03-08 15:00:57 +0100
commit7f42d060fb828bfb0bd857ad1a17b91070e52628 (patch)
tree632b99dcdd70e16f93fe45bb5076c665cc129df4 /system/libraries/Form_validation.php
parentfd15423734b23ce1f10a24b6fc57f6b16a3b361b (diff)
moved delimiter assigning to constructor, removed extra function.
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r--system/libraries/Form_validation.php34
1 files changed, 10 insertions, 24 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index f3535b225..3e16d69ed 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -54,7 +54,16 @@ class CI_Form_validation {
$this->CI =& get_instance();
// applies delimiters set in config file.
- $rules = $this->_config_delimiters($rules);
+ if (isset($rules['error_prefix']))
+ {
+ $this->_error_prefix = $rules['error_prefix'];
+ unset($rules['error_prefix']);
+ }
+ if (isset($rules['error_suffix']))
+ {
+ $this->_error_suffix = $rules['error_suffix'];
+ unset($rules['error_suffix']);
+ }
// Validation rules can be stored in a config file.
$this->_config_rules = $rules;
@@ -70,29 +79,6 @@ class CI_Form_validation {
log_message('debug', "Form Validation Class Initialized");
}
-
- // --------------------------------------------------------------------
-
- /**
- * if prefixes/suffixes set in config, assign and unset.
- *
- * @param array
- * @return array
- */
- protected function _config_delimiters($rules)
- {
- if (isset($rules['error_prefix']))
- {
- $this->_error_prefix = $rules['error_prefix'];
- unset($rules['error_prefix']);
- }
- if (isset($rules['error_suffix']))
- {
- $this->_error_suffix = $rules['error_suffix'];
- unset($rules['error_suffix']);
- }
- return $rules;
- }
// --------------------------------------------------------------------