Commit 59cc0ba8 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Fixes #4890 Error in the setup at config step

Showing with 20 additions and 25 deletions
+20 -25
...@@ -50,13 +50,13 @@ class setup ...@@ -50,13 +50,13 @@ class setup
function __construct() function __construct()
{ {
$this->o_steps = array( $this->o_steps = array(
new Step_Welcome(), new Step_Welcome($this),
new Step_Language(), new Step_Language($this),
new Step_Checks(), new Step_Checks($this),
new Step_Ldap(), new Step_Ldap($this),
new Step_Config_before_init(), new Step_Config_before_init($this),
new Step_Migrate(), new Step_Migrate($this),
new Step_Finish(), new Step_Finish($this),
); );
$this->i_steps = count($this->o_steps); $this->i_steps = count($this->o_steps);
...@@ -67,11 +67,6 @@ class setup ...@@ -67,11 +67,6 @@ class setup
header("Location: index.php"); header("Location: index.php");
exit(); exit();
} }
foreach ($this->o_steps as &$step) {
$step->parent = &$this;
}
unset($step);
} }
function execute() function execute()
...@@ -318,7 +313,7 @@ class setup ...@@ -318,7 +313,7 @@ class setup
function reBuildConfigStep ($completed = NULL) function reBuildConfigStep ($completed = NULL)
{ {
$this->o_steps[$this->i_config] = new Step_Config($this->captured_values); $this->o_steps[$this->i_config] = new Step_Config($this, $this->captured_values);
if ($completed !== NULL) { if ($completed !== NULL) {
$this->o_steps[$this->i_config]->is_completed = $completed; $this->o_steps[$this->i_config]->is_completed = $completed;
} }
......
...@@ -35,9 +35,9 @@ class setupStep extends simplePlugin ...@@ -35,9 +35,9 @@ class setupStep extends simplePlugin
return array(); return array();
} }
function __construct() function __construct($parent)
{ {
parent::__construct(); parent::__construct(NULL, NULL, $parent);
$this->update_strings(); $this->update_strings();
} }
......
...@@ -47,10 +47,10 @@ class Step_Config extends configInLdap ...@@ -47,10 +47,10 @@ class Step_Config extends configInLdap
return array(); return array();
} }
function __construct($cv) function __construct($parent, $cv)
{ {
global $config; global $config;
parent::__construct(CONFIGRDN.$config->current['BASE']); parent::__construct(CONFIGRDN.$config->current['BASE'], NULL, $parent, TRUE);
$this->attributesInfo['miscellaneous']['class'] = array('invisible'); $this->attributesInfo['miscellaneous']['class'] = array('invisible');
$this->attributesInfo['debug']['class'] = array('invisible'); $this->attributesInfo['debug']['class'] = array('invisible');
......
...@@ -47,9 +47,9 @@ class Step_Language extends setupStep ...@@ -47,9 +47,9 @@ class Step_Language extends setupStep
); );
} }
function __construct() function __construct($parent)
{ {
parent::__construct(); parent::__construct($parent);
$this->lang = get_browser_language(); $this->lang = get_browser_language();
$this->attributesAccess['lang_selected']->setSize(20); $this->attributesAccess['lang_selected']->setSize(20);
} }
......
...@@ -91,9 +91,9 @@ class Step_Ldap extends setupStep ...@@ -91,9 +91,9 @@ class Step_Ldap extends setupStep
); );
} }
function __construct() function __construct($parent)
{ {
parent::__construct(); parent::__construct($parent);
$this->update_strings(); $this->update_strings();
$this->attributesAccess['base']->setSubmitForm(TRUE); $this->attributesAccess['base']->setSubmitForm(TRUE);
$this->attributesAccess['admin']->setLinearRendering(TRUE); $this->attributesAccess['admin']->setLinearRendering(TRUE);
......
...@@ -212,9 +212,9 @@ class Step_Migrate extends setupStep ...@@ -212,9 +212,9 @@ class Step_Migrate extends setupStep
); );
} }
function __construct() function __construct($parent)
{ {
parent::__construct(); parent::__construct($parent);
$this->fill_defaultRoles(); $this->fill_defaultRoles();
} }
......
...@@ -35,9 +35,9 @@ class Step_Welcome extends setupStep ...@@ -35,9 +35,9 @@ class Step_Welcome extends setupStep
); );
} }
function __construct() function __construct($parent)
{ {
parent::__construct(); parent::__construct($parent);
$this->is_enabled = TRUE; $this->is_enabled = TRUE;
$this->is_active = TRUE; $this->is_active = TRUE;
......
  • bmortier @bmortier

    mentioned in issue #1546

    By Jonathan Swaelens on 2017-09-02T15:30:09 (imported from GitLab)

    ·

    mentioned in issue #1546

    By Jonathan Swaelens on 2017-09-02T15:30:09 (imported from GitLab)

    Toggle commit list
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment