Skip to content

Commit

Permalink
Fix error when generating pagepart
Browse files Browse the repository at this point in the history
Fix error when generating pagepart

Revert "Fix error when generating pagepart"

This reverts commit edd710b.

Fix error when generating pagepart

Fix error when generating pagepart
  • Loading branch information
KUNSTMAAN committed Apr 22, 2015
1 parent d57a0c3 commit d605618
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ function ($name) use ($fields, $self, $bundle, $generator, $container) {
'mimeTypes' => $mimeTypes,
);

if ($typeStrings [$typeId] == 'image') {
if ($extra == 'image') {

// Ask the minimum height allowed for the image
$lengthValidation = function ($length) {
Expand All @@ -526,7 +526,7 @@ function ($name) use ($fields, $self, $bundle, $generator, $container) {
//Ask the maximum width allowed for the image
$maxWidth = $this->assistant->askAndValidate('What is the maximum width for the media object? (in pixels)', $lengthValidation);

$data = array('name' => $fieldName, 'type' => $typeStrings[$typeId], 'extra' => $extra,
$data = array('name' => $fieldName, 'type' => 'image', 'extra' => $extra,
'minHeight' => $minHeight, 'maxHeight' => $maxHeight, 'minWidth' => $minWidth, 'maxWidth' => $maxWidth, 'mimeTypes' => $mimeTypes);
}

Expand Down

0 comments on commit d605618

Please sign in to comment.