Skip to content
Browse files

Performance optimization

  • Loading branch information...
1 parent 1a85ed0 commit 0fe0be8e44c9188514b7b998592e7516300a31b2 @Yiivgeny committed Oct 5, 2012
Showing with 8 additions and 4 deletions.
  1. +8 −4 framework/web/CArrayDataProvider.php
View
12 framework/web/CArrayDataProvider.php
@@ -156,12 +156,16 @@ protected function sortData($directions)
*/
protected function getSortingFieldValue($data, $fields)
{
- foreach($fields as $field){
- if(is_object($data))
+ if(is_object($data))
+ {
+ foreach($fields as $field)
$data=isset($data->$field) ? $data->$field : null;
- else
+ }
+ else
+ {
+ foreach($fields as $field)
$data=isset($data[$field]) ? $data[$field] : null;
- }
+ }
return $this->caseSensitiveSort ? $data : mb_strtolower($data,Yii::app()->charset);
}

0 comments on commit 0fe0be8

Please sign in to comment.
Something went wrong with that request. Please try again.