summaryrefslogtreecommitdiffstats
path: root/lib/private/appconfig.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-02-07 13:42:18 +0100
committerRobin Appelman <icewind@owncloud.com>2014-02-07 13:45:59 +0100
commitb537d90e58913be203fd96f31b624559be00abeb (patch)
tree9af6c432b3b503303f1315f82f602844664f837d /lib/private/appconfig.php
parentb35b22977cfc9412278ae70b49c402a95efca19e (diff)
parentb9e724d4ae7635435b3cc7793237c3ab9fe2a1c0 (diff)
downloadnextcloud-server-b537d90e58913be203fd96f31b624559be00abeb.tar.gz
nextcloud-server-b537d90e58913be203fd96f31b624559be00abeb.zip
use the 'new' server container for appconfig
Diffstat (limited to 'lib/private/appconfig.php')
-rw-r--r--lib/private/appconfig.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/private/appconfig.php b/lib/private/appconfig.php
index 7c84faf7f16..ff47f08d485 100644
--- a/lib/private/appconfig.php
+++ b/lib/private/appconfig.php
@@ -41,7 +41,7 @@ use \OC\DB\Connection;
* This class provides an easy way for apps to store config values in the
* database.
*/
-class AppConfig {
+class AppConfig implements \OCP\IAppConfig {
/**
* @var \OC\DB\Connection $conn
*/
@@ -104,7 +104,7 @@ class AppConfig {
*/
public function getValue($app, $key, $default = null) {
$query = 'SELECT `configvalue` FROM `*PREFIX*appconfig`'
- .' WHERE `appid` = ? AND `configkey` = ?';
+ . ' WHERE `appid` = ? AND `configkey` = ?';
$row = $this->conn->fetchAssoc($query, array($app, $key));
if ($row) {
return $row['configvalue'];
@@ -185,6 +185,7 @@ class AppConfig {
/**
* get multiply values, either the app or key can be used as wildcard by setting it to false
+ *
* @param app
* @param key
* @return array
@@ -208,8 +209,8 @@ class AppConfig {
$params[] = $key;
$key = 'appid';
}
- $query = 'SELECT '.$fields.' FROM `*PREFIX*appconfig` '.$where;
- $result = $this->conn->executeQuery( $query, $params );
+ $query = 'SELECT ' . $fields . ' FROM `*PREFIX*appconfig` ' . $where;
+ $result = $this->conn->executeQuery($query, $params);
$values = array();
while ($row = $result->fetch((\PDO::FETCH_ASSOC))) {
@@ -218,4 +219,4 @@ class AppConfig {
return $values;
}
-} \ No newline at end of file
+}