From d5d6ba922c1dada65782e32e593e07f68ccac2a1 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 7 Jan 2010 04:55:51 +0000 Subject: [PATCH] do NOT allow to delete original contact content-type for addressbook, as it only creates support problems as users incidently delete it --- admin/inc/class.customfields.inc.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/admin/inc/class.customfields.inc.php b/admin/inc/class.customfields.inc.php index 0276abd154..93b70644cf 100644 --- a/admin/inc/class.customfields.inc.php +++ b/admin/inc/class.customfields.inc.php @@ -189,6 +189,12 @@ class customfields $sel_options = array( 'type2' => $this->types2 + array('tmpl' => 'template'), ); + // do NOT allow to delete original contact content-type for addressbook, + // as it only creates support problems as users incidently delete it + if ($this->appname == 'addressbook' && $this->content_type == 'n') + { + $readonlys['content_types']['delete'] = true; + } $this->tmpl->exec('admin.customfields.edit',$content,$sel_options,$readonlys,array( 'fields' => $preserv_fields, 'appname' => $this->appname,