forked from Yetangitu/owncloud-apps
/
admin.php
36 lines (30 loc) · 1.24 KB
/
admin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/**
* ownCloud - Files_Opds app
*
* Copyright (c) 2014 Frank de Lange
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
namespace OCA\Files_Opds;
$l = new \OC_L10N('files_opds');
\OCP\Util::addScript('files_opds', 'admin');
\OCP\Util::addStyle('files_opds', 'settings');
$defaults = new \OC_Defaults();
$formats = array(
["epub" => Config::getPreview('OC\Preview\Epub') ? 1 : 0 ],
["pdf" => Config::getPreview('OC\Preview\PDF') ? 1 : 0],
["opendocument" => Config::getPreview('OC\Preview\OpenDocument') ? 1 : 0],
["msoffice" => Config::getPreview('OC\Preview\MSOfficeDoc') ? 1 : 0]
);
$tmpl = new \OCP\Template('files_opds', 'admin');
$tmpl->assign('feedSubtitle', Config::getApp('feed-subtitle', $l->t("%s OPDS catalog", $defaults->getName())));
$tmpl->assign('isbndbKey', Config::getApp('isbndb-key', ''));
$tmpl->assign('googleKey', Config::getApp('google-key', ''));
$tmpl->assign('previewFormats', $formats);
$tmpl->assign('cover-x', Config::getApp('cover-x', '200'));
$tmpl->assign('cover-y', Config::getApp('cover-y', '200'));
$tmpl->assign('thumb-x', Config::getApp('thumb-x', '36'));
$tmpl->assign('thumb-y', Config::getApp('thumb-y', '36'));
return $tmpl->fetchPage();