summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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 ));
+ }
+
}