From 7f42d060fb828bfb0bd857ad1a17b91070e52628 Mon Sep 17 00:00:00 2001 From: Mike Funk Date: Thu, 8 Mar 2012 09:00:57 -0500 Subject: moved delimiter assigning to constructor, removed extra function. --- system/libraries/Form_validation.php | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) (limited to 'system') 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; - } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b