You are here

function _backup_migrate_dir_in_webroot in Backup and Migrate 5.2

Check if the given directory is within the webroot and is therefore web accessible.

1 call to _backup_migrate_dir_in_webroot()
_backup_migrate_destination_file_check_dir in includes/destinations.file.inc
Prepare the destination directory for the backups.

File

includes/destinations.file.inc, line 159
Functions to handle the local server directory backup destinations.

Code

function _backup_migrate_dir_in_webroot($directory) {
  if (strpos(realpath($directory), realpath($_SERVER['DOCUMENT_ROOT'])) !== FALSE) {
    return TRUE;
  }
  return FALSE;
}