Readied error pages for variable themes.
Fixed error in parsing pseudocode.
This commit is contained in:
@ -13,7 +13,7 @@ require_once __DIR__ . "/inc/functions.php";
|
||||
// Check validity of request.
|
||||
|
||||
if (!isset($_GET['id']) or !is_numeric($_GET['id'])) {
|
||||
echo printErrorPage("Exhibition does not exist.");
|
||||
echo printErrorPage($settings, "Exhibition does not exist.");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -25,12 +25,12 @@ $pages = loadPublicPages(); // Load overview of pages.
|
||||
$contents = json_decode(queryCachePage($settings['mdVersion'] . "?t=exhibition&id=" . urlencode($_GET['id']) . "&output=json", "exhibition", $settings), true);
|
||||
|
||||
if (!$contents || (isset($contents[0]) and $contents[0] == "There is no exhibition with this ID yet.")) {
|
||||
echo printErrorPage("Temporarily unavailable.");
|
||||
echo printErrorPage($settings, "Temporarily unavailable.");
|
||||
return;
|
||||
}
|
||||
|
||||
if ($settings['limitToInstitutions'] != [] and !in_array($contents['institution_id'], $settings['limitToInstitutions'])) {
|
||||
echo printErrorPage("This exhibition does not belong to an enabled institution.");
|
||||
echo printErrorPage($settings, "This exhibition does not belong to an enabled institution.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user