mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
bug #11511 Change function that orders grid fields (arti0090)
This PR was merged into the 1.7 branch.
Discussion
----------
| Q | A
| --------------- | -----
| Branch? | 1.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Related tickets | #10676
| License | MIT
Commits
-------
53ab9a5ddf Change function that sorts given parameters
This commit is contained in:
commit
d0af87ef4e
1 changed files with 1 additions and 1 deletions
|
|
@ -49,7 +49,7 @@ class SortByExtension extends AbstractExtension
|
|||
$firstProperty = (string) $accessor->getValue($firstElement, $field);
|
||||
$secondProperty = (string) $accessor->getValue($secondElement, $field);
|
||||
|
||||
$result = strcasecmp($firstProperty, $secondProperty);
|
||||
$result = strnatcasecmp($firstProperty, $secondProperty);
|
||||
if ('DESC' === $order) {
|
||||
$result *= -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue