From: Raphaël Barrois Date: Thu, 19 May 2011 18:50:24 +0000 (+0200) Subject: Prevent PlTableEditor from erasing values which weren't displayed. X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=refs%2Fheads%2Fcore%2F1.1.4%2Fmaint;p=platal.git Prevent PlTableEditor from erasing values which weren't displayed. Signed-off-by: Raphaël Barrois --- diff --git a/classes/pltableeditor.php b/classes/pltableeditor.php index 208a92d..6cda175 100644 --- a/classes/pltableeditor.php +++ b/classes/pltableeditor.php @@ -362,8 +362,12 @@ class PLTableEditor $val = ip2long($val); } } elseif ($descr['display']) { + // The field wasn't available in Post, but was displayed $cancel = true; $page->trigError("Il manque le champ ".$field); + } else { + // The field wasn't in Post, but wasn't displayed: ignore it. + continue; } $values[$field] = XDB::escape($val); }