Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 41c1e50

Browse files
author
Jamie Snape
committed
Do not allow an instance to be switched to development mode using the GUI
Change in the config file if you really need to do so.
1 parent f4603d7 commit 41c1e50

File tree

7 files changed

+5
-28
lines changed

7 files changed

+5
-28
lines changed

core/controllers/AdminController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ public function indexAction()
7777
$configForm = $this->Form->Admin->createConfigForm();
7878
$formArray = $this->getFormAsArray($configForm);
7979
$formArray['description']->setValue($config->global->application->description);
80-
$formArray['environment']->setValue($config->global->environment);
8180
$formArray['lang']->setValue($config->global->application->lang);
8281
$formArray['name']->setValue($config->global->application->name);
8382
$formArray['timezone']->setValue($config->global->default->timezone);

core/controllers/InstallController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ public function step3Action()
237237
$form = $this->Form->Install->createConfigForm();
238238
$formArray = $this->getFormAsArray($form);
239239
$formArray['description']->setValue($config->global->application->description);
240-
$formArray['environment']->setValue($config->global->environment);
241240
$formArray['lang']->setValue($config->global->application->lang);
242241
$formArray['name']->setValue($config->global->application->name);
243242
$formArray['timezone']->setValue($config->global->default->timezone);

core/controllers/forms/AdminForm.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ public function createConfigForm()
4949
)
5050
);
5151

52-
$environment = new Zend_Form_Element_Select('environment');
53-
$environment->addMultiOptions(array('production' => 'Production', 'development' => 'Development'));
54-
5552
$name = new Zend_Form_Element_Text('name');
5653
$name->setRequired(true)->addValidator('NotEmpty', true);
5754

@@ -70,7 +67,6 @@ public function createConfigForm()
7067
$dynamichelp,
7168
$description,
7269
$timezone,
73-
$environment,
7470
$gravatar,
7571
$lang,
7672
$name,

core/controllers/forms/InstallForm.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,6 @@ public function createConfigForm()
113113
)
114114
);
115115

116-
$environment = new Zend_Form_Element_Select('environment');
117-
$environment->addMultiOptions(array('production' => 'Production', 'development' => 'Development'));
118-
119116
$description = new Zend_Form_Element_Textarea('description');
120117

121118
$name = new Zend_Form_Element_Text('name');
@@ -124,7 +121,7 @@ public function createConfigForm()
124121
$submit = new Zend_Form_Element_Submit('submit');
125122
$submit->setLabel('Create configuration');
126123

127-
$form->addElements(array($description, $timezone, $environment, $lang, $name, $submit));
124+
$form->addElements(array($description, $timezone, $lang, $name, $submit));
128125

129126
return $form;
130127
}

core/public/js/install/install.step3.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ $(document).ready(function () {
77
helpText['name'] = '<h4>Name</h4>Please select the name of your installation of MIDAS';
88
helpText['description'] = '<h4>Description</h4>Provide a description for search engines.';
99
helpText['lang'] = '<h4>Language</h4>Please select the default language. Currently, English and French are available.';
10-
helpText['env'] = '<h4>Environment</h4>Development is slower, but it will show you all the information needed to debug the application<br/><br/>Production is faster, but it hides the errors.';
1110
helpText['time'] = '<h4>Timezone</h4>Please select the timezone of your server.';
1211
helpText['assetstore'] = '<h4>Default Assetstore</h4>Please select a default assetstore. An assestore is the location where the uploaded files are stored.';
1312

@@ -26,11 +25,6 @@ $(document).ready(function () {
2625
}, function () {
2726
$('.installHelp').html(defaultTest);
2827
});
29-
$('.installEnvironment').hover(function () {
30-
$('.installHelp').html(helpText['env']);
31-
}, function () {
32-
$('.installHelp').html(defaultTest);
33-
});
3428
$('.installTimezone').hover(function () {
3529
$('.installHelp').html(helpText['time']);
3630
}, function () {

core/views/admin/index.phtml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ $this->headScript()->appendFile($this->coreWebroot.'/public/js/jquery/jquery.clu
5959
{$this->configForm['name']}
6060
</div>
6161
<div qtip='Provide a description for search engines.' class='description'>
62-
<label for='name'>Description</label>
62+
<label for='description'>Description</label>
6363
{$this->configForm['description']}
6464
</div>
6565
<div class='httpProxy'>
@@ -77,20 +77,16 @@ $this->headScript()->appendFile($this->coreWebroot.'/public/js/jquery/jquery.clu
7777
<label for='lang'>Language</label>
7878
{$this->configForm['lang']}
7979
</div>
80-
<div qtip='Development is slower, but will display debug information.<br/><br/>Production is faster, but hides the errors.<br/><br/>Do not select development for web-accessible instances under any circumstances.' class='installEnvironment'>
81-
<label for='environment'>Environment</label>
82-
{$this->configForm['environment']}
83-
</div>
8480
<div class='installTimezone'>
85-
<label for='environment'>Time zone</label>
81+
<label for='timezone'>Time zone</label>
8682
{$this->configForm['timezone']}
8783
</div>
8884
<div qtip='If you enable this feature, Midas will show the users how to use the system.' class='installDynamichelp'>
8985
<label for='dynamichelp'>Dynamic help</label>
9086
{$this->configForm['dynamichelp']}
9187
</div>
9288
<div qtip='If you enable this feature, user registration will not be allowed.' class='closeRegistration'>
93-
<label for='closeRegistration'>Close registration</label>
89+
<label for='closeregistration'>Close registration</label>
9490
{$this->configForm['closeregistration']}
9591
</div>
9692
<div qtip='If enabled, users will automatically have an icon if they have created one on gravatar.com'>

core/views/install/step3.phtml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,8 @@ $this->headScript()->appendFile($this->coreWebroot.'/public/js/install/install.s
4747
<label for='lang'>Language</label>
4848
{$this->form['lang']}
4949
</div>
50-
<div class='installEnvironment'>
51-
<label for='environment'>Environment</label>
52-
{$this->form['environment']}
53-
</div>
5450
<div class='installTimezone'>
55-
<label for='environment'>Time zone</label>
51+
<label for='timezone'>Time zone</label>
5652
{$this->form['timezone']}
5753
</div>
5854
";

0 commit comments

Comments
 (0)