From dc25135227d0f8f987cb708ae180cf7884a92176 Mon Sep 17 00:00:00 2001 From: Ron Suhodrev Date: Mon, 18 Mar 2024 23:00:31 +0700 Subject: [PATCH] fix: config-plugin-import builds additional file paths incorrectly (#457) Explained in this issue: `$this->inputfilepath` contains the entire path while `$setting->getAttribute('file')` contains the hash --- Moosh/Command/Moodle39/Config/ConfigPluginimport.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Moosh/Command/Moodle39/Config/ConfigPluginimport.php b/Moosh/Command/Moodle39/Config/ConfigPluginimport.php index fda4620f..276f29e8 100644 --- a/Moosh/Command/Moodle39/Config/ConfigPluginimport.php +++ b/Moosh/Command/Moodle39/Config/ConfigPluginimport.php @@ -140,8 +140,7 @@ private function import_settings() { $fs->delete_area_files($fileinfo['contextid'], $fileinfo['component'], $fileinfo['filearea'], 0); } - $filepath = $this->inputfilepath.$setting->getAttribute('file'); - $fs->create_file_from_pathname($fileinfo, $filepath); + $fs->create_file_from_pathname($fileinfo, $this->inputfilepath); } $todb = new stdClass; @@ -162,4 +161,4 @@ private function import_settings() { echo "No settings to import \n"; } } -} \ No newline at end of file +}