Verified Commit 00f20ac3 authored by dockx thibault's avatar dockx thibault
Browse files

:sparkles: (Management) - updates to php8.2

Management class update to php8.2
No related merge requests found
Showing with 11 additions and 11 deletions
+11 -11
......@@ -99,11 +99,11 @@ class management implements FusionDirectoryDialog
global $config, $class_mapping;
if ($objectTypes === FALSE) {
$plInfos = pluglist::pluginInfos(get_class($this));
$plInfos = pluglist::pluginInfos(static::class);
$objectTypes = $plInfos['plManages'];
}
if (!preg_match('/^geticon/', $this->icon)) {
if (!preg_match('/^geticon/', (string) $this->icon)) {
$this->icon = get_template_path($this->icon);
}
......@@ -111,8 +111,8 @@ class management implements FusionDirectoryDialog
foreach ($objectTypes as $key => $type) {
try {
objects::infos($type);
$objectTypes[$key] = strtoupper($type);
} catch (NonExistingObjectTypeException $e) {
$objectTypes[$key] = strtoupper((string) $type);
} catch (NonExistingObjectTypeException) {
unset($objectTypes[$key]);
}
}
......@@ -156,7 +156,7 @@ class management implements FusionDirectoryDialog
protected function setUpHeadline ()
{
$plInfos = pluglist::pluginInfos(get_class($this));
$plInfos = pluglist::pluginInfos(static::class);
$this->headline = $plInfos['plShortName'];
$this->title = $plInfos['plTitle'];
......@@ -362,7 +362,7 @@ class management implements FusionDirectoryDialog
if (!isset($this->columnConfiguration)) {
// LDAP configuration
$this->columnConfiguration = $config->getManagementConfig(get_class($this));
$this->columnConfiguration = $config->getManagementConfig(static::class);
}
if (!isset($this->columnConfiguration)) {
......@@ -430,8 +430,8 @@ class management implements FusionDirectoryDialog
protected function handleSubAction (array $action): bool
{
if (preg_match('/^tab_/', $action['subaction'])) {
$tab = preg_replace('/^tab_/', '', $action['subaction']);
if (preg_match('/^tab_/', (string) $action['subaction'])) {
$tab = preg_replace('/^tab_/', '', (string) $action['subaction']);
if (isset($this->tabObject->by_object[$tab])) {
$this->tabObject->current = $tab;
} else {
......@@ -768,7 +768,7 @@ class management implements FusionDirectoryDialog
if (static::$skipTemplates) {
return;
}
$type = preg_replace('/^template_/', '', $action['subaction']);
$type = preg_replace('/^template_/', '', (string) $action['subaction']);
$this->currentDn = 'new';
......@@ -793,7 +793,7 @@ class management implements FusionDirectoryDialog
}
$type = $this->listing->getEntry($dn)->getTemplatedType();
} else {
$type = preg_replace('/^apply_/', '', $action['subaction']);
$type = preg_replace('/^apply_/', '', (string) $action['subaction']);
}
$this->dialogObject = new templateDialog($this, $type, $dn);
}
......@@ -1124,7 +1124,7 @@ class management implements FusionDirectoryDialog
} else {
$error = new FusionDirectoryPermissionError(msgPool::permDelete($dn));
$error->display();
logging::log('security', 'management/' . get_class($this), $dn, [], 'Tried to trick deletion.');
logging::log('security', 'management/' . static::class, $dn, [], 'Tried to trick deletion.');
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment