You are here

function oa_export_cleanup in Open Atrium Export 7.2

Removes a directory recusively and if provided will direct the user to a new destination.

Parameters

string $directory: The full path the directory to remove.

string $goto: A relative path to send the user to.

5 calls to oa_export_cleanup()
oa_export_batch_export in batch/oa_export.batch.export.inc
Prepare the export and create a batch process.
oa_export_batch_file_download_finished in batch/oa_export.batch.export.inc
Finish function for the batch process.
oa_export_batch_file_download_finished_redirect in batch/oa_export.batch.export.inc
Helper function that handles the file download.
oa_export_batch_module_export_finished in batch/oa_export.batch.export.inc
oa_export_verify_blueprint in ./oa_export.module
Verify that the specified blueprint taxonomy term can be exported.

File

./oa_export.module, line 274

Code

function oa_export_cleanup($directory = NULL, $goto = NULL) {

  // Get rid of our session variables.
  unset($_SESSION['oa_export']);
  if (isset($directory)) {

    // Remove the directory and all its contents.
    oa_export_remove_directory($directory);
  }
  if (isset($goto)) {

    // Send the user somewhere else.
    drupal_goto($goto);
  }
}