Refactor custom points handling in Swar6 reader
The logic for handling custom points in the Swar6 reader has been refactored. Previously, if presence points were not set, the absence value was set to the presence value and then the presence key was unset. Now, if presence points are not set, the absence value is directly set to 0 and then the presence key is unset.
This commit is contained in:
parent
58851af343
commit
ebe61ad378
@ -285,8 +285,8 @@ class Swar6 implements ReaderInterface
|
||||
$custompoints['presence'] = $this->readData('Int', $swshandle) / 4;
|
||||
$this->Tournament->IsPresencePoints = (bool)$this->readData('Int', $swshandle);
|
||||
if(!$this->Tournament->IsPresencePoints) {
|
||||
$custompoints['absence'] = $custompoints['presence'];
|
||||
unset($custompoints['presence'])
|
||||
$custompoints['absence'] = 0;
|
||||
unset($custompoints['presence']);
|
||||
}
|
||||
if($applycustompoints) $this->Tournament->CustomPoints = $custompoints;
|
||||
$this->Tournament->TournoiStd = $this->readData('Int', $swshandle);
|
||||
|
Loading…
Reference in New Issue
Block a user