Merge pull request #37 from voyageur/nc22
Fix deprecated OCP\User (thanks @voyageur)
This commit is contained in:
commit
132433fc1b
@ -46,6 +46,6 @@ See [README] for more exhaustive information on features and potential misfeatur
|
|||||||
<screenshot>https://github.com/e-alfred/epubreader/blob/master/screenshots/photo_2017-03-15_17-22-00.jpg?raw=true</screenshot>
|
<screenshot>https://github.com/e-alfred/epubreader/blob/master/screenshots/photo_2017-03-15_17-22-00.jpg?raw=true</screenshot>
|
||||||
<screenshot>https://github.com/e-alfred/epubreader/blob/master/screenshots/photo_2017-03-15_17-22-02.jpg?raw=true</screenshot>
|
<screenshot>https://github.com/e-alfred/epubreader/blob/master/screenshots/photo_2017-03-15_17-22-02.jpg?raw=true</screenshot>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<nextcloud min-version="17" max-version="21"/>
|
<nextcloud min-version="17" max-version="22"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</info>
|
</info>
|
||||||
|
@ -25,7 +25,7 @@ class Config
|
|||||||
* @return string retrieved value or default
|
* @return string retrieved value or default
|
||||||
*/
|
*/
|
||||||
public static function get($key, $default) {
|
public static function get($key, $default) {
|
||||||
return \OC::$server->getConfig()->getUserValue(\OCP\User::getUser(), 'epubreader', $key, $default);
|
return \OC::$server->getConfig()->getUserValue(\OC_User::getUser(), 'epubreader', $key, $default);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -36,7 +36,7 @@ class Config
|
|||||||
* @return bool success
|
* @return bool success
|
||||||
*/
|
*/
|
||||||
public static function set($key, $value) {
|
public static function set($key, $value) {
|
||||||
return \OC::$server->getConfig()->setUserValue(\OCP\User::getUser(), 'epubreader', $key, $value);
|
return \OC::$server->getConfig()->setUserValue(\OC_User::getUser(), 'epubreader', $key, $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user