Update to CodeIgniter 3.19
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* This content is released under the MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2014 - 2016, British Columbia Institute of Technology
|
||||
* Copyright (c) 2014 - 2018, British Columbia Institute of Technology
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -29,7 +29,7 @@
|
||||
* @package CodeIgniter
|
||||
* @author EllisLab Dev Team
|
||||
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
||||
* @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/)
|
||||
* @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/)
|
||||
* @license http://opensource.org/licenses/MIT MIT License
|
||||
* @link https://codeigniter.com
|
||||
* @since Version 1.0.0
|
||||
@@ -54,10 +54,10 @@ if ( ! function_exists('create_captcha'))
|
||||
/**
|
||||
* Create CAPTCHA
|
||||
*
|
||||
* @param array $data data for the CAPTCHA
|
||||
* @param string $img_path path to create the image in
|
||||
* @param string $img_url URL to the CAPTCHA image folder
|
||||
* @param string $font_path server path to font
|
||||
* @param array $data Data for the CAPTCHA
|
||||
* @param string $img_path Path to create the image in (deprecated)
|
||||
* @param string $img_url URL to the CAPTCHA image folder (deprecated)
|
||||
* @param string $font_path Server path to font (deprecated)
|
||||
* @return string
|
||||
*/
|
||||
function create_captcha($data = '', $img_path = '', $img_url = '', $font_path = '')
|
||||
@@ -110,7 +110,8 @@ if ( ! function_exists('create_captcha'))
|
||||
$current_dir = @opendir($img_path);
|
||||
while ($filename = @readdir($current_dir))
|
||||
{
|
||||
if (substr($filename, -4) === '.jpg' && (str_replace('.jpg', '', $filename) + $expiration) < $now)
|
||||
if (in_array(substr($filename, -4), array('.jpg', '.png'))
|
||||
&& (str_replace(array('.jpg', '.png'), '', $filename) + $expiration) < $now)
|
||||
{
|
||||
@unlink($img_path.$filename);
|
||||
}
|
||||
|
Reference in New Issue
Block a user