Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/config/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function (RouteBuilder $builder) {
);

/**
* Registry allows URLs of the form /coid/name to render as a Mostly Static Page.
* Registry allows URLs of the form /coid/pages/name to render as a Mostly Static Page.
*
* Note this will effectively route any URL of the form /registry/x, where x consists of
* digits, to the Pages controller. We need to filter on digits, or we'll end up taking
Expand Down
4 changes: 4 additions & 0 deletions app/src/Controller/PagesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ public function deliver(string $coid, string $name) {
// with PrimaryLink lookups. We render here rather than redirecting into the MSRController to
// reduce URL bar thrashing.

$coId = (int)$coid;

// MSRs are only enabled if file uploads are enabled
$CoSettings = TableRegistry::getTableLocator()->get("CoSettings");

Expand Down Expand Up @@ -176,6 +178,8 @@ public function show(string $coid, string $name) {
// redefining it. We render here rather than redirecting into the MSPController to
// reduce URL bar thrashing.

$coId = (int)$coid;

$MSPTable = TableRegistry::getTableLocator()->get("MostlyStaticPages");

$msp = $MSPTable->find()
Expand Down