Skip to content
Snippets Groups Projects
Commit ccfa3b64 authored by Tobias Reischmann's avatar Tobias Reischmann
Browse files

Switch backup path in downloadbackup.php to new config

parent 5efdfdbd
Branches
Tags
No related merge requests found
......@@ -29,7 +29,7 @@ require_capability('moodle/site:config', context_system::instance());
$backupid = required_param('backupid', PARAM_INT);
$backuprecord = $DB->get_record('tool_lifecycle_backups', array('id' => $backupid), 'backupfile', MUST_EXIST);
$source = $CFG->dataroot . '/lifecycle_backups/' . $backuprecord->backupfile;
$source = get_config('tool_lifecycle', 'backup_path') . DIRECTORY_SEPARATOR . $backuprecord->backupfile;
if (!file_exists($source)) {
throw new \moodle_exception('errorbackupfiledoesnotexist', 'tool_lifecycle', $source);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment