diff options
| author | Philipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de> | 2024-09-24 10:53:31 +0200 |
|---|---|---|
| committer | Philipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de> | 2024-09-24 10:53:31 +0200 |
| commit | 4459dd7917f4d1c34f40bb68f0e991e9c3d53e4c (patch) | |
| tree | 5c07151ae61276d334e88f6309c30d439a85c12e /lib/extern/ExternPage.php | |
| parent | da0022e5c1abbf9825ae76debaabdff7e8623bb4 (diff) | |
| parent | 97a188592c679890a25c37ab78463add76a52ff7 (diff) | |
Merge branch 'main' into issue-3911issue-3911
Diffstat (limited to 'lib/extern/ExternPage.php')
| -rw-r--r-- | lib/extern/ExternPage.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/extern/ExternPage.php b/lib/extern/ExternPage.php index 8ed0e96..d3c5ec2 100644 --- a/lib/extern/ExternPage.php +++ b/lib/extern/ExternPage.php @@ -13,8 +13,6 @@ * @since 5.4 */ -require_once 'vendor/exTpl/Template.php'; - abstract class ExternPage { /** @@ -112,7 +110,7 @@ abstract class ExternPage $page_name = 'ExternPage' . $config->type; if (!class_exists($page_name)) { // lookup plugins - $plugins = PluginEngine::getPlugins('ExternPagePlugin'); + $plugins = PluginEngine::getPlugins(ExternPagePlugin::class); foreach ($plugins as $plugin) { if ($config->type === $plugin->getExternPageName()) { return $plugin->getExternPage($config); @@ -138,7 +136,7 @@ abstract class ExternPage $extract[] = array_values(array_filter(array_map('trim', explode(' ', $one)))); } foreach ($extract as $one) { - $return[$one[0]] = $one[1]; + $return[$one[0]] = $one[1] ?? null; } return $return; } @@ -236,7 +234,7 @@ abstract class ExternPage $allowed_params = $this->getAllowedRequestParams(true); $config_fields = $this->getConfigFields(true); foreach ($allowed_params as $param_name) { - $method = $config_fields[$param_name] ?: 'get'; + $method = $config_fields[$param_name] ?? 'get'; $param_value = Request::$method($param_name); if ($param_value) { $this->setValue($param_name, $param_value); @@ -342,6 +340,7 @@ abstract class ExternPage ): string { if (count($scopes) > 0) { $study_areas = StudipStudyArea::findMany($scopes); + $scopes = []; if ($with_kids) { foreach ($study_areas as $study_area) { |
