Browse Source

Display a regular 404 error when a project does not exist

develop
Sven Slootweg 8 years ago
parent
commit
8854947866
  1. 2
      public_html/authenticators/project.php
  2. 17
      public_html/modules/error/project.php
  3. 2
      public_html/rewrite.php
  4. 3
      public_html/templates/error/project.tpl

2
public_html/authenticators/project.php

@ -24,5 +24,5 @@ try
}
catch (NotFoundException $e)
{
$sRouterAuthenticated = false;
throw new RouterException("Project does not exist");
}

17
public_html/modules/error/project.php

@ -1,17 +0,0 @@
<?php
/*
* Cryto Team is more free software. It is licensed under the WTFPL, which
* allows you to do pretty much anything with it, without having to
* ask permission. Commercial use is allowed, and no attribution is
* required. We do politely request that you share your modifications
* to benefit other developers, but you are under no enforced
* obligation to do so :)
*
* Please read the accompanying LICENSE document for the full WTFPL
* licensing text.
*/
if(!isset($_APP)) { die("Unauthorized."); }
$sPageContents = NewTemplater::Render("error/project", $locale->strings, array());
$router->uVariables['page_type'] = "";

2
public_html/rewrite.php

@ -39,7 +39,7 @@ $presets = array(
"project" => array(
"_page_type" => "project",
"authenticator" => "authenticators/project.php",
"auth_error" => "modules/error/project.php"
"auth_error" => ""
)
);

3
public_html/templates/error/project.tpl

@ -1,3 +0,0 @@
<section>
The project you are looking for does not appear to exist.
</section>
Loading…
Cancel
Save