Skip to content

Commit

Permalink
MINOR Only set folder field state in AssetAdmin if a folder is shown
Browse files Browse the repository at this point in the history
  • Loading branch information
chillu committed Jun 14, 2012
1 parent a64cf8c commit 3c81958
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/controllers/AssetAdmin.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function getEditForm($id = null, $fields = null) {
$folder = ($id && is_numeric($id)) ? DataObject::get_by_id('Folder', $id, false) : $this->currentPage(); $folder = ($id && is_numeric($id)) ? DataObject::get_by_id('Folder', $id, false) : $this->currentPage();
$fields = $form->Fields(); $fields = $form->Fields();
$title = ($folder && $folder->exists()) ? $folder->Title : _t('AssetAdmin.FILES', 'Files'); $title = ($folder && $folder->exists()) ? $folder->Title : _t('AssetAdmin.FILES', 'Files');
$fields->push(new HiddenField('ID', false, $folder->ID)); $fields->push(new HiddenField('ID', false, $folder ? $folder->ID : null));


// File listing // File listing
$gridFieldConfig = GridFieldConfig::create()->addComponents( $gridFieldConfig = GridFieldConfig::create()->addComponents(
Expand Down

0 comments on commit 3c81958

Please sign in to comment.