mirror of
https://github.com/Yetangitu/owncloud-apps.git
synced 2025-10-02 14:49:17 +02:00
v0.4: title/subtitle configurable, templates split into parts, several fixes
This commit is contained in:
parent
62ef3b9d4d
commit
74f25cfe7c
17 changed files with 142 additions and 131 deletions
|
@ -14,6 +14,7 @@ namespace OCA\Files_Opds;
|
|||
|
||||
\OCP\JSON::callCheck();
|
||||
\OCP\JSON::checkLoggedIn();
|
||||
$defaults = new \OC_Defaults();
|
||||
|
||||
$l = new \OC_L10N('files_opds');
|
||||
|
||||
|
@ -23,11 +24,13 @@ if (isset($_POST['opdsCoverX'])) {
|
|||
$opdsCoverY = isset($_POST['opdsCoverY']) ? (int) $_POST['opdsCoverY'] : 200;
|
||||
$opdsThumbX = isset($_POST['opdsThumbX']) ? (int) $_POST['opdsThumbX'] : 36;
|
||||
$opdsThumbY = isset($_POST['opdsThumbY']) ? (int) $_POST['opdsThumbY'] : 36;
|
||||
$opdsFeedSubtitle = isset($_POST['opdsFeedSubtitle']) ? $_POST['opdsFeedSubtitle'] : $l->t("%s OPDS catalog", $defaults->getName());
|
||||
|
||||
Config::setApp('cover-x', $opdsCoverX);
|
||||
Config::setApp('cover-y', $opdsCoverY);
|
||||
Config::setApp('thumb-x', $opdsThumbX);
|
||||
Config::setApp('thumb-y', $opdsThumbX);
|
||||
Config::setApp('feed_subtitle', $opdsFeedSubtitle);
|
||||
} else {
|
||||
// set preview preferences
|
||||
$opdsPreviewEpub = $_POST['opdsPreviewEpub'];
|
||||
|
|
|
@ -20,6 +20,7 @@ $l = new \OC_L10N('files_opds');
|
|||
$opdsEnable = isset($_POST['opdsEnable']) ? $_POST['opdsEnable'] : 'false';
|
||||
$rootPath = isset($_POST['rootPath']) ? $_POST['rootPath'] : null;
|
||||
$fileTypes = isset($_POST['fileTypes']) ? $_POST['fileTypes'] : '';
|
||||
$feedTitle = isset($_POST['feedTitle']) ? $_POST['feedTitle'] : $l->t("%s's Library", \OCP\User::getDisplayName());
|
||||
|
||||
if (!is_null($rootPath)){
|
||||
if (\OC\Files\Filesystem::file_exists($rootPath) === false ){
|
||||
|
@ -38,6 +39,7 @@ if (!is_null($rootPath)){
|
|||
}
|
||||
Config::set('enable', $opdsEnable);
|
||||
Config::set('file_types', $fileTypes);
|
||||
Config::set('feed_title', $feedTitle);
|
||||
Config::set('id', Util::genUuid());
|
||||
exit();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue