Update start and end timestamp
authorJoey Schulze <joey@infodrom.org>
Wed, 21 Aug 2019 07:44:35 +0000 (09:44 +0200)
committerJoey Schulze <joey@infodrom.org>
Wed, 21 Aug 2019 07:44:35 +0000 (09:44 +0200)
src/InfoCon/stempel/update.wml

index d26e267..6084bd4 100644 (file)
     $sth = pg_exec ($dbh, $query);
     echo('<p><strong>Deleted.</strong></p>');
   } else {
     $sth = pg_exec ($dbh, $query);
     echo('<p><strong>Deleted.</strong></p>');
   } else {
-    $query = sprintf("UPDATE stempel SET time=%d, task='%s', status=%d WHERE oid = %d",
+    $query = sprintf("UPDATE stempel SET time=%d, start='%s', stop='%s', task='%s', status=%d WHERE oid = %d",
                     hour2min($_POST['time']),
                     hour2min($_POST['time']),
+                    pg_escape_string($dbh, $_POST['start']),
+                    pg_escape_string($dbh, $_POST['stop']),
                     pg_escape_string($dbh, $_POST['task']),
                     $_POST['status'],
                     $_POST['oid']);
                     pg_escape_string($dbh, $_POST['task']),
                     $_POST['status'],
                     $_POST['oid']);