Skip to content

Commit

Permalink
fix: config-plugin-import builds additional file paths incorrectly (#457
Browse files Browse the repository at this point in the history
)

Explained in this issue: <#456>

`$this->inputfilepath` contains the entire path

while `$setting->getAttribute('file')` contains the hash
  • Loading branch information
maxandron authored Mar 18, 2024
1 parent 9dbebc7 commit dc25135
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Moosh/Command/Moodle39/Config/ConfigPluginimport.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -162,4 +161,4 @@ private function import_settings() {
echo "No settings to import \n";
}
}
}
}

0 comments on commit dc25135

Please sign in to comment.