Skip to content

Commit 91836ea

Browse files
committed
fixes on configuration admin page
1 parent 9b9e6e4 commit 91836ea

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

app/site/controllers/Admin/Config.php

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,7 @@ public function getFormDefinition(FAPI\Form $form, &$form_state)
9898
case 'new':
9999
$this->addBackButton();
100100

101-
if ($page instanceof Page) {
102-
$languages = $this->getUtils()->getSiteLanguagesSelectOptions($page->getWebsiteId());
103-
} else {
104-
$languages = $this->getUtils()->getSiteLanguagesSelectOptions();
105-
}
106-
107-
$languages = [null => $this->getUtils()->translate('All languages')] + $languages;
101+
$languages = [null => $this->getUtils()->translate('All languages')] + $this->getUtils()->getSiteLanguagesSelectOptions();
108102

109103
$websites = $this->getUtils()->getWebsitesSelectOptions();
110104

@@ -196,10 +190,13 @@ public function formValidate(FAPI\Form $form, &$form_state)
196190
*/
197191
public function formSubmitted(FAPI\Form $form, &$form_state)
198192
{
193+
$values = $form->values();
194+
199195
/**
200-
* @var Configuration $configuration
201-
*/
196+
* @var Configuration $configuration
197+
*/
202198
$configuration = $this->newEmptyObject();
199+
203200
if ($this->getRequest()->get('config_id')) {
204201
$configuration = $this->loadObject($this->getRequest()->get('config_id'));
205202

@@ -212,7 +209,6 @@ public function formSubmitted(FAPI\Form $form, &$form_state)
212209
}
213210
}
214211

215-
$values = $form->values();
216212
switch ($values['action']) {
217213
case 'new':
218214
case 'edit':

0 commit comments

Comments
 (0)