mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
f85a95f3aa
commit
262129a8b5
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user