From: Claudio Sacerdoti Coen Date: Fri, 28 Oct 2005 21:31:01 +0000 (+0000) Subject: 1. syntax error fixed X-Git-Tag: V_0_7_2_3~168 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=63fb3222e69b8d060f0f3d42dd6efc16d65fce2e;p=helm.git 1. syntax error fixed 2. r.e. for the time format fixed --- diff --git a/helm/matita/scripts/public_html/common.php b/helm/matita/scripts/public_html/common.php index 10aeb8d82..e1bef4dd7 100644 --- a/helm/matita/scripts/public_html/common.php +++ b/helm/matita/scripts/public_html/common.php @@ -27,9 +27,9 @@ function query($q) { function time_2_cents($t) { $matches = array(); - $rex = "/^(\d+)m(\d{2})\.(\d{2})s$/"; + $rex = "/^(\d+)m(\d\d?)\.(\d{2})s$/"; $m = preg_match($rex,$t,$matches); - if ( $m == 0 ) exit 1; + if ( $m == 0 ) exit(1); $t_minutes = $matches[1]; $t_secs = $matches[2]; $t_cents = $matches[3]; @@ -39,7 +39,7 @@ function time_2_cents($t) { function sum_time($t1, $t2) { $matches1 = array(); $matches2 = array(); - $rex = "/^(\d+)m(\d{2})\.(\d{2})s$/"; + $rex = "/^(\d+)m(\d\d?)\.(\d{2})s$/"; $m1 = preg_match($rex,$t1,$matches1); $m2 = preg_match($rex,$t2,$matches2); if ($m1 != 0 && $m2 != 0) {