1
0
Fork 0
mirror of https://github.com/Yetangitu/owncloud-apps.git synced 2025-10-02 14:49:17 +02:00
nextcloud-apps/files_reader/ajax/personal.php
frankdelange 6b0ab64fe4 - files_reader: v1.2.0, implemented night mode, scroll to top on page
change (#73), default viewer selection in personal preferences section (#74), fixed undefined $title in template (#72)
2018-01-31 12:15:38 +01:00

35 lines
797 B
PHP

<?php
/**
* ownCloud - Files_Reader App
*
* @author Frank de Lange
* @copyright 2014,2018 Frank de Lange
*
* This file is licensed under the Affero General Public License version 3 or
* later.
*/
namespace OCA\Files_Reader;
\OCP\JSON::callCheck();
\OCP\JSON::checkLoggedIn();
$l = \OC::$server->getL10N('files_reader');
$EpubEnable = isset($_POST['EpubEnable']) ? $_POST['EpubEnable'] : 'false';
$PdfEnable = isset($_POST['PdfEnable']) ? $_POST['PdfEnable'] : 'false';
$CbxEnable = isset($_POST['CbxEnable']) ? $_POST['CbxEnable'] : 'false';
Config::set('epub_enable', $EpubEnable);
Config::set('pdf_enable', $PdfEnable);
Config::set('cbx_enable', $CbxEnable);
\OCP\JSON::success(
array(
'data' => array('message'=> $l->t('Settings updated successfully.'))
)
);
exit();