Skip to content
Snippets Groups Projects
Unverified Commit 58bc6ac4 authored by Frode Petterson's avatar Frode Petterson Committed by GitHub
Browse files

Merge pull request #472 from marsh0lion/i-471

Fixed invalid chmod call
parents a1a2fa81 c64aaae3
Branches
No related tags found
No related merge requests found
...@@ -216,14 +216,14 @@ class framework implements \H5PFrameworkInterface { ...@@ -216,14 +216,14 @@ class framework implements \H5PFrameworkInterface {
// Generate local tmp file path. // Generate local tmp file path.
$localfolder = $CFG->tempdir . uniqid('/hvp-'); $localfolder = $CFG->tempdir . uniqid('/hvp-');
$stream = $localfolder . '.h5p'; $filename = $localfolder . '.h5p';
// Add folder and file paths to H5P Core. // Add folder and file paths to H5P Core.
$interface = self::instance('interface'); $interface = self::instance('interface');
$interface->getUploadedH5pFolderPath($localfolder); $interface->getUploadedH5pFolderPath($localfolder);
$interface->getUploadedH5pPath($stream); $interface->getUploadedH5pPath($filename);
$stream = fopen($stream, 'w'); $stream = fopen($filename, 'w');
$options['CURLOPT_FILE'] = $stream; $options['CURLOPT_FILE'] = $stream;
} }
...@@ -244,7 +244,7 @@ class framework implements \H5PFrameworkInterface { ...@@ -244,7 +244,7 @@ class framework implements \H5PFrameworkInterface {
if ($stream !== null) { if ($stream !== null) {
fclose($stream); fclose($stream);
@chmod($stream, $CFG->filepermissions); @chmod($filename, $CFG->filepermissions);
} }
$errorno = $curl->get_errno(); $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