From 758789b3bba80f91182730841cb54ba0f3c86de4 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Tue, 16 Apr 2013 23:54:06 +0000 Subject: - Fix string type detection, addressing errors when converting string types to blob or binary fields (addressing Issue #1453) --- Source/SPTableStructureDelegate.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/SPTableStructureDelegate.m') diff --git a/Source/SPTableStructureDelegate.m b/Source/SPTableStructureDelegate.m index a9f2a949..c2bdb98c 100644 --- a/Source/SPTableStructureDelegate.m +++ b/Source/SPTableStructureDelegate.m @@ -558,12 +558,12 @@ // Only string fields allow encoding settings if (([[aTableColumn identifier] isEqualToString:@"encoding"])) { - [aCell setEnabled:([fieldValidation isFieldTypeString:theRowType] && ![theRowType hasSuffix:@"BINARY"] && ![theRowType hasSuffix:@"BLOB"]) && [[tableDocumentInstance serverSupport] supportsPost41CharacterSetHandling]]; + [aCell setEnabled:([fieldValidation isFieldTypeString:theRowType] && [[tableDocumentInstance serverSupport] supportsPost41CharacterSetHandling])]; } // Only string fields allow collation settings and string field is not set to BINARY since BINARY sets the collation to *_bin else if ([[aTableColumn identifier] isEqualToString:@"collation"]) { - [aCell setEnabled:([fieldValidation isFieldTypeString:theRowType] && [[theRow objectForKey:@"binary"] integerValue] == 0 && ![theRowType hasSuffix:@"BINARY"] && ![theRowType hasSuffix:@"BLOB"] && [[tableDocumentInstance serverSupport] supportsPost41CharacterSetHandling])]; + [aCell setEnabled:([fieldValidation isFieldTypeString:theRowType] && [[theRow objectForKey:@"binary"] integerValue] == 0 && [[tableDocumentInstance serverSupport] supportsPost41CharacterSetHandling])]; } // Check if UNSIGNED and ZEROFILL is allowed -- cgit v1.2.3