function backup_db_link in Backup Database 8
file_create_url in combination with Url::fromUri does not return a correct path for private files.
1 call to backup_db_link()
- BackupDatabaseController::historyOverview in src/
Controller/ BackupDatabaseController.php
File
- ./
backup_db.module, line 61 - backup_db.module
Code
function backup_db_link($uri) {
$scheme = \Drupal::service('file_system')
->uriScheme($uri);
$path = $uri;
if ($scheme == 'private') {
$private_path = PrivateStream::basePath();
$path = str_replace('private:/', $private_path, $uri);
}
return $path;
}