From 0ae6b9083f1ced239908e6136a2c3cacfc26490e Mon Sep 17 00:00:00 2001 From: Michael Vasseur <14887731+vmcj@users.noreply.github.com> Date: Wed, 4 Oct 2023 17:52:21 +0200 Subject: [PATCH] Implement Tobi his feedback, read from config options --- webapp/src/Entity/Executable.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webapp/src/Entity/Executable.php b/webapp/src/Entity/Executable.php index 2784f30541..943bf5410f 100644 --- a/webapp/src/Entity/Executable.php +++ b/webapp/src/Entity/Executable.php @@ -184,8 +184,10 @@ public function getZipfileContent(string $tempdir): string public function checkEnabled(): bool { - if (in_array($execid, ['compare', 'run', 'full_debug'])) { - return true; + foreach (['compare', 'run', 'full_debug'] as $config_script) { + if ($execid === (string)$this->config->get('default_' . $config_script)) { + return true; + } } if (count($problems_compare) || count($problems_run)) { return true;