public function backup_migrate_destination_files::dir_in_webroot in Backup and Migrate 7.3
Same name and namespace in other branches
- 8.2 includes/destinations.file.inc \backup_migrate_destination_files::dir_in_webroot()
- 8.3 includes/destinations.file.inc \backup_migrate_destination_files::dir_in_webroot()
- 6.3 includes/destinations.file.inc \backup_migrate_destination_files::dir_in_webroot()
- 6.2 includes/destinations.file.inc \backup_migrate_destination_files::dir_in_webroot()
- 7.2 includes/destinations.file.inc \backup_migrate_destination_files::dir_in_webroot()
Check if the given directory is within the webroot and is therefore web accessible.
1 call to backup_migrate_destination_files::dir_in_webroot()
- backup_migrate_destination_files::check_dir in includes/
destinations.file.inc - Prepare the destination directory for the backups.
File
- includes/
destinations.file.inc, line 279 - A destination type for saving locally to the server.
Class
- backup_migrate_destination_files
- A destination type for saving locally to the server.
Code
public function dir_in_webroot($directory) {
$real_dir = drupal_realpath($directory);
$real_root = drupal_realpath(DRUPAL_ROOT);
if ($real_dir == $real_root || strpos($real_dir, $real_root . '/') === 0) {
return TRUE;
}
return FALSE;
}