summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tdd-bootstrap.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/tdd-bootstrap.php b/tdd-bootstrap.php
index bcea810..f85a786 100644
--- a/tdd-bootstrap.php
+++ b/tdd-bootstrap.php
@@ -37,14 +37,14 @@ class Protocol {
$table = (int)$table;
if($table && array_key_exists($table, $this->deals_by_tables)) {
$contract1 = trim(str_replace(' ', '', $tr->find('td[class="bdc"]', 0)->innertext));
- $tricks1 = trim(str_replace(' ', '', $tr->find('td[class="bdc"]', 3)->innertext));
+ $score1 = trim(str_replace(' ', '', end($tr->find('td'))->innertext));
$contract2 = trim(str_replace(' ', '', $tr->next_sibling()->find('td[class="bdc"]', 0)->innertext));
- $tricks2 = trim(str_replace(' ', '', $tr->next_sibling()->find('td[class="bdc"]', 3)->innertext));
+ $score2 = trim(str_replace(' ', '', end($tr->next_sibling()->find('td'))->innertext));
// if is played on both tables of a match
// 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)) {
+ if(($score1 !== '' || strpos($contract1, 'A') === 0)
+ && ($score2 !== '' || strpos($contract2, 'A') === 0)) {
$deal = $this->deals_by_tables[$table];
$insert = "<h4>Stół $table &ndash; Rozdanie {$deal->deal_num}</h4>" . $deal->html();
$modified = 1;