Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
rename persistent property
Browse files Browse the repository at this point in the history
  • Loading branch information
natrim committed Jun 12, 2012
1 parent 81e94e2 commit d1ebe3f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Gridito/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Grid extends \Nette\Application\UI\Control
private $defaultSorting = array();

/** @var array */
public $sorting = array();
public $sort = array();

/** @var string */
private $ajaxClass = 'ajax';
Expand Down Expand Up @@ -96,7 +96,7 @@ public function __construct(\Nette\Http\Session $session, \Nette\Http\Request $r
*/
public static function getPersistentParams()
{
return array('sorting');
return array('sort');
}


Expand Down Expand Up @@ -358,11 +358,11 @@ public function getSorting()
{
$sorting = array();

if (is_array($this->sorting) && count($this->sorting) > 0) {
if (is_array($this->sort) && count($this->sort) > 0) {
/* @var $columns \Nette\ComponentModel\IContainer */
$columns = $this['columns'];

foreach ($this->sorting as $sortColumn => $sortType) {
foreach ($this->sort as $sortColumn => $sortType) {
if (is_null($sortType)) {
continue;
}
Expand Down Expand Up @@ -488,7 +488,7 @@ public function handleEdit()
public function handleSort($column, $type)
{
//set sorting
$this->sorting[$column] = $type;
$this->sort[$column] = $type;

if ($this->presenter->isAjax()) {
$this->invalidateControl();
Expand Down

0 comments on commit d1ebe3f

Please sign in to comment.