parent
eb54c9875b
commit
0c47aececc
|
@ -25,6 +25,20 @@ class ApplicationConfigForm extends Form
|
|||
*/
|
||||
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(
|
||||
'text',
|
||||
'global_module_path',
|
||||
|
|
|
@ -212,9 +212,12 @@ class Web extends EmbeddedWeb
|
|||
$this->frontController = Zend_Controller_Front::getInstance();
|
||||
$this->frontController->setRequest($this->getRequest());
|
||||
$this->frontController->setControllerDirectory($this->getApplicationDir('/controllers'));
|
||||
|
||||
$displayExceptions = $this->config->get('global', 'show_stacktraces', true);
|
||||
|
||||
$this->frontController->setParams(
|
||||
array(
|
||||
'displayExceptions' => true
|
||||
'displayExceptions' => $displayExceptions
|
||||
)
|
||||
);
|
||||
return $this;
|
||||
|
|
|
@ -53,6 +53,10 @@ class GeneralConfigStep extends Step
|
|||
|
||||
$generalHtml = ''
|
||||
. '<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(
|
||||
$this->data['generalConfig']['global_config_backend'] === 'ini' ? sprintf(
|
||||
t('Preferences will be stored per user account in INI files at: %s'),
|
||||
|
|
Loading…
Reference in New Issue