From 1af4ffd21a816316cc5d10ee0e0eba40e0290930 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Thu, 24 Oct 2013 16:55:45 +0400 Subject: [PATCH] Fixes #1056: removed 5.3 compatibiltiy code from ArrayHelper::multisort, fixed phpdoc --- framework/yii/helpers/BaseArrayHelper.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/framework/yii/helpers/BaseArrayHelper.php b/framework/yii/helpers/BaseArrayHelper.php index b7d0a2f..a5382e7 100644 --- a/framework/yii/helpers/BaseArrayHelper.php +++ b/framework/yii/helpers/BaseArrayHelper.php @@ -336,7 +336,7 @@ class BaseArrayHelper * @param boolean|array $descending whether to sort in descending or ascending order. When * sorting by multiple keys with different descending orders, use an array of descending flags. * @param integer|array $sortFlag the PHP sort flag. Valid values include - * `SORT_REGULAR`, `SORT_NUMERIC`, `SORT_STRING` and `SORT_LOCALE_STRING`. + * `SORT_REGULAR`, `SORT_NUMERIC`, `SORT_STRING`, `SORT_LOCALE_STRING`, `SORT_NATURAL` and `SORT_FLAG_CASE`. * Please refer to [PHP manual](http://php.net/manual/en/function.sort.php) * for more details. When sorting by multiple keys with different sort flags, use an array of sort flags. * @param boolean|array $caseSensitive whether to sort string in case-sensitive manner. This parameter @@ -372,16 +372,8 @@ class BaseArrayHelper $flag = $sortFlag[$i]; $cs = $caseSensitive[$i]; if (!$cs && ($flag === SORT_STRING)) { - if (defined('SORT_FLAG_CASE')) { - $flag = $flag | SORT_FLAG_CASE; - $args[] = static::getColumn($array, $key); - } else { - $column = []; - foreach (static::getColumn($array, $key) as $k => $value) { - $column[$k] = mb_strtolower($value); - } - $args[] = $column; - } + $flag = $flag | SORT_FLAG_CASE; + $args[] = static::getColumn($array, $key); } else { $args[] = static::getColumn($array, $key); }