summaryrefslogtreecommitdiffstats
path: root/lib/private/appconfig.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-06-03 12:40:23 +0200
committerRobin Appelman <icewind@owncloud.com>2014-06-03 12:40:23 +0200
commit6ed319486387e6b7a80c64409527c7d454d3509d (patch)
tree800feec6eb3fa1204c44460f55d3b56e5f3decd0 /lib/private/appconfig.php
parentbff9e11ff996a623a61fe2c86a37d3a2d83e61bb (diff)
downloadnextcloud-server-6ed319486387e6b7a80c64409527c7d454d3509d.tar.gz
nextcloud-server-6ed319486387e6b7a80c64409527c7d454d3509d.zip
Use a map to prevent having to use search
Diffstat (limited to 'lib/private/appconfig.php')
-rw-r--r--lib/private/appconfig.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/private/appconfig.php b/lib/private/appconfig.php
index cfb2addc4c3..f20c4a08426 100644
--- a/lib/private/appconfig.php
+++ b/lib/private/appconfig.php
@@ -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]);
}
/**