From 6df01e13de1def7c4077663c405cf7398d389227 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 8 May 2012 08:50:45 +0000 Subject: [PATCH] * Addressbook: skip letter of deleted type, when creating new contact types, as it gives SQL error --- admin/inc/class.customfields.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/admin/inc/class.customfields.inc.php b/admin/inc/class.customfields.inc.php index fe26fc8dd9..d57fbff932 100644 --- a/admin/inc/class.customfields.inc.php +++ b/admin/inc/class.customfields.inc.php @@ -348,7 +348,10 @@ class customfields // search free type character for($i=97;$i<=122;$i++) { - if(!$this->content_types[chr($i)]) + if (!$this->content_types[chr($i)] && + // skip letter of deleted type for addressbook content-types, as it gives SQL error + // content-type are lowercase, addressbook_so::DELETED_TYPE === 'D', but DB is case-insensitive + ($this->appname !== 'addressbook' || chr($i) !== strtolower(addressbook_so::DELETED_TYPE))) { $new_type = chr($i); break;