From ff66600bc060dd2713b88b4af88e5a0a291710e0 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Wed, 2 May 2012 14:11:29 +0200 Subject: port appconfig --- lib/public/config.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'lib/public') 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 )); + } + } -- cgit v1.2.3