S2OJ/web/app/upgrade/31_problem_resources/upgrade.php

14 lines
232 B
PHP
Raw Normal View History

2023-01-30 10:53:20 +00:00
<?php
return function ($type) {
if ($type == 'up') {
DB::init();
$problems = DB::selectAll("select id from problems");
foreach ($problems as $id) {
mkdir(UOJContext::storagePath() . "/problem_resources/$id");
}
}
};