Readied error pages for variable themes.

Fixed error in parsing pseudocode.
This commit is contained in:
2018-06-21 13:25:38 +02:00
committed by Stefan Rohde-Enslin
parent b340c7efff
commit 4e06d0bae7
18 changed files with 84 additions and 81 deletions

View File

@@ -12,7 +12,7 @@ require_once __DIR__ . "/inc/functions.php";
// Check validity of request.
if (!isset($_GET['id']) or !is_numeric($_GET['id'])) {
echo printErrorPage("Object does not exist.");
echo printErrorPage($settings, "Object does not exist.");
return;
}
@@ -24,12 +24,12 @@ $pages = loadPublicPages(); // Load overview of pages.
$contents = json_decode(queryCachePage($settings['mdVersion'] . "?t=objekt&oges=" . urlencode($_GET['id']) . "&output=json", "object", $settings), true);
if (!$contents || (isset($contents[0]) and $contents[0] == "There is no object with this ID yet.")) {
echo printErrorPage("Temporarily unavailable.");
echo printErrorPage($settings, "Temporarily unavailable.");
return;
}
if ($settings['limitToInstitutions'] != [] and !in_array($contents['object_institution']['institution_id'], $settings['limitToInstitutions'])) {
echo printErrorPage("This object does not belong to an enabled institution.");
echo printErrorPage($settings, "This object does not belong to an enabled institution.");
return;
}