Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
726a305b
Commit
726a305b
authored
Nov 19, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed test break.
parent
dd97c002
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
Sort.php
framework/yii/data/Sort.php
+6
-6
No files found.
framework/yii/data/Sort.php
View file @
726a305b
...
@@ -355,21 +355,21 @@ class Sort extends Object
...
@@ -355,21 +355,21 @@ class Sort extends Object
$definition
=
$this
->
attributes
[
$attribute
];
$definition
=
$this
->
attributes
[
$attribute
];
$directions
=
$this
->
getAttributeOrders
();
$directions
=
$this
->
getAttributeOrders
();
if
(
isset
(
$directions
[
$attribute
]))
{
if
(
isset
(
$directions
[
$attribute
]))
{
$d
escending
=
$directions
[
$attribute
]
!==
SORT_DESC
;
$d
irection
=
$directions
[
$attribute
]
===
SORT_DESC
?
SORT_ASC
:
SORT_DESC
;
unset
(
$directions
[
$attribute
]);
unset
(
$directions
[
$attribute
]);
}
else
{
}
else
{
$d
escending
=
isset
(
$definition
[
'default'
])
&&
$definition
[
'default'
]
===
SORT_DE
SC
;
$d
irection
=
isset
(
$definition
[
'default'
])
?
$definition
[
'default'
]
:
SORT_A
SC
;
}
}
if
(
$this
->
enableMultiSort
)
{
if
(
$this
->
enableMultiSort
)
{
$directions
=
array_merge
([
$attribute
=>
$d
escending
],
$directions
);
$directions
=
array_merge
([
$attribute
=>
$d
irection
],
$directions
);
}
else
{
}
else
{
$directions
=
[
$attribute
=>
$d
escending
];
$directions
=
[
$attribute
=>
$d
irection
];
}
}
$sorts
=
[];
$sorts
=
[];
foreach
(
$directions
as
$attribute
=>
$d
escending
)
{
foreach
(
$directions
as
$attribute
=>
$d
irection
)
{
$sorts
[]
=
$d
escending
?
$attribute
.
$this
->
separators
[
1
]
.
$this
->
descTag
:
$attribute
;
$sorts
[]
=
$d
irection
===
SORT_DESC
?
$attribute
.
$this
->
separators
[
1
]
.
$this
->
descTag
:
$attribute
;
}
}
return
implode
(
$this
->
separators
[
0
],
$sorts
);
return
implode
(
$this
->
separators
[
0
],
$sorts
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment