Skip to content
Snippets Groups Projects
Commit b01c59b2 authored by Morris Jobke's avatar Morris Jobke
Browse files

use old methods and redirect in deprecated methods

parent d6da627e
No related branches found
No related tags found
No related merge requests found
...@@ -106,7 +106,7 @@ class AllConfig implements \OCP\IConfig { ...@@ -106,7 +106,7 @@ class AllConfig implements \OCP\IConfig {
* @param string $value the value that you want to store * @param string $value the value that you want to store
*/ */
public function setUserValue($userId, $appName, $key, $value) { public function setUserValue($userId, $appName, $key, $value) {
\OCP\Config::setUserValue($userId, $appName, $key, $value); \OC_Preferences::setValue($userId, $appName, $key, $value);
} }
/** /**
...@@ -119,7 +119,7 @@ class AllConfig implements \OCP\IConfig { ...@@ -119,7 +119,7 @@ class AllConfig implements \OCP\IConfig {
* @return string * @return string
*/ */
public function getUserValue($userId, $appName, $key, $default = '') { public function getUserValue($userId, $appName, $key, $default = '') {
return \OCP\Config::getUserValue($userId, $appName, $key, $default); return \OC_Preferences::getValue($userId, $appName, $key, $default);
} }
/** /**
......
...@@ -131,7 +131,7 @@ class Config { ...@@ -131,7 +131,7 @@ class Config {
* not exist the default value will be returned * not exist the default value will be returned
*/ */
public static function getUserValue( $user, $app, $key, $default = null ) { public static function getUserValue( $user, $app, $key, $default = null ) {
return \OC_Preferences::getValue( $user, $app, $key, $default ); return \OC::$server->getConfig()->getUserValue( $user, $app, $key, $default );
} }
/** /**
...@@ -148,7 +148,7 @@ class Config { ...@@ -148,7 +148,7 @@ class Config {
*/ */
public static function setUserValue( $user, $app, $key, $value ) { public static function setUserValue( $user, $app, $key, $value ) {
try { try {
\OC_Preferences::setValue( $user, $app, $key, $value ); \OC::$server->getConfig()->setUserValue( $user, $app, $key, $value );
} catch (\Exception $e) { } catch (\Exception $e) {
return false; return false;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment