You are here

function nodesquirrel_get_destination in Backup and Migrate 7.2

Same name and namespace in other branches
  1. 6.3 includes/destinations.nodesquirrel.inc \nodesquirrel_get_destination()
  2. 6.2 includes/destinations.nodesquirrel.inc \nodesquirrel_get_destination()

Get the NS destination for the given key.

1 call to nodesquirrel_get_destination()
nodesquirrel_check_secret_key in includes/destinations.nodesquirrel.inc
Check that a nodesquirel key is valid.

File

includes/destinations.nodesquirrel.inc, line 32
Functions to handle the NodeSquirrel backup destination.

Code

function nodesquirrel_get_destination($secret_key) {
  if ($secret_key) {
    backup_migrate_include('destinations');
    $destination = backup_migrate_create_destination('nodesquirrel', array(
      'destination_id' => 'nodesquirrel',
    ));
    $destination->settings['secret_key'] = $secret_key;
    return $destination;
  }
  return NULL;
}