Skip to content
Snippets Groups Projects
Unverified Commit 134b86bf authored by Svein-Tore Griff With's avatar Svein-Tore Griff With Committed by GitHub
Browse files

Merge pull request #455 from marxjohnson/fix-update-paths

Fix paths for update files. Fixes #453.
parents 64e6caaa 8480d24f
No related branches found
No related tags found
No related merge requests found
......@@ -215,15 +215,15 @@ class framework implements \H5PFrameworkInterface {
@set_time_limit(0);
// Generate local tmp file path.
$localfolder = $CFG->tempdir . uniqid('/hvp-');
$stream = $localfolder . '.h5p';
$localfolder = make_temp_directory(uniqid('hvp-'));
$localpath = $localfolder . '.h5p';
// Add folder and file paths to H5P Core.
$interface = self::instance('interface');
$interface->getUploadedH5pFolderPath($localfolder);
$interface->getUploadedH5pPath($stream);
$interface->getUploadedH5pPath($localpath);
$stream = fopen($stream, 'w');
$stream = fopen($localpath, 'w');
$options['CURLOPT_FILE'] = $stream;
}
......@@ -244,7 +244,7 @@ class framework implements \H5PFrameworkInterface {
if ($stream !== null) {
fclose($stream);
@chmod($stream, $CFG->filepermissions);
@chmod($localpath, $CFG->filepermissions);
}
$errorno = $curl->get_errno();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment