Merge branch '2.0' into 2

This commit is contained in:
Daniel Hensby 2017-09-18 14:45:58 +01:00
commit fbc7278378
No known key found for this signature in database
GPG Key ID: 5DE415D786BBB2FD

View File

@ -9,9 +9,16 @@ class GridFieldAddNewMultiClassHandler extends GridFieldDetailForm_ItemRequest {
return parent::Link($action); return parent::Link($action);
} else { } else {
return Controller::join_links( return Controller::join_links(
$this->gridField->Link(), 'add-multi-class', get_class($this->record) $this->gridField->Link(), 'add-multi-class', $this->sanitiseClassName(get_class($this->record))
); );
} }
} }
/**
* Sanitise a model class' name for inclusion in a link
* @return string
*/
protected function sanitiseClassName($class) {
return str_replace('\\', '-', $class);
}
} }