You are here

function backup_migrate_update_7200 in Backup and Migrate 8.2

Same name and namespace in other branches
  1. 8.3 backup_migrate.install \backup_migrate_update_7200()
  2. 7.3 backup_migrate.install \backup_migrate_update_7200()
  3. 7.2 backup_migrate.install \backup_migrate_update_7200()

Move the backup and migrate directory to the private directory.

File

./backup_migrate.install, line 377
Install hooks for Backup and Migrate.

Code

function backup_migrate_update_7200() {
  $from = 'public://backup_migrate';
  $to = 'private://backup_migrate';
  if (drupal_realpath($from) && !drupal_realpath($to)) {
    if (!rename($from, $to)) {
      drupal_set_message(t('Unable to move the backups directory to your private folder, please check file permissions and move the directory %from to %to', array(
        '%from' => drupal_realpath($from),
        '%to' => drupal_realpath($to),
      )), 'warning');
    }
  }
}