This commit is contained in:
John Alanbrook 2022-11-07 19:01:35 +00:00
parent f6cac96113
commit 962ed1842c

View file

@ -11,6 +11,9 @@ if (page_locked($tryuri)) {
if (file_exists("site.json")) {
$site = json_decode(file_get_contents("site.json"), true);
} else {
echo "Need a site.json file to work!";
return false;
}
if (preg_match('/\.(?:jpg|png|css|ico|scss|js|ttf|woff|txt)/', $_SERVER["REQUEST_URI"])) {
@ -118,11 +121,8 @@ if (!empty($parsef)) {
$parse = $pd->text(file_get_contents($parsef));
}
$page['title'] = $obj->title;
$page['desc'] = $obj->desc;
if (empty($page['title'])) $page['title'] = $site['title'];
if (empty($page['desc'])) $page['desc'] = $site['desc'];
$page['title'] = $obj->title ?? $site['title'];
$page['desc'] = $obj->desc ?? $site['desc'];
include "base.php";