API CHANGE: array data types now supported by dev/build

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87555 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Geoff Munn 2009-09-29 21:59:39 +00:00
parent f85a95f3aa
commit 262129a8b5

View File

@ -289,7 +289,19 @@ abstract class Database {
// Create custom fields
if($fieldSchema) {
foreach($fieldSchema as $fieldName => $fieldSpec) {
//Is this an array field?
$arrayValue='';
if(strpos($fieldSpec, '[')!==false){
//If so, remove it and store that info separately
$pos=strpos($fieldSpec, '[');
$arrayValue=substr($fieldSpec, $pos);
$fieldSpec=substr($fieldSpec, 0, $pos);
}
$fieldObj = eval(ViewableData::castingObjectCreator($fieldSpec));
$fieldObj->arrayValue=$arrayValue;
$fieldObj->setTable($table);
$fieldObj->requireField();
}