Simplify WizardResult
This commit is contained in:
parent
53db1fe5ac
commit
3fe400a3ca
|
@ -81,7 +81,6 @@ class Wizard extends LDAPUtility {
|
||||||
\OCP\Util::writeLog('user_ldap', 'Wiz: detected Port '. $p, \OCP\Util::DEBUG);
|
\OCP\Util::writeLog('user_ldap', 'Wiz: detected Port '. $p, \OCP\Util::DEBUG);
|
||||||
$this->result->addChange('ldap_port', $p);
|
$this->result->addChange('ldap_port', $p);
|
||||||
$this->result->addChange('ldap_tls', intval($t));
|
$this->result->addChange('ldap_tls', intval($t));
|
||||||
// $this->result->addSpecific('port', $p);
|
|
||||||
return $this->result;
|
return $this->result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,6 @@ namespace OCA\user_ldap\lib;
|
||||||
|
|
||||||
class WizardResult {
|
class WizardResult {
|
||||||
protected $changes = array();
|
protected $changes = array();
|
||||||
protected $specifics = array();
|
|
||||||
|
|
||||||
public function addChange($key, $value) {
|
public function addChange($key, $value) {
|
||||||
$this->changes[$key] = $value;
|
$this->changes[$key] = $value;
|
||||||
|
@ -35,16 +34,9 @@ class WizardResult {
|
||||||
return count($this->changes) > 0;
|
return count($this->changes) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addSpecific($key, $value) {
|
|
||||||
$this->specifics[$key] = $value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getResultArray() {
|
public function getResultArray() {
|
||||||
$result = array();
|
$result = array();
|
||||||
$result['changes'] = $this->changes;
|
$result['changes'] = $this->changes;
|
||||||
foreach($this->specifics as $key => $value) {
|
|
||||||
$result[$key] = $value;
|
|
||||||
}
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue