announce_settings must be static
This commit is contained in:
parent
6579ae7625
commit
2fe42cb178
@ -18,7 +18,7 @@ use OCP\Server;
|
|||||||
|
|
||||||
class Hooks {
|
class Hooks {
|
||||||
|
|
||||||
public function announce_settings(array $settings): void {
|
public static function announce_settings(array $settings): void {
|
||||||
// Nextcloud encodes this as JSON, Owncloud does not (yet) (#75)
|
// Nextcloud encodes this as JSON, Owncloud does not (yet) (#75)
|
||||||
// TODO: remove this when Owncloud starts encoding oc_appconfig as JSON just like it already encodes most other properties
|
// TODO: remove this when Owncloud starts encoding oc_appconfig as JSON just like it already encodes most other properties
|
||||||
$user = Server::get(IUserSession::class)->getUser();
|
$user = Server::get(IUserSession::class)->getUser();
|
||||||
@ -59,7 +59,7 @@ class Hooks {
|
|||||||
$queryBuilder->executeStatement();
|
$queryBuilder->executeStatement();
|
||||||
}
|
}
|
||||||
|
|
||||||
private function isJson(mixed $string): bool {
|
private static function isJson(mixed $string): bool {
|
||||||
return is_string($string) && is_array(json_decode($string, true)) && (json_last_error() == JSON_ERROR_NONE) ? true : false;
|
return is_string($string) && is_array(json_decode($string, true)) && (json_last_error() == JSON_ERROR_NONE) ? true : false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user