mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
parent
eb54c9875b
commit
0c47aececc
@ -25,6 +25,20 @@ class ApplicationConfigForm extends Form
|
|||||||
*/
|
*/
|
||||||
public function createElements(array $formData)
|
public function createElements(array $formData)
|
||||||
{
|
{
|
||||||
|
$this->addElement(
|
||||||
|
'checkbox',
|
||||||
|
'global_show_stacktraces',
|
||||||
|
array(
|
||||||
|
'required' => true,
|
||||||
|
'value' => true,
|
||||||
|
'label' => $this->translate('Show Stacktraces'),
|
||||||
|
'description' => $this->translate(
|
||||||
|
'Set whether to show an exception\'s stacktrace by default. This can also'
|
||||||
|
. ' be set in a user\'s preferences with the appropriate permission.'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'text',
|
'text',
|
||||||
'global_module_path',
|
'global_module_path',
|
||||||
|
@ -212,9 +212,12 @@ class Web extends EmbeddedWeb
|
|||||||
$this->frontController = Zend_Controller_Front::getInstance();
|
$this->frontController = Zend_Controller_Front::getInstance();
|
||||||
$this->frontController->setRequest($this->getRequest());
|
$this->frontController->setRequest($this->getRequest());
|
||||||
$this->frontController->setControllerDirectory($this->getApplicationDir('/controllers'));
|
$this->frontController->setControllerDirectory($this->getApplicationDir('/controllers'));
|
||||||
|
|
||||||
|
$displayExceptions = $this->config->get('global', 'show_stacktraces', true);
|
||||||
|
|
||||||
$this->frontController->setParams(
|
$this->frontController->setParams(
|
||||||
array(
|
array(
|
||||||
'displayExceptions' => true
|
'displayExceptions' => $displayExceptions
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -53,6 +53,10 @@ class GeneralConfigStep extends Step
|
|||||||
|
|
||||||
$generalHtml = ''
|
$generalHtml = ''
|
||||||
. '<ul>'
|
. '<ul>'
|
||||||
|
. '<li>' . ($this->data['generalConfig']['global_show_stacktraces']
|
||||||
|
? t('An exception\'s stacktrace is shown to every user by default.')
|
||||||
|
: t('An exception\'s stacktrace is hidden from every user by default.')
|
||||||
|
) . '</li>'
|
||||||
. '<li>' . sprintf(
|
. '<li>' . sprintf(
|
||||||
$this->data['generalConfig']['global_config_backend'] === 'ini' ? sprintf(
|
$this->data['generalConfig']['global_config_backend'] === 'ini' ? sprintf(
|
||||||
t('Preferences will be stored per user account in INI files at: %s'),
|
t('Preferences will be stored per user account in INI files at: %s'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user