BUGFIX When adding a top level folder in AssetAdmin, ensure you are

taken back to the top level folder view. Currently there is a non-object
error adding a root level folder.
This commit is contained in:
Sean Harvey 2012-03-27 09:54:47 +13:00
parent f2f45d62e7
commit 10f030de67

View File

@ -407,7 +407,11 @@ JS
mkdir($record->FullPath);
chmod($record->FullPath, Filesystem::$file_create_mask);
return $this->redirect(Controller::join_links($this->Link('show'), $parentRecord->ID));
if($parentRecord) {
return $this->redirect(Controller::join_links($this->Link('show'), $parentRecord->ID));
} else {
return $this->redirect($this->Link());
}
}
/**