mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
Only provide an array of module names to install.
This commit is contained in:
parent
f360de1ea1
commit
1f3273a7eb
|
@ -68,7 +68,7 @@ function farm_install_modules(array &$install_state) {
|
||||||
|
|
||||||
// Assemble the batch operation for installing modules.
|
// Assemble the batch operation for installing modules.
|
||||||
$operations = [];
|
$operations = [];
|
||||||
foreach ($modules as $module => $weight) {
|
foreach ($modules as $module) {
|
||||||
$operations[] = [
|
$operations[] = [
|
||||||
'_farm_install_module_batch',
|
'_farm_install_module_batch',
|
||||||
[
|
[
|
||||||
|
|
|
@ -115,7 +115,8 @@ class FarmModulesForm extends FormBase {
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function submitForm(array &$form, FormStateInterface $form_state) {
|
public function submitForm(array &$form, FormStateInterface $form_state) {
|
||||||
$modules = array_filter($form_state->getValue('modules'));
|
// Build array of module names to install.
|
||||||
|
$modules = array_values(array_filter($form_state->getValue('modules')));
|
||||||
$this->state->set('farm.install_modules', $modules);
|
$this->state->set('farm.install_modules', $modules);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue