feat(*): refactor dynamic vs. static structure and distinctions; make additional elements dynamic
This commit is contained in:
parent
7a0b808f24
commit
13d17e2e51
128 changed files with 982 additions and 959 deletions
|
@ -1,26 +0,0 @@
|
|||
<?php
|
||||
|
||||
require __DIR__ . "/../../vendor/autoload.php";
|
||||
require __DIR__ . "/../../server/utils/init.php";
|
||||
|
||||
use App\Classes\GenreFetcher;
|
||||
|
||||
$requestUri = $_SERVER["REQUEST_URI"];
|
||||
$url = trim(parse_url($requestUri, PHP_URL_PATH), "/");
|
||||
|
||||
if (!preg_match('/^music\/genres\/[\w-]+$/', $url)) redirectTo404();
|
||||
|
||||
$fetcher = new GenreFetcher();
|
||||
$genre = $fetcher->fetch($url);
|
||||
|
||||
if (!$genre) redirectTo404();
|
||||
|
||||
$genre["globals"] = $fetcher->getGlobals();
|
||||
$page = $genre;
|
||||
$globals = $page["globals"];
|
||||
|
||||
extract(setupPageMetadata($page, $requestUri));
|
||||
header("Cache-Control: public, max-age=3600");
|
||||
header("Expires: " . gmdate("D, d M Y H:i:s", time() + 3600) . " GMT");
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue