diff options
author | Rick Ellis <rick.ellis@ellislab.com> | 2008-10-04 03:47:48 +0200 |
---|---|---|
committer | Rick Ellis <rick.ellis@ellislab.com> | 2008-10-04 03:47:48 +0200 |
commit | 9af2ec4d32deb49282587b45d2a02446a6400b19 (patch) | |
tree | e8dbf870a5500552e65ea0db7eeef296fd0dbc24 /system/libraries | |
parent | 694f2c6474f924b2f22a1330d0c0b51757862274 (diff) |
removed some ereg() calls for better performance
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Upload.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 42d02d941..3832dab06 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -398,7 +398,7 @@ class CI_Upload { */
function set_max_filesize($n)
{
- $this->max_size = ( ! eregi("^[[:digit:]]+$", $n)) ? 0 : $n;
+ $this->max_size = ((int) $n < 0) ? 0: (int) $n;
}
// --------------------------------------------------------------------
@@ -412,7 +412,7 @@ class CI_Upload { */
function set_max_filename($n)
{
- $this->max_filename = ( ! eregi("^[[:digit:]]+$", $n)) ? 0 : $n;
+ $this->max_filename = ((int) $n < 0) ? 0: (int) $n;
}
// --------------------------------------------------------------------
@@ -426,7 +426,7 @@ class CI_Upload { */
function set_max_width($n)
{
- $this->max_width = ( ! eregi("^[[:digit:]]+$", $n)) ? 0 : $n;
+ $this->max_width = ((int) $n < 0) ? 0: (int) $n;
}
// --------------------------------------------------------------------
@@ -440,7 +440,7 @@ class CI_Upload { */
function set_max_height($n)
{
- $this->max_height = ( ! eregi("^[[:digit:]]+$", $n)) ? 0 : $n;
+ $this->max_height = ((int) $n < 0) ? 0: (int) $n;
}
// --------------------------------------------------------------------
|