Skip to content
Merged
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
6 changes: 3 additions & 3 deletions app/src/Controller/PagesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function deliver(string $coid, string $name) {
// We use PagesController rather than MostlyStaticResourcesController to avoid complexities
// with PrimaryLink lookups. We render here rather than redirecting into the MSRController to
// reduce URL bar thrashing.

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

Expand All @@ -86,7 +86,7 @@ public function deliver(string $coid, string $name) {
if(empty($msr)) {
$this->Flash->error(__d('error', 'notfound', $name));

return $this->redirect(StringUtilities::pagesUrl($coId, "error-landing"));
return $this->redirect(StringUtilities::pagesUrl($coid, "error-landing"));
}

$fileContent = stream_get_contents($msr->file_content);
Expand Down Expand Up @@ -194,7 +194,7 @@ public function show(string $coid, string $name) {
} else {
$this->Flash->error(__d('error', 'notfound', $name));

return $this->redirect(StringUtilities::pagesUrl($coId, "error-landing"));
return $this->redirect(StringUtilities::pagesUrl($coid, "error-landing"));
}
}

Expand Down