Skip to content

Commit

Permalink
Fix table generation for judo
Browse files Browse the repository at this point in the history
  • Loading branch information
digedag committed Apr 4, 2024
1 parent aa0fea8 commit 22702f7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Classes/Table/Judo/Comparator.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ public function compare($t1, $t2)

if ($t1['points'] == $t2['points']) {
// Punkte sind gleich, also Differenzen der Siege prüfen
$t1diff = $t1['goals1'] - $t1['goals2'];
$t2diff = $t2['goals1'] - $t2['goals2'];
$t1diff = $t1['fights1'] - $t1['fights2'];
$t2diff = $t2['fights1'] - $t2['fights2'];
if ($t1diff == $t2diff) {
// Jetzt zählt die Differenz der Unterbewertung
$t1scorediff = $t1['score1'] - $t1['score2'];
$t2scorediff = $t2['score1'] - $t2['score2'];
$t1scorediff = $t1['scores1'] - $t1['scores2'];
$t2scorediff = $t2['scores1'] - $t2['scores2'];
if ($t1scorediff == $t2scorediff) {
return 0; // Punkt und Torgleich
}
Expand Down
4 changes: 4 additions & 0 deletions Resources/Private/Language/de.locallang_db.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,10 @@
<source>Volleyball 3 point system</source>
<target>Volleyball 3 Punktsystem</target>
</trans-unit>
<trans-unit id="tablestrategy_judo_2point" xml:space="preserve">
<source>Judo 2 point system</source>
<target>Judo 2 Punktsystem</target>
</trans-unit>
</body>
</file>
</xliff>
3 changes: 3 additions & 0 deletions Resources/Private/Language/locallang_db.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,9 @@
<trans-unit id="tablestrategy_volleyball_3point" xml:space="preserve">
<source>Volleyball 3 point system</source>
</trans-unit>
<trans-unit id="tablestrategy_judo_2point" xml:space="preserve">
<source>Judo 2 point system</source>
</trans-unit>
</body>
</file>
</xliff>
1 change: 1 addition & 0 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
System25\T3sports\Utility\Misc::registerTableStrategy('pointpermatch', 'LLL:EXT:cfc_league_fe/Resources/Private/Language/locallang_db.xlf:tablestrategy_pointpermatch', System25\T3sports\Table\ComparatorPPM::class);
System25\T3sports\Utility\Misc::registerTableStrategy('volleyball3', 'LLL:EXT:cfc_league_fe/Resources/Private/Language/locallang_db.xlf:tablestrategy_volleyball_3point', System25\T3sports\Table\Volleyball\Comparator3Point::class);
System25\T3sports\Utility\Misc::registerTableStrategy('volleyball2', 'LLL:EXT:cfc_league_fe/Resources/Private/Language/locallang_db.xlf:tablestrategy_volleyball_2point', System25\T3sports\Table\Volleyball\Comparator::class);
System25\T3sports\Utility\Misc::registerTableStrategy('judo2', 'LLL:EXT:cfc_league_fe/Resources/Private/Language/locallang_db.xlf:tablestrategy_judo_2point', System25\T3sports\Table\Judo\Comparator::class);

// FIXME: use DI for T3 10.x and higher
// if (!\Sys25\RnBase\Utility\TYPO3::isTYPO104OrHigher()) {
Expand Down

0 comments on commit 22702f7

Please sign in to comment.