mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 17:05:39 +02:00
FIX Backport and sanitiseClassName for the "Save" action URL
This commit is contained in:
parent
58200f847f
commit
04a07d505f
@ -9,9 +9,16 @@ class GridFieldAddNewMultiClassHandler extends GridFieldDetailForm_ItemRequest {
|
||||
return parent::Link($action);
|
||||
} else {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user