You are here

function _flashnode_filename in Flash Node 5.6

Same name and namespace in other branches
  1. 5.2 flashnode.module \_flashnode_filename()
  2. 5.3 flashnode.module \_flashnode_filename()

Create a flash filename in the flash folder, or in the temporary flash folder

2 calls to _flashnode_filename()
flashnode_prepare in ./flashnode.module
Implementation of hook_prepare().
_flashnode_insert in ./flashnode.module
Move a temporary file to the flash directory and store information in {files}

File

./flashnode.module, line 881

Code

function _flashnode_filename($filename, $temp = FALSE) {

  // Spaces can cause problems, so replace them with underscores
  $filename = str_replace(' ', '_', $filename);

  // Get the flash path
  $result = variable_get('flashnode_default_path', 'flash') . '/';

  // If this is a temporary file, append temp
  if ($temp) {
    $result .= 'temp/';
  }

  // Add the filename to build the path
  $result .= $filename;

  // Return the result
  return $result;
}