1
0

Added ProjectLawful-ebook downloads (blog::29)
All checks were successful
Build Docker and Deploy / Build Docker (push) Successful in 1m18s
Build Docker and Deploy / Deploy to Server (push) Successful in 27s

This commit is contained in:
2023-09-11 19:59:07 +02:00
parent f7688a224b
commit 300992b49f
49 changed files with 689 additions and 84 deletions

View File

@@ -0,0 +1,18 @@
<?php
require_once (__DIR__ . '/../internals/website.php');
/** @var PageFrameOptions $FRAME_OPTIONS */ global $FRAME_OPTIONS;
/** @var URLRoute $ROUTE */ global $ROUTE;
/** @var Website $SITE */ global $SITE;
$variant = $ROUTE->parameter['variant'];
if (!$SITE->modules->ProjectLawful()->variantExists($variant))
{
$FRAME_OPTIONS->setForced404('epub file not found');
return;
}
$SITE->modules->ProjectLawful()->insertDownload($variant);
$FRAME_OPTIONS->setForcedRedirect('/data/projectlawful/project-lawful-' . $variant . '.epub');