From 9ccba9a707d072e73e694d61053ce392fe8c8b88 Mon Sep 17 00:00:00 2001 From: Michal Zimniewicz Date: Sat, 27 Jan 2018 16:56:11 +0100 Subject: properly handle arbitral scores --- tdd-bootstrap.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tdd-bootstrap.php') 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(' ', '', $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 = "

Stół $table – Rozdanie {$deal->deal_num}

" . $deal->html(); $modified = 1; -- cgit v1.2.3