From 63fb3222e69b8d060f0f3d42dd6efc16d65fce2e Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Fri, 28 Oct 2005 21:31:01 +0000 Subject: [PATCH] 1. syntax error fixed 2. r.e. for the time format fixed --- helm/matita/scripts/public_html/common.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) { -- 2.39.2