You are here

function _flowplayer_admin_settings_check_plugin_path in Flowplayer API 7.2

Checks if the directory in $form_element exists and contains a file named 'flowplayer.swf'. If validation fails, the form element is flagged with an error from within the file_check_directory function.

Parameters

$form_element: The form element containing the name of the directory to check.

1 string reference to '_flowplayer_admin_settings_check_plugin_path'
flowplayer_admin_settings in ./flowplayer.admin.inc
Administration settings for the Flowplayer Drupal module.

File

./flowplayer.admin.inc, line 154
Provides the administration settings for the Flowplayer Drupal module.

Code

function _flowplayer_admin_settings_check_plugin_path($form_element) {
  $library_path = $form_element['#value'];
  if (!is_dir($library_path) || !_flowplayer_get_js_path() || !_flowplayer_get_swf_path()) {
    form_set_error($form_element['#parents'][0], t('You need to download and set up flowplayer. For more information see README.txt.'));
  }
  return $form_element;
}