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

Fix depre4cated OCP\JSON

This commit is contained in:
e-alfred 2018-09-27 14:59:12 +02:00 committed by GitHub
parent 08477e28be
commit cf484a2ab4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,8 +12,8 @@
namespace OCA\Files_Reader;
\OCP\JSON::callCheck();
\OCP\JSON::checkLoggedIn();
\OC_JSON::callCheck();
\OC_JSON::checkLoggedIn();
$l = \OC::$server->getL10N('files_reader');
@ -21,11 +21,11 @@ $EpubEnable = isset($_POST['EpubEnable']) ? $_POST['EpubEnable'] : 'false';
$PdfEnable = isset($_POST['PdfEnable']) ? $_POST['PdfEnable'] : 'false';
$CbxEnable = isset($_POST['CbxEnable']) ? $_POST['CbxEnable'] : 'false';
\OC::$server->getConfig()->setAppValue('epub_enable', $EpubEnable);
\OC::$server->getConfig()->setAppValue('pdf_enable', $PdfEnable);
\OC::$server->getConfig()->setAppValue('cbx_enable', $CbxEnable);
\OC::$server->getAppConfig()->setValue('files_reader', 'epub_enable', $EpubEnable);
\OC::$server->getAppConfig()->setValue('files_reader', 'pdf_enable', $PdfEnable);
\OC::$server->getAppConfig()->setValue('files_reader', 'cbx_enable', $CbxEnable);
\OCP\JSON::success(
\OC_JSON::success(
array(
'data' => array('message'=> $l->t('Settings updated successfully.'))
)