summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Auditor2012-02-24 13:25:21 (GMT)
committer Stefan Auditor2012-02-24 13:25:21 (GMT)
commitb585f37382ecfb2a3e584c986cdd31863951799e (patch)
tree10a2dc54d920f09186e7e5707fe0c3bd8169acfa
parent3424479a33270a96c9f11e11ff6683e2cd693f1a (diff)
Issue #1443102 by michelhack, sanduhrs: Fixed Failed at first setup caused by change to core image module.
-rw-r--r--adaptive_image.module5
1 files changed, 4 insertions, 1 deletions
diff --git a/adaptive_image.module b/adaptive_image.module
index f0a545d..505d9c1 100644
--- a/adaptive_image.module
+++ b/adaptive_image.module
@@ -104,9 +104,12 @@ function adaptive_image_scale_form($data) {
'#default_value' => isset($data['mobile_first']) ? $data['mobile_first'] : TRUE,
'#description' => t("Check this to send the smallest version when the resolution can not be determined."),
);
+
+ $resolutions = explode(',', str_replace(' ', '', $form['resolutions']['#default_value']));
+ $resolution = adaptive_image_resolution($resolutions);
// Provide needed defaults
$form['height'] = array('#type' => 'hidden','#default_value' => NULL);
- $form['width'] = array('#type' => 'hidden','#default_value' => NULL);
+ $form['width'] = array('#type' => 'hidden','#default_value' => $resolution);
$form['upscale'] = array('#type' => 'hidden','#default_value' => NULL);
return $form;
}