LoggingConfigForm: only display the Syslog facility option if logging to Syslog

This commit is contained in:
Alexander A. Klimov 2016-11-04 17:19:35 +01:00
parent f27e8c059d
commit 1045d91389

View File

@ -94,6 +94,7 @@ class LoggingConfigForm extends Form
) )
); );
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(
@ -118,6 +119,7 @@ class LoggingConfigForm extends Form
) )
); );
} }
}
} elseif (isset($formData['logging_log']) && $formData['logging_log'] === 'file') { } elseif (isset($formData['logging_log']) && $formData['logging_log'] === 'file') {
$this->addElement( $this->addElement(
'text', 'text',