@@ -292,7 +292,7 @@ |
||
292 | 292 | |
293 | 293 | /** |
294 | 294 | * @var array|NULL |
295 | - **/ |
|
295 | + **/ |
|
296 | 296 | protected $rows; |
297 | 297 | |
298 | 298 |
@@ -410,8 +410,9 @@ discard block |
||
410 | 410 | */ |
411 | 411 | public function getRows($refresh = FALSE) |
412 | 412 | { |
413 | - if (is_array($this->rows) && !$refresh) |
|
414 | - return $this->rows; |
|
413 | + if (is_array($this->rows) && !$refresh) { |
|
414 | + return $this->rows; |
|
415 | + } |
|
415 | 416 | /** |
416 | 417 | * Prepare data for rendering (datagrid may render just one item) |
417 | 418 | */ |
@@ -423,8 +424,9 @@ discard block |
||
423 | 424 | } else { |
424 | 425 | if (empty($this->sort_callback) && !empty($this->sort)) { |
425 | 426 | $column = $this->getColumn(array_keys($this->sort)[0]); |
426 | - if ($column->isSortable() AND Nette\Utils\Validators::isCallable($column->getSortableCallback())) |
|
427 | - $this->sort_callback = $column->getSortableCallback(); |
|
427 | + if ($column->isSortable() AND Nette\Utils\Validators::isCallable($column->getSortableCallback())) { |
|
428 | + $this->sort_callback = $column->getSortableCallback(); |
|
429 | + } |
|
428 | 430 | } |
429 | 431 | |
430 | 432 | $items = Nette\Utils\Callback::invokeArgs( |