1
0
Fork 0
mirror of https://github.com/Yetangitu/owncloud-apps.git synced 2025-10-02 14:49:17 +02:00

Fix deprecated calls

This commit is contained in:
e-alfred 2018-09-27 14:27:07 +02:00 committed by GitHub
parent 457c1603fa
commit 64dad69198
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,9 +38,9 @@ class Hooks {
// TODO: rmeove this when Owncloud starts encoding oc_appconfig as JSON just like it already encodes most other properties
$isJson = self::isJson($settings['array']['oc_appconfig']);
$array = ($isJson) ? json_decode($settings['array']['oc_appconfig'], true) : $settings['array']['oc_appconfig'];
$array['filesReader']['enableEpub'] = Config::get('epub_enable', 'true');
$array['filesReader']['enablePdf'] = Config::get('pdf_enable', 'true');
$array['filesReader']['enableCbx'] = Config::get('cbx_enable', 'true');
$array['filesReader']['enableEpub'] = \OC::$server->getConfig()->getAppValue('epub_enable', 'true');
$array['filesReader']['enablePdf'] = \OC::$server->getConfig()->getAppValue('pdf_enable', 'true');
$array['filesReader']['enableCbx'] = \OC::$server->getConfig()->getAppValue('cbx_enable', 'true');
$settings['array']['oc_appconfig'] = ($isJson) ? json_encode($array) : $array;
}