Skip to content
This repository has been archived by the owner on Jan 10, 2021. It is now read-only.

Commit

Permalink
Updating some class definitions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Glasl committed May 25, 2015
1 parent adf760e commit 2f91b7f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion code/pages/MediaHolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ public function getCMSFields() {
$fields->addFieldToTab('Root.Main', DropdownField::create(
'MediaTypeID',
'Media Type',
array_merge(array(0 => ''), MediaType::get()->map()->toArray())
array_merge(array(
0 => ''
), MediaType::get()->map()->toArray())
), 'Title');

// Allow customisation of the media URL format.
Expand Down
8 changes: 7 additions & 1 deletion code/pages/MediaPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,13 @@ public function getCMSFields() {
$fields->addFieldToTab('Root.ImagesAttachments', $images = UploadField::create(
'Images'
));
$images->getValidator()->setAllowedExtensions(array('jpg', 'jpeg', 'png', 'gif', 'bmp'));
$images->getValidator()->setAllowedExtensions(array(
'jpg',
'jpeg',
'png',
'gif',
'bmp'
));
$images->setFolderName("media-{$type}/{$this->ID}/images");
$fields->addFieldToTab('Root.ImagesAttachments', $attachments = UploadField::create(
'Attachments'
Expand Down

0 comments on commit 2f91b7f

Please sign in to comment.