X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2Fscripts%2Fpublic_html%2Fcommon.php;h=e1bef4dd71599bd3385a8ab28749f239f062d358;hb=97c2d258a5c524eb5c4b85208899d80751a2c82f;hp=10aeb8d823a025758c0a51dc349917c1fb48be84;hpb=d6b38a5565abd0efa64578639a097761ea298dbc;p=helm.git 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) {