diff --git a/web/app/controllers/problem.php b/web/app/controllers/problem.php index ffcd596..c5762c2 100644 --- a/web/app/controllers/problem.php +++ b/web/app/controllers/problem.php @@ -241,10 +241,10 @@ if (UOJContest::cur()) { type() == 'local') { + if (UOJProblem::info('type') == 'local') { $time_limit = $conf instanceof UOJProblemConf ? $conf->getVal('time_limit', 1) : null; $memory_limit = $conf instanceof UOJProblemConf ? $conf->getVal('memory_limit', 256) : null; - } else if (UOJProblem::cur()->type() == 'remote') { + } else if (UOJProblem::info('type') == 'remote') { $time_limit = UOJProblem::cur()->getExtraConfig('time_limit'); $memory_limit = UOJProblem::cur()->getExtraConfig('memory_limit'); } diff --git a/web/app/controllers/problem_data_manage.php b/web/app/controllers/problem_data_manage.php index ab65cee..91112c7 100644 --- a/web/app/controllers/problem_data_manage.php +++ b/web/app/controllers/problem_data_manage.php @@ -10,7 +10,7 @@ requirePHPLib('data'); UOJProblem::init(UOJRequest::get('id')) || UOJResponse::page404(); UOJProblem::cur()->userCanManage(Auth::user()) || UOJResponse::page403(); -UOJProblem::cur()->type() === 'local' || UOJResponse::page404(); +UOJProblem::info('type') === 'local' || UOJResponse::page404(); $problem = UOJProblem::info(); $problem_extra_config = UOJProblem::cur()->getExtraConfig(); diff --git a/web/app/controllers/problem_managers_manage.php b/web/app/controllers/problem_managers_manage.php index b381daa..9e8ca75 100644 --- a/web/app/controllers/problem_managers_manage.php +++ b/web/app/controllers/problem_managers_manage.php @@ -82,7 +82,7 @@ if (isSuperUser(Auth::user())) { 管理者 - type() == 'local') : ?> +