aboutsummaryrefslogtreecommitdiff
path: root/lib/extern/ExternPage.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/extern/ExternPage.php')
-rw-r--r--lib/extern/ExternPage.php9
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) {