summaryrefslogtreecommitdiffstats
path: root/system/helpers/captcha_helper.php
diff options
context:
space:
mode:
authorAlex Bilbie <alex@alexbilbie.com>2012-09-03 19:58:29 +0200
committerAlex Bilbie <alex@alexbilbie.com>2012-09-03 19:58:29 +0200
commitffeaf809d5d1fbb0a506ff2fcdc9cbe2c657e1e4 (patch)
treef0337dc5c2566bf53f260f08d39547aa2f7858be /system/helpers/captcha_helper.php
parent5e9710842dc6981f4eb03c1622eabee9b3171dea (diff)
parente775b864b741ee0a44b09739c18e71abdadc1291 (diff)
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into codeigniter/develop
Diffstat (limited to 'system/helpers/captcha_helper.php')
-rw-r--r--system/helpers/captcha_helper.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php
index a4383c9d3..57ef9e2fa 100644
--- a/system/helpers/captcha_helper.php
+++ b/system/helpers/captcha_helper.php
@@ -80,8 +80,7 @@ if ( ! function_exists('create_captcha'))
$current_dir = @opendir($img_path);
while ($filename = @readdir($current_dir))
{
- if ($filename !== '.' && $filename !== '..' && $filename !== 'index.html'
- && (str_replace('.jpg', '', $filename) + $expiration) < $now)
+ if (strpos($filename, ".jpg") !== FALSE && (str_replace('.jpg', '', $filename) + $expiration) < $now)
{
@unlink($img_path.$filename);
}