Make preferences INI path NOT be configurable

fixes #6567
This commit is contained in:
Alexander Klimov 2014-06-24 18:29:28 +02:00
parent f2693613d1
commit 219869607d
2 changed files with 2 additions and 19 deletions

View File

@ -291,16 +291,6 @@ class GeneralForm extends Form
) )
); );
$txtPreferencesIniPath = new Zend_Form_Element_Text(
array(
'name' => 'preferences_ini_path',
'label' => 'User Preference Filepath',
'required' => $backend === 'ini',
'condition' => $backend === 'ini',
'value' => $cfg->get('config_path')
)
);
$backends = array(); $backends = array();
foreach ($this->getResources() as $name => $resource) { foreach ($this->getResources() as $name => $resource) {
if ($resource['type'] !== 'db') { if ($resource['type'] !== 'db') {
@ -321,11 +311,8 @@ class GeneralForm extends Form
); );
$validator = new WritablePathValidator(); $validator = new WritablePathValidator();
$validator->setRequireExistence(); $validator->setRequireExistence();
$txtPreferencesIniPath->addValidator($validator);
$this->addElement($txtPreferencesIniPath);
$this->addElement($txtPreferencesDbResource); $this->addElement($txtPreferencesDbResource);
$txtPreferencesIniPath->addDecorator(new ConditionalHidden());
$txtPreferencesDbResource->addDecorator(new ConditionalHidden()); $txtPreferencesDbResource->addDecorator(new ConditionalHidden());
$this->enableAutoSubmit( $this->enableAutoSubmit(
array( array(
@ -385,9 +372,7 @@ class GeneralForm extends Form
$cfg->preferences->type = $values['preferences_type']; $cfg->preferences->type = $values['preferences_type'];
if ($cfg->preferences->type === 'ini') { if ($cfg->preferences->type === 'db') {
$cfg->preferences->config_path = $values['preferences_ini_path'];
} elseif ($cfg->preferences->type === 'db') {
$cfg->preferences->resource = $values['preferences_db_resource']; $cfg->preferences->resource = $values['preferences_db_resource'];
} }

View File

@ -152,9 +152,7 @@ abstract class ApplicationBootstrap
} }
} }
$canonical = realpath($configDir); $canonical = realpath($configDir);
if ($canonical) { $this->configDir = $canonical ? $canonical : $configDir;
$this->configDir = $canonical;
}
$this->setupAutoloader(); $this->setupAutoloader();
$this->setupZendAutoloader(); $this->setupZendAutoloader();