parent
ca66480ba7
commit
4992140326
|
@ -27,7 +27,7 @@ class IniWriter extends Zend_Config_Writer_FileAbstract
|
|||
*
|
||||
* @var int
|
||||
*/
|
||||
public static $fileMode;
|
||||
public static $fileMode = 0664;
|
||||
|
||||
/**
|
||||
* Create a new INI writer
|
||||
|
|
|
@ -40,8 +40,7 @@ class BackendStep extends Step
|
|||
try {
|
||||
$writer = new IniWriter(array(
|
||||
'config' => new Config($config),
|
||||
'filename' => Config::resolvePath('modules/monitoring/backends.ini'),
|
||||
'filemode' => octdec($this->data['fileMode'])
|
||||
'filename' => Config::resolvePath('modules/monitoring/backends.ini')
|
||||
));
|
||||
$writer->write();
|
||||
} catch (Exception $e) {
|
||||
|
@ -66,7 +65,7 @@ class BackendStep extends Step
|
|||
$writer = new IniWriter(array(
|
||||
'config' => $config,
|
||||
'filename' => Config::resolvePath('resources.ini'),
|
||||
'filemode' => octdec($this->data['fileMode'])
|
||||
'filemode' => 0660
|
||||
));
|
||||
$writer->write();
|
||||
} catch (Exception $e) {
|
||||
|
|
|
@ -29,8 +29,7 @@ class InstanceStep extends Step
|
|||
try {
|
||||
$writer = new IniWriter(array(
|
||||
'config' => new Config(array($instanceName => $instanceConfig)),
|
||||
'filename' => Config::resolvePath('modules/monitoring/instances.ini'),
|
||||
'filemode' => octdec($this->data['fileMode'])
|
||||
'filename' => Config::resolvePath('modules/monitoring/instances.ini')
|
||||
));
|
||||
$writer->write();
|
||||
} catch (Exception $e) {
|
||||
|
|
|
@ -131,22 +131,19 @@ class MonitoringWizard extends Wizard implements SetupWizard
|
|||
'backendConfig' => $pageData['setup_monitoring_backend'],
|
||||
'resourceConfig' => isset($pageData['setup_monitoring_ido'])
|
||||
? array_diff_key($pageData['setup_monitoring_ido'], array('skip_validation' => null))
|
||||
: array_diff_key($pageData['setup_monitoring_livestatus'], array('skip_validation' => null)),
|
||||
'fileMode' => $pageData['setup_general_config']['global_filemode']
|
||||
: array_diff_key($pageData['setup_monitoring_livestatus'], array('skip_validation' => null))
|
||||
))
|
||||
);
|
||||
|
||||
$setup->addStep(
|
||||
new InstanceStep(array(
|
||||
'instanceConfig' => $pageData['setup_monitoring_instance'],
|
||||
'fileMode' => $pageData['setup_general_config']['global_filemode']
|
||||
'instanceConfig' => $pageData['setup_monitoring_instance']
|
||||
))
|
||||
);
|
||||
|
||||
$setup->addStep(
|
||||
new SecurityStep(array(
|
||||
'securityConfig' => $pageData['setup_monitoring_security'],
|
||||
'fileMode' => $pageData['setup_general_config']['global_filemode']
|
||||
'securityConfig' => $pageData['setup_monitoring_security']
|
||||
))
|
||||
);
|
||||
|
||||
|
|
|
@ -28,8 +28,7 @@ class SecurityStep extends Step
|
|||
try {
|
||||
$writer = new IniWriter(array(
|
||||
'config' => new Config($config),
|
||||
'filename' => Config::resolvePath('modules/monitoring/config.ini'),
|
||||
'filemode' => octdec($this->data['fileMode'])
|
||||
'filename' => Config::resolvePath('modules/monitoring/config.ini')
|
||||
));
|
||||
$writer->write();
|
||||
} catch (Exception $e) {
|
||||
|
|
|
@ -51,8 +51,7 @@ class AuthenticationStep extends Step
|
|||
try {
|
||||
$writer = new IniWriter(array(
|
||||
'config' => new Config($config),
|
||||
'filename' => Config::resolvePath('authentication.ini'),
|
||||
'filemode' => octdec($this->data['fileMode'])
|
||||
'filename' => Config::resolvePath('authentication.ini')
|
||||
));
|
||||
$writer->write();
|
||||
} catch (Exception $e) {
|
||||
|
@ -75,8 +74,7 @@ class AuthenticationStep extends Step
|
|||
try {
|
||||
$writer = new IniWriter(array(
|
||||
'config' => new Config($config),
|
||||
'filename' => Config::resolvePath('permissions.ini'),
|
||||
'filemode' => octdec($this->data['fileMode'])
|
||||
'filename' => Config::resolvePath('permissions.ini')
|
||||
));
|
||||
$writer->write();
|
||||
} catch (Exception $e) {
|
||||
|
|
|
@ -37,8 +37,7 @@ class GeneralConfigStep extends Step
|
|||
try {
|
||||
$writer = new IniWriter(array(
|
||||
'config' => new Config($config),
|
||||
'filename' => Config::resolvePath('config.ini'),
|
||||
'filemode' => octdec($this->data['fileMode'])
|
||||
'filename' => Config::resolvePath('config.ini')
|
||||
));
|
||||
$writer->write();
|
||||
} catch (Exception $e) {
|
||||
|
|
|
@ -41,7 +41,7 @@ class ResourceStep extends Step
|
|||
$writer = new IniWriter(array(
|
||||
'config' => new Config($resourceConfig),
|
||||
'filename' => Config::resolvePath('resources.ini'),
|
||||
'filemode' => octdec($this->data['fileMode'])
|
||||
'filemode' => 0660
|
||||
));
|
||||
$writer->write();
|
||||
} catch (Exception $e) {
|
||||
|
|
|
@ -306,8 +306,7 @@ class WebWizard extends Wizard implements SetupWizard
|
|||
'preferencesType' => $pageData['setup_preferences_type']['type'],
|
||||
'preferencesResource' => isset($pageData['setup_db_resource']['name'])
|
||||
? $pageData['setup_db_resource']['name']
|
||||
: null,
|
||||
'fileMode' => $pageData['setup_general_config']['global_filemode']
|
||||
: null
|
||||
))
|
||||
);
|
||||
|
||||
|
@ -325,7 +324,6 @@ class WebWizard extends Wizard implements SetupWizard
|
|||
$setup->addStep(
|
||||
new AuthenticationStep(array(
|
||||
'adminAccountData' => $adminAccountData,
|
||||
'fileMode' => $pageData['setup_general_config']['global_filemode'],
|
||||
'backendConfig' => $pageData['setup_authentication_backend'],
|
||||
'resourceName' => $authType === 'db' ? $pageData['setup_db_resource']['name'] : (
|
||||
$authType === 'ldap' ? $pageData['setup_ldap_resource']['name'] : null
|
||||
|
@ -336,7 +334,6 @@ class WebWizard extends Wizard implements SetupWizard
|
|||
if (isset($pageData['setup_db_resource']) || isset($pageData['setup_ldap_resource'])) {
|
||||
$setup->addStep(
|
||||
new ResourceStep(array(
|
||||
'fileMode' => $pageData['setup_general_config']['global_filemode'],
|
||||
'dbResourceConfig' => isset($pageData['setup_db_resource'])
|
||||
? array_diff_key($pageData['setup_db_resource'], array('skip_validation' => null))
|
||||
: null,
|
||||
|
|
Loading…
Reference in New Issue