You are here

function _image_imagemagick_build_version in Image 5.2

Same name and namespace in other branches
  1. 5 image.imagemagick.inc \_image_imagemagick_build_version()
  2. 6 image.imagemagick.inc \_image_imagemagick_build_version()
  3. 7 image.imagemagick.inc \_image_imagemagick_build_version()
1 string reference to '_image_imagemagick_build_version'
image_imagemagick_settings in ./image.imagemagick.inc
Validate and return toolkit specific settings.

File

./image.imagemagick.inc, line 38

Code

function _image_imagemagick_build_version($form, $form_element) {

  // Don't check the path when another toolkit is being selected.
  if (!isset($form['#post']['image_toolkit']) || $form['#post']['image_toolkit'] == 'imagemagick') {
    $valid = _image_imagemagick_check_path($form_element['image_imagemagick_convert'], 'image_imagemagick_convert');
    if ($valid) {
      _image_imagemagick_convert_exec('-version', $output, $errors);
      $form['imagemagick_binary']['version'] = array(
        '#type' => 'item',
        '#value' => '<pre>' . check_plain(trim($output)) . '</pre>',
      );
    }
  }
  return $form;
}