S2OJ/web/app/upgrade/31_problem_resources/upgrade.php
Baoshuo aa6bf6a363
All checks were successful
continuous-integration/drone/push Build is passing
fix: 1e775d0d02
2023-01-30 21:43:38 +08:00

14 lines
242 B
PHP

<?php
return function ($type) {
if ($type == 'up') {
DB::init();
$problems = DB::selectAll("select id from problems");
foreach ($problems as $row) {
mkdir(UOJContext::storagePath() . "/problem_resources/{$row['id']}");
}
}
};