diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-05-13 05:02:46 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-05-13 05:02:46 +0400 |
commit | bbe03043ad61dbffa4432d1439b4855cd52530e7 (patch) | |
tree | 588a84d438f3bbed4f1c2239eba9ec4a129be335 /core/DataTable/Filter/Sort.php | |
parent | c334dcdfda0b7c80b5c37bf8f698a8e08e21710c (diff) |
refs #4706 fix sort test
Diffstat (limited to 'core/DataTable/Filter/Sort.php')
-rw-r--r-- | core/DataTable/Filter/Sort.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/core/DataTable/Filter/Sort.php b/core/DataTable/Filter/Sort.php index 5844208940..ce25898e97 100644 --- a/core/DataTable/Filter/Sort.php +++ b/core/DataTable/Filter/Sort.php @@ -74,6 +74,14 @@ class Sort extends BaseFilter $valA = $a->getColumn($this->columnToSort); $valB = $b->getColumn($this->columnToSort); + if ($valA === false) { + $valA = null; + } + + if ($valB === false) { + $valB = null; + } + return !isset($valA) && !isset($valB) ? 0 @@ -111,6 +119,14 @@ class Sort extends BaseFilter $valA = $a->getColumn($this->columnToSort); $valB = $b->getColumn($this->columnToSort); + if ($valA === false) { + $valA = null; + } + + if ($valB === false) { + $valB = null; + } + return !isset($valA) && !isset($valB) ? 0 @@ -138,6 +154,14 @@ class Sort extends BaseFilter $valA = $a->getColumn($this->columnToSort); $valB = $b->getColumn($this->columnToSort); + if ($valA === false) { + $valA = null; + } + + if ($valB === false) { + $valB = null; + } + return !isset($valA) && !isset($valB) ? 0 @@ -224,6 +248,7 @@ class Sort extends BaseFilter $methodToUse = "sortString"; } } + $table->sort(array($this, $methodToUse), $this->columnToSort); } } |