Skip to content

Commit

Permalink
Bug #185: Исправлен баг в DataProviderList
Browse files Browse the repository at this point in the history
  • Loading branch information
tatarinov committed May 13, 2015
1 parent 134978e commit 80ab0a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions protected/models/product/DataProviderList.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,16 @@ public function getDataProvider($modelId)
$groupedProducts = array();
foreach($productList->getDataProvider()->getData() as $product)
{
foreach($modelProductIds as $modelId => $productIds)
foreach($modelProductIds as $id => $productIds)
{
if( array_search($product->id, $productIds) !== false )
$groupedProducts[$modelId][$product->id] = $product;
$groupedProducts[$id][$product->id] = $product;
}
}

foreach($groupedProducts as $modelId => $products)
foreach($groupedProducts as $id => $products)
{
$this->dataProviders[$modelId] = new FArrayDataProvider($products, array('pagination' => false));
$this->dataProviders[$id] = new FArrayDataProvider($products, array('pagination' => false));
}
}

Expand Down

0 comments on commit 80ab0a1

Please sign in to comment.