diff --git a/adaptive_image.image.inc b/adaptive_image.image.inc index 8173d7e4b3f3452cb27272aadcc7d27b41665c86..bdafcdcf24bbbb4a7124a99332b8de7900b1908e 100644 --- a/adaptive_image.image.inc +++ b/adaptive_image.image.inc @@ -114,9 +114,9 @@ function adaptive_image_browser_detect() { $userAgent = strtolower($_SERVER['HTTP_USER_AGENT']); // Identify the OS platform. Match only desktop OSs - if (preg_match('/Macintosh/', $userAgent) || - preg_match('/Windows NT/', $userAgent) || - preg_match('/X11/', $userAgent)) { + if (strpos($userAgent,'macintosh') || + strpos($userAgent,'windows nt') || + strpos($userAgent,'x11') return TRUE; } } diff --git a/adaptive_image.module b/adaptive_image.module index 06c41717b2b54efd5e8b08d0189fbc2428188661..e053e21b8d5b4e3c97a5aa11ea4a801798127960 100644 --- a/adaptive_image.module +++ b/adaptive_image.module @@ -98,7 +98,7 @@ function adaptive_image_scale_form($data) { $form['mobile_first'] = array( '#type' => 'checkbox', '#title' => t('Mobile first'), - '#default_value' => isset($data['mobile_first']) ? $data['mobile_first'] : FALSE, + '#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."), ); // Provide needed defaults