FIX: only remove 'ID' off of imageFieldName

avoid conflict with imageFieldName containing 'ID'/'id' in their name
This commit is contained in:
colymba 2012-08-09 20:28:52 +03:00
parent 4e5271f527
commit feb39651bf
1 changed files with 1 additions and 2 deletions

View File

@ -52,8 +52,7 @@ class GridFieldBulkEditingHelper {
{
if ( $config['imageFieldName'] != null )
{
//@TODO: this wont work if the fieldname has ID in it: i.e. TheIDImageID -> remove last 2 char only
unset( $dataFields[str_ireplace('ID', '', $config['imageFieldName']) ] );
unset( $dataFields[ substr($config['imageFieldName'], 0, -2) ] );
}
}