From fe89e158fe384bf103db7d653c83dca2256be7e4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 19 Jul 2019 04:02:42 +0200 Subject: [PATCH] Fix: Avoid deletion of system entries in dictionary --- htdocs/admin/dict.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 11cd105137c..87e072b8d7e 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -1622,7 +1622,11 @@ if ($id) elseif ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; } elseif ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; } } - + if ($id == 25 && in_array($obj->code, array('banner', 'blogpost', 'other', 'page'))) + { + $iserasable = 0; $canbedisabled = 0; + if (in_array($obj->code, array('banner'))) $canbedisabled = 1; + } if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto'))) { $iserasable=0; } if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO')) || in_array($obj->type, array('systemauto'))) { $canbedisabled=0; $canbedisabled = 0; } $canbemodified=$iserasable;