From 3013fe57b23c21220cbbbd5037c7ec95802101a2 Mon Sep 17 00:00:00 2001 From: Megan Date: Wed, 15 Apr 2009 10:05:15 +0200 Subject: [PATCH] KTS-4124 MySQL doesn't distinguish between é and e, added an additional check in PHP. "It is impossible to rename the Fieldset name form 'Fielde' to 'Fieldé'" Fixed. --- plugins/ktcore/admin/documentFieldsv2.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/ktcore/admin/documentFieldsv2.php b/plugins/ktcore/admin/documentFieldsv2.php index 55553ee..05201f3 100644 --- a/plugins/ktcore/admin/documentFieldsv2.php +++ b/plugins/ktcore/admin/documentFieldsv2.php @@ -402,9 +402,12 @@ class KTDocumentFieldDispatcher extends KTAdminDispatcher { $data = $res['results']; $errors = $res['errors']; $extra_errors = array(); + + // check that the fieldset name either hasn't changed, or doesn't exist. if ($data['name'] != $this->oFieldset->getName()) { $oOldFieldset = KTFieldset::getByName($data['name']); - if (!PEAR::isError($oOldFieldset)) { + // If the fieldset exists throw an error. Mysql doesn't distinguish between Ž and e so check the names are different in php. + if (!PEAR::isError($oOldFieldset) && $oOldFieldset->getName() == $data['name']) { $extra_errors['name'][] = _kt("A fieldset with that name already exists."); } } -- libgit2 0.21.4