From 6984aaf27f53b91ab1eafcdccd5fb871dfcd5f18 Mon Sep 17 00:00:00 2001 From: Pascal Kriete Date: Tue, 5 Apr 2011 14:58:04 -0400 Subject: Removing security loading calls. --- system/libraries/Form_validation.php | 5 ----- 1 file changed, 5 deletions(-) (limited to 'system/libraries/Form_validation.php') diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index adfd17db1..cfc02eda9 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -1336,11 +1336,6 @@ class CI_Form_validation { */ function xss_clean($str) { - if ( ! isset($this->CI->security)) - { - $this->CI->load->library('security'); - } - return $this->CI->security->xss_clean($str); } -- cgit v1.2.3-24-g4f1b From 02404a1f59e4f3ae8231d87d8be5b23488ea86d2 Mon Sep 17 00:00:00 2001 From: patwork Date: Fri, 8 Apr 2011 15:45:46 +0200 Subject: Fix: codeigniter-reactor/127 Form_validation rule error logging --- system/libraries/Form_validation.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'system/libraries/Form_validation.php') diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index cfc02eda9..6f79a554a 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -628,6 +628,10 @@ class CI_Form_validation { $this->_field_data[$row['field']]['postdata'] = (is_bool($result)) ? $postdata : $result; } } + else + { + log_message('debug', "Unable to find validation rule: ".$rule); + } continue; } @@ -1357,4 +1361,4 @@ class CI_Form_validation { // END Form Validation Class /* End of file Form_validation.php */ -/* Location: ./system/libraries/Form_validation.php */ \ No newline at end of file +/* Location: ./system/libraries/Form_validation.php */ -- cgit v1.2.3-24-g4f1b From 114ab0988e20ac6be39ad363ff897a1a3b85e565 Mon Sep 17 00:00:00 2001 From: Razican Date: Mon, 25 Apr 2011 17:26:45 +0200 Subject: Fixed double-space typo. --- system/libraries/Form_validation.php | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'system/libraries/Form_validation.php') diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 6f79a554a..d8bcbd62b 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -1,4 +1,4 @@ -_field_data) == 0) { - // No validation rules? We're done... + // No validation rules? We're done... if (count($this->_config_rules) == 0) { return FALSE; @@ -648,7 +648,7 @@ class CI_Form_validation { } } - // Did the rule test negatively? If so, grab the error. + // Did the rule test negatively? If so, grab the error. if ($result === FALSE) { if ( ! isset($this->_error_messages[$rule])) @@ -664,7 +664,7 @@ class CI_Form_validation { } // Is the parameter we are inserting into the error message the name - // of another field? If so we need to grab its "field label" + // of another field? If so we need to grab its "field label" if (isset($this->_field_data[$param]) AND isset($this->_field_data[$param]['label'])) { $param = $this->_translate_fieldname($this->_field_data[$param]['label']); @@ -704,7 +704,7 @@ class CI_Form_validation { // Grab the variable $line = substr($fieldname, 5); - // Were we able to translate the field name? If not we use $line + // Were we able to translate the field name? If not we use $line if (FALSE === ($fieldname = $this->CI->lang->line($line))) { return $line; @@ -735,7 +735,7 @@ class CI_Form_validation { } // If the data is an array output them one at a time. - // E.g: form_input('name[]', set_value('name[]'); + // E.g: form_input('name[]', set_value('name[]'); if (is_array($this->_field_data[$field]['postdata'])) { return array_shift($this->_field_data[$field]['postdata']); @@ -914,7 +914,7 @@ class CI_Form_validation { return FALSE; } - return TRUE; + return TRUE; } // -------------------------------------------------------------------- @@ -1207,7 +1207,7 @@ class CI_Form_validation { // -------------------------------------------------------------------- /** - * Is a Natural number (0,1,2,3, etc.) + * Is a Natural number (0,1,2,3, etc.) * * @access public * @param string @@ -1221,7 +1221,7 @@ class CI_Form_validation { // -------------------------------------------------------------------- /** - * Is a Natural number, but not a zero (1,2,3, etc.) + * Is a Natural number, but not a zero (1,2,3, etc.) * * @access public * @param string @@ -1354,7 +1354,7 @@ class CI_Form_validation { */ function encode_php_tags($str) { - return str_replace(array(''), array('<?php', '<?PHP', '<?', '?>'), $str); + return str_replace(array(''), array('<?php', '<?PHP', '<?', '?>'), $str); } } -- cgit v1.2.3-24-g4f1b