Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: KSP-SpaceDock/OpenDock
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a971b1339f2f
Choose a base ref
...
head repository: KSP-SpaceDock/OpenDock
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 77b61b5140d4
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Feb 16, 2018

  1. Verified

    This commit was signed with the committer’s verified signature.
    StollD Dorian Stoll
    Copy the full SHA
    999fdce View commit details
  2. Slim v3 404 Handler

    StollD committed Feb 16, 2018

    Verified

    This commit was signed with the committer’s verified signature.
    StollD Dorian Stoll
    Copy the full SHA
    77b61b5 View commit details
Showing with 11 additions and 4 deletions.
  1. +7 −0 index.php
  2. +0 −4 src/anonymus.php
  3. +4 −0 templates/layout.html
7 changes: 7 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -43,6 +43,13 @@
return $view;
};

//Override the default Not Found Handler
$container['notFoundHandler'] = function ($container) {
return function ($request, $response) {
return $response->withStatus(301)->withHeader("Location", $request->getUri()->getBasePath() . "/not-found");
};
};

// Routes here.
require 'src/anonymus.php';
require 'src/browse.php';
4 changes: 0 additions & 4 deletions src/anonymus.php
Original file line number Diff line number Diff line change
@@ -36,8 +36,4 @@
return $this->view->render($response, 'templates/not_found.html');
})->setName('not-found');

$app->notFound(function () use ($app) {
$app->redirect('/not-found', 302);
});

?>
4 changes: 4 additions & 0 deletions templates/layout.html
Original file line number Diff line number Diff line change
@@ -39,7 +39,11 @@
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
{% if (backend_url starts with 'https://') or (backend_url starts with 'http://') %}
var backend = "{{ backend_url }}";
{% else %}
var backend = "//{{ backend_url }}";
{% endif %}
var gameshort = "{{ gameshort }}";
</script>
</head>