mirror of
https://github.com/flarum/framework.git
synced 2024-11-27 02:53:37 +08:00
Remove mail settings backwards compatibility layer
This commit is contained in:
parent
1b66612e11
commit
6b20c92be2
|
@ -36,19 +36,7 @@ class MailSettingsSerializer extends AbstractSerializer
|
|||
|
||||
private function serializeDriver(DriverInterface $driver)
|
||||
{
|
||||
$settings = $driver->availableSettings();
|
||||
|
||||
if (key($settings) === 0) {
|
||||
// BACKWARDS COMPATIBILITY: Support a simple list of fields (without
|
||||
// type or additional metadata).
|
||||
// Turns ["f1", "f2"] into {"f1": "", "f2": ""}
|
||||
// @deprecated since 0.1.0-beta.12
|
||||
$settings = array_reduce($settings, function ($memo, $key) {
|
||||
return [$key => ''] + $memo;
|
||||
}, []);
|
||||
}
|
||||
|
||||
return $settings;
|
||||
return $driver->availableSettings();
|
||||
}
|
||||
|
||||
public function getId($model)
|
||||
|
|
Loading…
Reference in New Issue
Block a user