Match result in export missing if home points zero
-
When exporting match results I noticed a strange behavior. The match results are not exported if the match ended with zero points for the home team. We use the volleyball preset for our leagues where matches are best of 5 sets. So, a lot of matches result in a 0-6 score after three sets. These scores will alway be missing in the export.
To fix that, you need to edit the /leaguemanager/admin/admin.php file. Find the function exportMatches(). In line 2418 there is the line to export the match result, and it actually does exactly that: Checks if home_poits are empty, and if so, exports an empty field:
$contents .= !empty($match->home_points) ? sprintf("%d-%d",$match->home_points, $match->away_points) : '';
I guess this was meant to catch matches that are not finished or something, but it doesn’t make sense to me, because it still exports all the other data from the match. In any case, changing the line does the trick, just remove the
!empty()
query alltogether:$contents .= sprintf("%d-%d",$match->home_points, $match->away_points);
- The topic ‘Match result in export missing if home points zero’ is closed to new replies.