From f9489e456f03733d9d7babc8ab367251b4272792 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Thu, 19 May 2011 20:50:24 +0200 Subject: [PATCH] Prevent PlTableEditor from erasing values which weren't displayed. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- classes/pltableeditor.php | 4 ++++ 1 file changed, 4 insertions(+) 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); } -- 2.1.4