Skip to content
Snippets Groups Projects
Commit 95e76cca authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

ensure mvv files are really only updated, fixes #4370

Closes #4370

Merge request studip/studip!3169
parent e057092e
Branches
No related tags found
No related merge requests found
......@@ -392,10 +392,10 @@ class Materialien_FilesController extends MVVController
$file->connectWithDataFile($_FILES['file']['tmp_name']);
$file->store();
$file = new StandardFile($ref);
$file = $ref->getFileType();
} else {
$file = StandardFile::create($_FILES['file']);
}
$error = $top_folder->validateUpload($file, $user->id);
if ($error !== null) {
if (!$document_id) {
......@@ -421,6 +421,7 @@ class Materialien_FilesController extends MVVController
]);
$mvv_file_fileref->fileref_id = $file->id;
$mvv_file_fileref->store();
}
$output['document_id'] = $file->id;
$output['icon'] = $file->getIcon(Icon::ROLE_CLICKABLE)->asImg(['class' => 'text-bottom']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment