From 5fd34185c390d4ed841692ecea8332bcf6b368b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20Wei=C3=9F?= Date: Mon, 16 Jan 2006 08:30:36 +0000 Subject: [PATCH] fix from ralf: xml-rpc bugs reported by jan --- infolog/inc/class.boinfolog.inc.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/infolog/inc/class.boinfolog.inc.php b/infolog/inc/class.boinfolog.inc.php index e78a116826..05f9614ff6 100644 --- a/infolog/inc/class.boinfolog.inc.php +++ b/infolog/inc/class.boinfolog.inc.php @@ -456,7 +456,10 @@ } if ($touch_modified || !$values['info_datemodified']) { - $check_modified = $values['info_datemodified'] ? $values['info_datemodified']-$this->tz_offset_s : false; + // Should only an entry be updated which includes the original modification date? + // Used in the web-GUI to check against a modification by an other user while editing the entry. + // It's now disabled for xmlrpc, as otherwise the xmlrpc code need to be changed! + $check_modified = $values['info_datemodified'] && !$this->xmlrpc ? $values['info_datemodified']-$this->tz_offset_s : false; $values['info_datemodified'] = $this->user_time_now; } if ($touch_modified || !$values['info_modifier']) @@ -795,6 +798,14 @@ $data[substr($name,5)] = $val; } } + // unsetting everything which could result in an typeless + foreach($data as $key => $value) + { + if (is_null($value) || is_array($value) && !$value) + { + unset($data[$key]); + } + } return $data; }