LoggingConfigForm: Fix that the facility is missing without any log config

Also re-sets syslog as the default selection as it's the actual default
without any log config. The previous commit in this file fixed this the
wrong way. (Shame on me..)
This commit is contained in:
Johannes Meyer 2018-04-17 10:21:47 +02:00 committed by Eric Lippmann
parent 3f66bd7437
commit cece9d7e65
1 changed files with 2 additions and 2 deletions

View File

@ -39,8 +39,8 @@ class LoggingConfigForm extends Form
'label' => $this->translate('Logging Type'), 'label' => $this->translate('Logging Type'),
'description' => $this->translate('The type of logging to utilize.'), 'description' => $this->translate('The type of logging to utilize.'),
'multiOptions' => array( 'multiOptions' => array(
'php' => $this->translate('Webserver Log', 'app.config.logging.type'),
'syslog' => 'Syslog', 'syslog' => 'Syslog',
'php' => $this->translate('Webserver Log', 'app.config.logging.type'),
'file' => $this->translate('File', 'app.config.logging.type'), 'file' => $this->translate('File', 'app.config.logging.type'),
'none' => $this->translate('None', 'app.config.logging.type') 'none' => $this->translate('None', 'app.config.logging.type')
) )
@ -94,7 +94,7 @@ class LoggingConfigForm extends Form
) )
); );
if (isset($formData['logging_log']) && $formData['logging_log'] === 'syslog') { if (! isset($formData['logging_log']) || $formData['logging_log'] === 'syslog') {
if (Platform::isWindows()) { if (Platform::isWindows()) {
/* @see https://secure.php.net/manual/en/function.openlog.php */ /* @see https://secure.php.net/manual/en/function.openlog.php */
$this->addElement( $this->addElement(