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

Commit

Permalink
제재안 목록 정렬 순서 교정
Browse files Browse the repository at this point in the history
  • Loading branch information
lens0021 committed Oct 16, 2018
1 parent c06df08 commit a62e7e9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions includes/SanctionsPager.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function getIndexField () {

function getExtraSortFields () {
if ( $this->getUserHasVoteRight() )
return ['voted_from', 'st_expiry'];
return [ 'my_sanction', 'voted_from', 'st_expiry' ];
return null;
}

Expand All @@ -39,9 +39,9 @@ function getQueryInfo () {
],
'fields' => [
'st_id',
'st_author',
'my_sanction' => 'st_author = ' . $this->getUser()->getId(),
'st_expiry',
'not_expired' => 'st_expiry > '.wfTimestamp(TS_MW),
'not_expired' => 'st_expiry > ' . wfTimestamp(TS_MW),
],
'conds' => [ 'st_handled' => 0 ]
];
Expand All @@ -50,9 +50,9 @@ function getQueryInfo () {
$query['conds'][] = 'st_target = '.User::newFromName( $this->targetName )->getId();

if ( $this->getUserHasVoteRight() ) {
$query['tables']['sub'] = '('.$subquery.') AS'; // AS를 따로 써야 작동하길래 이렇게 썼는데 당최 이게 맞는지??
$query['tables']['sub'] = '(' . $subquery . ') AS'; // AS를 따로 쓰지 않으면 정상적으로 작동하지 않습니다.
$query['fields']['voted_from'] = 'stv_id';
$query['join_conds'] = ['sub' => ['LEFT JOIN', 'st_topic = sub.stv_topic']];
$query['join_conds'] = [ 'sub' => [ 'LEFT JOIN', 'st_topic = sub.stv_topic' ] ];
} else {
// 제재 절차 참가 권한이 없을 때는 만료된 제재안은 보지 않습니다.
$query['conds'][] = 'st_expiry > '.wfTimestamp(TS_MW);
Expand Down

0 comments on commit a62e7e9

Please sign in to comment.