부대 번호를 부대장 ID로 변경
This commit is contained in:
@@ -24,11 +24,7 @@ class MustBeTroopLeader extends Constraint{
|
||||
$this->checkInputValues();
|
||||
$this->tested = true;
|
||||
|
||||
//XXX: 부대장인지 알 수가 없음
|
||||
$db = DB::db();
|
||||
$troopLeader = $db->queryFirstField('SELECT no FROM troop WHERE troop = %i', $this->general['troop']);
|
||||
|
||||
if($troopLeader == $this->general['no']){
|
||||
if($this->general['no'] == $this->general['troop']){
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class ReqTroopMembers extends Constraint{
|
||||
|
||||
$db = DB::db();
|
||||
//NOTE:이 경우에 DB를 사용하지 않을 수 있는가?
|
||||
$troopMember = $db->queryFirstField('SELECT no FROM troop WHERE troop = %i AND no != %i LIMIT 1', $this->general['troop'], $this->general['no']);
|
||||
$troopMember = $db->queryFirstField('SELECT no FROM general WHERE troop = %i AND no != %i LIMIT 1', $this->general['troop'], $this->general['troop']);
|
||||
|
||||
if($troopMember !== null){
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user