summaryrefslogtreecommitdiff
path: root/tdd-bootstrap.php
diff options
context:
space:
mode:
authorMichal Zimniewicz <michzimny@gmail.com>2018-01-27 16:56:11 +0100
committerMichal Zimniewicz <michzimny@gmail.com>2018-01-27 16:56:11 +0100
commit9ccba9a707d072e73e694d61053ce392fe8c8b88 (patch)
tree98854a7437ffc80e5c93fb47e1b9aad94f2281ba /tdd-bootstrap.php
parent68d0e18bf222ff6256cf8d2c45d27a5e176c35f3 (diff)
properly handle arbitral scores
Diffstat (limited to 'tdd-bootstrap.php')
-rw-r--r--tdd-bootstrap.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/tdd-bootstrap.php b/tdd-bootstrap.php
index 4626f90..bcea810 100644
--- a/tdd-bootstrap.php
+++ b/tdd-bootstrap.php
@@ -42,8 +42,9 @@ class Protocol {
$tricks2 = trim(str_replace('&nbsp;', '', $tr->next_sibling()->find('td[class="bdc"]', 3)->innertext));
// if is played on both tables of a match
- if(($tricks1 || $contract1 == 'ARB')
- && ($tricks2 || $contract2 == 'ARB')) {
+ // note that the contract field for arbitral scores starts with 'A' (e.g. 'ARB' or 'AAA')
+ if(($tricks1 || strpos($contract1, 'A') === 0)
+ && ($tricks2 || strpos($contract2, 'A') === 0)) {
$deal = $this->deals_by_tables[$table];
$insert = "<h4>Stół $table &ndash; Rozdanie {$deal->deal_num}</h4>" . $deal->html();
$modified = 1;