changed insertion of all zeroes deferred date into the database with a date that will pass validation
This commit is contained in:
@@ -75,7 +75,7 @@ if ($action) {
|
||||
// sanitize user input
|
||||
$completedate = fix_date($completedate);
|
||||
// update events
|
||||
mysqli_query($db, "update events set last_date=\"$completedate\", deferred_flag=0, deferred_date=\"0000-00-00\" where eventid=\"$id\"");
|
||||
mysqli_query($db, "update events set last_date=\"$completedate\", deferred_flag=0, deferred_date=\"0001-01-01\" where eventid=\"$id\"");
|
||||
if ($addlognote) {
|
||||
$compltaskname = mysqli_fetch_row(mysqli_query($db, "select tasks.taskname from tasks,events where events.eventid=\"$id\" and tasks.taskid=events.task"))[0];
|
||||
$compldevicename = mysqli_fetch_row(mysqli_query($db, "select devices.devicename from devices,events where events.eventid=\"$id\" and devices.deviceid=events.device"))[0];
|
||||
@@ -490,8 +490,8 @@ if ($action) {
|
||||
while ($tablerow = mysqli_fetch_assoc($existingdata)) {
|
||||
extract($tablerow);
|
||||
if ($start_date == "0001-01-01") $start_date = $today;
|
||||
if ($last_date == "0000-00-00") $last_date = "";
|
||||
if ($deferred_date == "0000-00-00") $deferred_date = "";
|
||||
if ($last_date == "0001-01-01") $last_date = "";
|
||||
if ($deferred_date == "0001-01-01") $deferred_date = "";
|
||||
if ($active_flag) {
|
||||
$statdef = "<img src=\"icons/tick.png\" title=\"active\" alt=\"active\">";
|
||||
} else {
|
||||
@@ -857,7 +857,7 @@ if ($action) {
|
||||
$taskdata = mysqli_fetch_assoc(mysqli_query($db, "select * from tasks where taskid=\"$def_task\""));
|
||||
extract($taskdata, EXTR_PREFIX_ALL, "taskdata");
|
||||
if (! ($taskdata_period == "once" && $def_last_date > $def_start_date)) {
|
||||
if ($def_last_date == "0000-00-00") {
|
||||
if ($def_last_date == "0001-01-01") {
|
||||
$lastdatestrg = "never";
|
||||
} else {
|
||||
$lastdatestrg = "$def_last_date";
|
||||
|
||||
Reference in New Issue
Block a user