You are here

function _flashnode_check_settings in Flash Node 6.2

Same name and namespace in other branches
  1. 5.6 flashnode.module \_flashnode_check_settings()
  2. 5.2 flashnode.module \_flashnode_check_settings()
  3. 5.3 flashnode.module \_flashnode_check_settings()
  4. 6.3 flashnode.module \_flashnode_check_settings()

Verify that the flash and flash/temp directories exist and create them if they don't flash/temp is required to make the node preview function work correctly

2 calls to _flashnode_check_settings()
flashnode_admin_settings in ./flashnode.admin.inc
@file Callback for settings page
flashnode_form in ./flashnode.module
Implementation of hook_form

File

./flashnode.module, line 806

Code

function _flashnode_check_settings() {

  // Build the relevant paths
  $flashnode_path = file_create_path(variable_get('flashnode_default_path', FLASHNODE_DEFAULT_PATH));
  $flashnode_temp_path = $flashnode_path . '/temp';

  // Check if directories exist, create them if not
  file_check_directory($flashnode_path, FILE_CREATE_DIRECTORY, 'flashnode_default_path');
  file_check_directory($flashnode_temp_path, FILE_CREATE_DIRECTORY);
}