Refacto all project #1
@ -65,8 +65,6 @@ class PageController extends Controller {
|
||||
/**
|
||||
* @PublicPage
|
||||
* @NoCSRFRequired
|
||||
*
|
||||
* @return TemplateResponse
|
||||
*/
|
||||
public function showReader(): TemplateResponse {
|
||||
$templates = [
|
||||
@ -124,8 +122,8 @@ class PageController extends Controller {
|
||||
* (this should be abstracted away in OC/NC IMnsHO)
|
||||
*
|
||||
* @param string $path path-fragment from url
|
||||
* @return array
|
||||
* @throws NotFoundException
|
||||
*
|
||||
* @throws NotFoundException|InvalidPathException
|
||||
*/
|
||||
private function getFileInfo(string $path): array {
|
||||
$count = 0;
|
||||
|
@ -55,9 +55,9 @@ class Hooks {
|
||||
/** @var array $array */
|
||||
$array = ($isJson) ? json_decode((string) $settings['array']['oc_appconfig'], true) : $settings['array']['oc_appconfig'];
|
||||
$array['filesReader'] = [
|
||||
'enableEpub' => Server::get(IConfig::class)->getUserValue($user->getUID(), Application::APP_ID, 'epub_enable', 'true'),
|
||||
'enablePdf' => Server::get(IConfig::class)->getUserValue($user->getUID(), Application::APP_ID, 'pdf_enable', 'true'),
|
||||
'enableCbx' => Server::get(IConfig::class)->getUserValue($user->getUID(), Application::APP_ID, 'cbx_enable', 'true'),
|
||||
'enableEpub' => Server::get(IConfig::class)->getUserValue($user->getUID(), Application::APP_ID, 'epub_enable', true),
|
||||
'enablePdf' => Server::get(IConfig::class)->getUserValue($user->getUID(), Application::APP_ID, 'pdf_enable', true),
|
||||
'enableCbx' => Server::get(IConfig::class)->getUserValue($user->getUID(), Application::APP_ID, 'cbx_enable', true),
|
||||
];
|
||||
$settings['array']['oc_appconfig'] = ($isJson) ? json_encode($array) : $array;
|
||||
}
|
||||
|
@ -35,9 +35,9 @@ class Personal implements ISettings {
|
||||
*/
|
||||
public function getForm(): TemplateResponse {
|
||||
$parameters = [
|
||||
'EpubEnable' => $this->configManager->getUserValue($this->userId, Application::APP_ID, 'epub_enable'),
|
||||
'PdfEnable' => $this->configManager->getUserValue($this->userId, Application::APP_ID, 'pdf_enable'),
|
||||
'CbxEnable' => $this->configManager->getUserValue($this->userId, Application::APP_ID, 'cbx_enable'),
|
||||
'EpubEnable' => $this->configManager->getUserValue($this->userId, Application::APP_ID, 'epub_enable', 'true'),
|
||||
'PdfEnable' => $this->configManager->getUserValue($this->userId, Application::APP_ID, 'pdf_enable', 'true'),
|
||||
'CbxEnable' => $this->configManager->getUserValue($this->userId, Application::APP_ID, 'cbx_enable', 'true'),
|
||||
];
|
||||
|
||||
return new TemplateResponse(Application::APP_ID, 'settings-personal', $parameters, '');
|
||||
|
Reference in New Issue
Block a user