Convert commas into dots
authorJoey Schulze <joey@infodrom.org>
Thu, 13 May 2010 20:02:00 +0000 (22:02 +0200)
committerJoey Schulze <joey@infodrom.org>
Thu, 13 May 2010 20:02:00 +0000 (22:02 +0200)
masks/korrektur.php

index e1d1f12..8928944 100644 (file)
@@ -456,6 +456,8 @@ function korrektur_save($mask)
       $sth = pg_query($sql);
       $row = pg_fetch_assoc($sth);
 
+      $_POST['stunden'.$app] = str_replace(',','.',$_POST['stunden'.$app]);
+
       if ($row['personal'] != $_POST['personal'.$app] ||
          $row['stunden'] != $_POST['stunden'.$app]) {
        $sql = sprintf("UPDATE einsatzpersonal SET personal=%d,stunden=%.2f,sys_user='%s',sys_edit=now() WHERE id = %d",
@@ -475,6 +477,8 @@ function korrektur_save($mask)
       $sth = pg_query($sql);
       $row = pg_fetch_assoc($sth);
 
+      $_POST['stunden'.$app] = str_replace(',','.',$_POST['stunden'.$app]);
+
       if ($row['geraet'] != $_POST['geraet'.$app] ||
          ($row['anbaugeraet'] === NULL && !empty($_POST['anbaugeraet'.$app])) ||
          ($row['anbaugeraet'] !== NULL && $row['anbaugeraet'] != $_POST['anbaugeraet'.$app]) ||