You are here

function _flash_check_settings in Flash Node 5

Verify the flash folders exist

2 calls to _flash_check_settings()
flash_admin_settings in ./flash.module
Settings callback
flash_form in ./flash.module
Implementation of hook_form

File

./flash.module, line 569

Code

function _flash_check_settings() {

  // check for ufo.js (assume that if this is missing then so is ufo.swf)
  if (!file_exists(drupal_get_path('module', 'flash') . '/ufo.js')) {
    drupal_set_message(t('The required files ufo.js and ufo.swf are not available. You must !ufo and copy them to the flashnode module directory in order for flashnode to work. Refer to the flashnode README.txt file for more details.', array(
      '!ufo' => '<a href="http://www.bobbyvandersluis.com/ufo/ufo.zip" title="Download required files">download them</a>',
    )));
  }

  // build the two relevant paths
  $flash_path = file_create_path(variable_get('flash_default_path', 'flash'));
  $temp_path = $flash_path . '/temp';

  // check they exist, create if not
  file_check_directory($flash_path, FILE_CREATE_DIRECTORY, 'flash_default_path');
  file_check_directory($temp_path, FILE_CREATE_DIRECTORY, 'flash_default_path');
}