Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
joyqi committed May 12, 2020
1 parent 371e6c9 commit 3413dfd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Typecho-dev-Ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['7.0','7.2', '7.3', '7.4']
php: ['7.2', '7.3', '7.4']
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down
8 changes: 7 additions & 1 deletion var/Typecho/Db/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,13 @@ public function expression($key, $value, $escape = true)
*/
public function order($orderby, $sort = Typecho_Db::SORT_ASC)
{
$this->_sqlPreBuild['order'] = ' ORDER BY ' . $this->filterColumn($orderby) . (empty($sort) ? NULL : ' ' . $sort);
if (empty($this->_sqlPreBuild['order'])) {
$this->_sqlPreBuild['order'] = ' ORDER BY ';
} else {
$this->_sqlPreBuild['order'] .= ', ';
}

$this->_sqlPreBuild['order'] .= $this->filterColumn($orderby) . (empty($sort) ? NULL : ' ' . $sort);
return $this;
}

Expand Down

0 comments on commit 3413dfd

Please sign in to comment.