mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Fix Config handling
This commit is contained in:
parent
efbc7563ac
commit
d76ba3abc9
2 changed files with 16 additions and 10 deletions
|
|
@ -58,16 +58,7 @@ abstract class AbstractConfig implements \JsonSerializable
|
||||||
#[\ReturnTypeWillChange]
|
#[\ReturnTypeWillChange]
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
$aData = [];
|
return $this->aData;;
|
||||||
foreach ($this->aData as $sSectionKey => $aSectionValue) {
|
|
||||||
if (\is_array($aSectionValue)) {
|
|
||||||
$aData[$sSectionKey] = [];
|
|
||||||
foreach ($aSectionValue as $sParamKey => $mParamValue) {
|
|
||||||
$aData[$sSectionKey][$sParamKey] = $mParamValue[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $aData;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -37,4 +37,19 @@ class Plugin extends \RainLoop\Config\AbstractConfig
|
||||||
{
|
{
|
||||||
return $this->aMap;
|
return $this->aMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
|
public function jsonSerialize()
|
||||||
|
{
|
||||||
|
$aData = [];
|
||||||
|
foreach ($this->aData as $sSectionKey => $aSectionValue) {
|
||||||
|
if (\is_array($aSectionValue)) {
|
||||||
|
$aData[$sSectionKey] = [];
|
||||||
|
foreach ($aSectionValue as $sParamKey => $mParamValue) {
|
||||||
|
$aData[$sSectionKey][$sParamKey] = $mParamValue[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $aData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue