Use a map to prevent having to use search
This commit is contained in:
parent
bff9e11ff9
commit
6ed3194863
|
@ -196,7 +196,7 @@ class AppConfig implements \OCP\IAppConfig {
|
||||||
$this->cache[$app] = array();
|
$this->cache[$app] = array();
|
||||||
}
|
}
|
||||||
if (is_array($this->apps) and array_search($app, $this->apps) === false) {
|
if (is_array($this->apps) and array_search($app, $this->apps) === false) {
|
||||||
$this->apps[] = $app;
|
$this->apps[$app] = $app;
|
||||||
}
|
}
|
||||||
$this->cache[$app][$key] = $value;
|
$this->cache[$app][$key] = $value;
|
||||||
}
|
}
|
||||||
|
@ -233,9 +233,7 @@ class AppConfig implements \OCP\IAppConfig {
|
||||||
);
|
);
|
||||||
$this->conn->delete('*PREFIX*appconfig', $where);
|
$this->conn->delete('*PREFIX*appconfig', $where);
|
||||||
unset($this->cache[$app]);
|
unset($this->cache[$app]);
|
||||||
if (is_array($this->apps) and $i = array_search($app, $this->apps) !== false) {
|
unset($this->apps[$app]);
|
||||||
unset($this->apps[$i]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue