diff options
author | admin <devnull@localhost> | 2006-08-27 03:52:51 +0200 |
---|---|---|
committer | admin <devnull@localhost> | 2006-08-27 03:52:51 +0200 |
commit | 141808ad31d4eefad4c6c3dbaf8306fac2342668 (patch) | |
tree | 25c40e5e4e18fb27bb2826ac6ce8fbffd844281c /system/libraries | |
parent | b071bb5a92aade551345a495fb13f5678f3978d0 (diff) |
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Encrypt.php | 2 | ||||
-rw-r--r-- | system/libraries/Language.php | 2 | ||||
-rw-r--r-- | system/libraries/Log.php | 2 | ||||
-rw-r--r-- | system/libraries/Validation.php | 8 |
4 files changed, 7 insertions, 7 deletions
diff --git a/system/libraries/Encrypt.php b/system/libraries/Encrypt.php index 532bfe1f1..bcffdf1ab 100644 --- a/system/libraries/Encrypt.php +++ b/system/libraries/Encrypt.php @@ -322,7 +322,7 @@ class CI_Encrypt { */ function set_hash($type = 'sha1') { - $this->_hash_type = ($type != 'sha1' OR $type != 'md5') ? 'sha1' : $type; + $this->_hash_type = ($type != 'sha1' AND $type != 'md5') ? 'sha1' : $type; } // END set_hash() diff --git a/system/libraries/Language.php b/system/libraries/Language.php index b668aa060..328d53e46 100644 --- a/system/libraries/Language.php +++ b/system/libraries/Language.php @@ -68,7 +68,7 @@ class CI_Language { if ( ! file_exists(BASEPATH.'language/'.$idiom.'/'.$langfile)) { - show_error('Unable to load the requested language file: language/'.$langfile.EXT); + show_error('Unable to load the requested language file: language/'.$langfile); } include_once(BASEPATH.'language/'.$idiom.'/'.$langfile); diff --git a/system/libraries/Log.php b/system/libraries/Log.php index 35e30b64c..17b96b2c2 100644 --- a/system/libraries/Log.php +++ b/system/libraries/Log.php @@ -88,7 +88,7 @@ class CI_Log { return FALSE; } - $filepath = $this->log_path.'log-'.date('Y-m-d').'.php'; + $filepath = $this->log_path.'log-'.date('Y-m-d').EXT; $message = ''; if ( ! file_exists($filepath)) diff --git a/system/libraries/Validation.php b/system/libraries/Validation.php index df8c70ee8..e037e69c5 100644 --- a/system/libraries/Validation.php +++ b/system/libraries/Validation.php @@ -252,12 +252,12 @@ class CI_Validation { // Strip the parameter (if exists) from the rule // Rules can contain a parameter: max_length[5] $param = FALSE; - if (preg_match("/.*?(\[.*?\]).*/", $rule, $match)) + if (preg_match("/(.*?)\[(.*?)\]/", $rule, $match)) { - $param = substr(substr($match['1'], 1), 0, -1); - $rule = str_replace($match['1'], '', $rule); + $rule = $match[1]; + $param = $match[2]; } - + // Call the function that corresponds to the rule if ($callback === TRUE) { |