This commit is contained in:
Baoshuo Ren 2023-02-06 11:43:18 +08:00
parent 4c0167ee6e
commit 46592477c5
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -120,16 +120,15 @@ function handleUpload($zip_file_name, $content, $tot_size) {
$content['remote_submission_id'] = $_POST['answer_remote_submission_id'];
$content['config'][] = ['remote_submission_id', $_POST['answer_remote_submission_id']];
$content['config'] = array_filter(
$content['config'] = array_values(array_filter(
$content['config'],
function ($key) {
return !strEndWith($key, '_language');
function ($row) {
return !strEndWith($row[0], '_language');
},
ARRAY_FILTER_USE_KEY
);
));
$zip_file = new ZipArchive();
$zip_file->open(UOJContext::storagePath() . $zip_file_name, ZipArchive::CREATE);
$zip_file->open(UOJContext::storagePath() . $zip_file_name, ZipArchive::OVERWRITE);
$zip_file->addFromString('answer.code', '');
$zip_file->close();
}