"fix an other case of empty enddate get set to \"something\""

This commit is contained in:
Ralf Becker 2010-03-24 08:15:36 +00:00
parent 8d033f95f8
commit de947ef466

View File

@ -711,7 +711,7 @@ class infolog_bo
$status = 'done';
if (isset($values['info_type']) && !in_array($values['info_status'],array('done','billed','cancelled'))) {
$forcestatus = false;
echo "set_completed:"; _debug_array($this->status[$values['info_type']]);
//echo "set_completed:"; _debug_array($this->status[$values['info_type']]);
if (isset($this->status[$values['info_type']]['done'])) {
$forcestatus = true;
$status = 'done';
@ -791,17 +791,24 @@ class infolog_bo
{
// convert user- to server-time
$this->time2time($to_write, null, false);
if (!empty($values['info_enddate']))
{
$time = new egw_time($values['info_enddate'], egw_time::$user_timezone);
// Set due date to 00:00
$time->setTime(0, 0, 0);
$values['info_enddate'] = egw_time::to($time,'ts');
}
}
else
{
if (!empty($values['info_enddate']))
{
$time = new egw_time($values['info_enddate'], egw_time::$server_timezone);
// Set due date to 00:00
$time->setTime(0, 0, 0);
$to_write['info_enddate'] = egw_time::to($time,'ts');
}
// convert server- to user-time
$this->time2time($values);
}