Skip to content

Commit

Permalink
Assignments: Set default end date to be one day later than start date…
Browse files Browse the repository at this point in the history
… - see #1646
  • Loading branch information
ywarnier committed May 24, 2017
1 parent 8172878 commit 13b985f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main/work/work.lib.php
Expand Up @@ -4598,7 +4598,8 @@ function getFormWork($form, $defaults = array(), $workId = 0)
$form->addElement('checkbox', 'enableEndDate', null, get_lang('EnableEndDate'), 'id="end_date"');

if (!isset($defaults['ends_on'])) {
$date = substr($currentDate, 0, 10);
$tomorrow = substr(api_get_local_time(time()+86400), 0, 10);
$date = substr($tomorrow, 0, 10);
$defaults['ends_on'] = $date.' 23:59';
}
if (isset($defaults['enableEndDate']) && $defaults['enableEndDate']) {
Expand Down

0 comments on commit 13b985f

Please sign in to comment.