summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2022-01-05 22:44:53 +0100
committerAndrey Andreev <narf@devilix.net>2022-01-05 22:44:53 +0100
commite837d3589ba5c5da5daa58f69bdc14447c90bc51 (patch)
tree9b2fd6ec4f4d753b2c68f3f21ec626e1bd5eabb0 /system
parent627f1058c1d72b267ab8ab441219198d6f2c24c6 (diff)
Drop some previously deprecated functionality
Diffstat (limited to 'system')
-rw-r--r--system/database/DB_forge.php10
-rw-r--r--system/helpers/string_helper.php4
-rw-r--r--system/helpers/url_helper.php15
-rw-r--r--system/libraries/Pagination.php8
4 files changed, 4 insertions, 33 deletions
diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php
index ce9b30d82..f31823536 100644
--- a/system/database/DB_forge.php
+++ b/system/database/DB_forge.php
@@ -556,25 +556,17 @@ abstract class CI_DB_forge {
/**
* Column Add
*
- * @todo Remove deprecated $_after option in 3.1+
* @param string $table Table name
* @param array $field Column definition
- * @param string $_after Column for AFTER clause (deprecated)
* @return bool
*/
- public function add_column($table, $field, $_after = NULL)
+ public function add_column($table, $field)
{
// Work-around for literal column definitions
is_array($field) OR $field = array($field);
foreach (array_keys($field) as $k)
{
- // Backwards-compatibility work-around for MySQL/CUBRID AFTER clause (remove in 3.1+)
- if ($_after !== NULL && is_array($field[$k]) && ! isset($field[$k]['after']))
- {
- $field[$k]['after'] = $_after;
- }
-
$this->add_field(array($k => $field[$k]));
}
diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php
index 3a05525db..5b359f730 100644
--- a/system/helpers/string_helper.php
+++ b/system/helpers/string_helper.php
@@ -170,7 +170,7 @@ if ( ! function_exists('random_string'))
/**
* Create a "Random" String
*
- * @param string type of random string. basic, alpha, alnum, numeric, nozero, unique, md5, encrypt and sha1
+ * @param string type of random string. basic, alpha, alnum, numeric, nozero, md5 and sha1
* @param int number of characters
* @return string
*/
@@ -200,10 +200,8 @@ if ( ! function_exists('random_string'))
break;
}
return substr(str_shuffle(str_repeat($pool, ceil($len / strlen($pool)))), 0, $len);
- case 'unique': // todo: remove in 3.1+
case 'md5':
return md5(uniqid(mt_rand()));
- case 'encrypt': // todo: remove in 3.1+
case 'sha1':
return sha1(uniqid(mt_rand(), TRUE));
}
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
index 4c060a203..17601c40c 100644
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.php
@@ -470,31 +470,20 @@ if ( ! function_exists('url_title'))
* human-friendly URL string with a "separator" string
* as the word separator.
*
- * @todo Remove old 'dash' and 'underscore' usage in 3.1+.
* @param string $str Input string
- * @param string $separator Word separator
- * (usually '-' or '_')
+ * @param string $separator Word separator (usually '-' or '_')
* @param bool $lowercase Whether to transform the output string to lowercase
* @return string
*/
function url_title($str, $separator = '-', $lowercase = FALSE)
{
- if ($separator === 'dash')
- {
- $separator = '-';
- }
- elseif ($separator === 'underscore')
- {
- $separator = '_';
- }
-
$q_separator = preg_quote($separator, '#');
$trans = array(
'&.+?;' => '',
'[^\w\d _-]' => '',
'\s+' => $separator,
- '('.$q_separator.')+' => $separator
+ '('.$q_separator.')+' => $separator,
);
$str = strip_tags($str);
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php
index 20418c00a..837ac4b32 100644
--- a/system/libraries/Pagination.php
+++ b/system/libraries/Pagination.php
@@ -363,14 +363,6 @@ class CI_Pagination {
unset($params['attributes']);
}
- // Deprecated legacy support for the anchor_class option
- // Should be removed in CI 3.1+
- if (isset($params['anchor_class']))
- {
- empty($params['anchor_class']) OR $attributes['class'] = $params['anchor_class'];
- unset($params['anchor_class']);
- }
-
foreach ($params as $key => $val)
{
if (property_exists($this, $key))