Skip to content
Snippets Groups Projects
Commit 6ed31948 authored by Robin Appelman's avatar Robin Appelman
Browse files

Use a map to prevent having to use search

parent bff9e11f
No related branches found
No related tags found
No related merge requests found
......@@ -196,7 +196,7 @@ class AppConfig implements \OCP\IAppConfig {
$this->cache[$app] = array();
}
if (is_array($this->apps) and array_search($app, $this->apps) === false) {
$this->apps[] = $app;
$this->apps[$app] = $app;
}
$this->cache[$app][$key] = $value;
}
......@@ -233,9 +233,7 @@ class AppConfig implements \OCP\IAppConfig {
);
$this->conn->delete('*PREFIX*appconfig', $where);
unset($this->cache[$app]);
if (is_array($this->apps) and $i = array_search($app, $this->apps) !== false) {
unset($this->apps[$i]);
}
unset($this->apps[$app]);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment