summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-05-02 14:11:29 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-05-02 14:11:29 +0200
commitff66600bc060dd2713b88b4af88e5a0a291710e0 (patch)
treec1b796ddf938025ac1cc31d0f8414c55a31840aa /lib/public
parent8e99475886fa3fc23dd576cce7eaefd532c3fe5c (diff)
downloadnextcloud-server-ff66600bc060dd2713b88b4af88e5a0a291710e0.tar.gz
nextcloud-server-ff66600bc060dd2713b88b4af88e5a0a291710e0.zip
port appconfig
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/config.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/public/config.php b/lib/public/config.php
index de9d163624b..cbc7d916cf4 100644
--- a/lib/public/config.php
+++ b/lib/public/config.php
@@ -63,6 +63,34 @@ class Config {
}
+ /**
+ * @brief Gets the config value
+ * @param $app app
+ * @param $key key
+ * @param $default = null, default value if the key does not exist
+ * @returns the value or $default
+ *
+ * This function gets a value from the appconfig table. If the key does
+ * not exist the default value will be returnes
+ */
+ public static function getAppValue( $app, $key, $default = null ){
+ return(\OC_Appconfig::getValue( $app, $key, $default ));
+ }
+
+
+ /**
+ * @brief sets a value in the appconfig
+ * @param $app app
+ * @param $key key
+ * @param $value value
+ * @returns true/false
+ *
+ * Sets a value. If the key did not exist before it will be created.
+ */
+ public static function setAppValue( $app, $key, $value ){
+ return(\OC_Appconfig::setValue( $app, $key, $value ));
+ }
+
}