mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Checking for existence of 'Locale' data in CMS controllers
Only applies for Translatable extension installed
This commit is contained in:
parent
db47dcff47
commit
89079c4ca0
@ -122,7 +122,9 @@ class CMSPageAddController extends CMSPageEditController {
|
||||
}
|
||||
|
||||
$record = $this->getNewItem("new-$className-$parentID".$suffix, false);
|
||||
if(class_exists('Translatable') && $record->hasExtension('Translatable')) $record->Locale = $data['Locale'];
|
||||
if(class_exists('Translatable') && $record->hasExtension('Translatable') && isset($data['Locale'])) {
|
||||
$record->Locale = $data['Locale'];
|
||||
}
|
||||
|
||||
try {
|
||||
$record->write();
|
||||
|
Loading…
Reference in New Issue
Block a user