summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/helpers/captcha_helper.php11
-rw-r--r--system/helpers/date_helper.php66
-rw-r--r--system/libraries/Form_validation.php5
3 files changed, 4 insertions, 78 deletions
diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php
index 6fce05267..43b98b71f 100644
--- a/system/helpers/captcha_helper.php
+++ b/system/helpers/captcha_helper.php
@@ -54,13 +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 (deprecated)
- * @param string $img_url URL to the CAPTCHA image folder (deprecated)
- * @param string $font_path Server path to font (deprecated)
- * @return string
+ * @param array $data Data for the CAPTCHA
+ * @return array
*/
- function create_captcha($data = '', $img_path = '', $img_url = '', $font_path = '')
+ function create_captcha($data)
{
$defaults = array(
'word' => '',
@@ -106,7 +103,7 @@ if ( ! function_exists('create_captcha'))
if ($img_path === '' OR $img_url === '')
{
- log_message('error', 'create_captcha(): $img_path and $img_url are required.');
+ log_message('error', 'create_captcha(): img_path and img_url are required.');
return FALSE;
}
diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php
index db9e9642d..f04bdcc30 100644
--- a/system/helpers/date_helper.php
+++ b/system/helpers/date_helper.php
@@ -450,72 +450,6 @@ if ( ! function_exists('human_to_unix'))
// ------------------------------------------------------------------------
-if ( ! function_exists('nice_date'))
-{
- /**
- * Turns many "reasonably-date-like" strings into something
- * that is actually useful. This only works for dates after unix epoch.
- *
- * @deprecated 3.1.3 Use DateTime::createFromFormat($input_format, $input)->format($output_format);
- * @param string The terribly formatted date-like string
- * @param string Date format to return (same as php date function)
- * @return string
- */
- function nice_date($bad_date = '', $format = FALSE)
- {
- if (empty($bad_date))
- {
- return 'Unknown';
- }
- elseif (empty($format))
- {
- $format = 'U';
- }
-
- // Date like: YYYYMM
- if (preg_match('/^\d{6}$/i', $bad_date))
- {
- if (in_array(substr($bad_date, 0, 2), array('19', '20')))
- {
- $year = substr($bad_date, 0, 4);
- $month = substr($bad_date, 4, 2);
- }
- else
- {
- $month = substr($bad_date, 0, 2);
- $year = substr($bad_date, 2, 4);
- }
-
- return date($format, strtotime($year.'-'.$month.'-01'));
- }
-
- // Date Like: YYYYMMDD
- if (preg_match('/^\d{8}$/i', $bad_date, $matches))
- {
- return DateTime::createFromFormat('Ymd', $bad_date)->format($format);
- }
-
- // Date Like: MM-DD-YYYY __or__ M-D-YYYY (or anything in between)
- if (preg_match('/^(\d{1,2})-(\d{1,2})-(\d{4})$/i', $bad_date, $matches))
- {
- return date($format, strtotime($matches[3].'-'.$matches[1].'-'.$matches[2]));
- }
-
- // Any other kind of string, when converted into UNIX time,
- // produces "0 seconds after epoc..." is probably bad...
- // return "Invalid Date".
- if (date('U', strtotime($bad_date)) === '0')
- {
- return 'Invalid Date';
- }
-
- // It's probably a valid-ish date format already
- return date($format, strtotime($bad_date));
- }
-}
-
-// ------------------------------------------------------------------------
-
if ( ! function_exists('timezone_menu'))
{
/**
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 043a97c6d..ce844686c 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -851,11 +851,6 @@ class CI_Form_validation {
{
return $line;
}
- // DEPRECATED support for non-prefixed keys, lang file again
- elseif (FALSE !== ($line = $this->CI->lang->line($rule, FALSE)))
- {
- return $line;
- }
return $this->CI->lang->line('form_validation_error_message_not_set').'('.$rule.')';
}