rename handle_404 to four_oh_four - stop confusing it with file handlers
This commit is contained in:
parent
174b87d0c4
commit
9dcc8b7da1
3 changed files with 6 additions and 6 deletions
|
@ -1,8 +1,8 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
class Handle404Info extends ExtensionInfo
|
||||
class FourOhFourInfo extends ExtensionInfo
|
||||
{
|
||||
public const KEY = "handle_404";
|
||||
public const KEY = "four_oh_four";
|
||||
|
||||
public $key = self::KEY;
|
||||
public $name = "404 Detector";
|
|
@ -1,7 +1,6 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
|
||||
class Handle404 extends Extension
|
||||
class FourOhFour extends Extension
|
||||
{
|
||||
public function onPageRequest(PageRequestEvent $event)
|
||||
{
|
||||
|
@ -9,7 +8,7 @@ class Handle404 extends Extension
|
|||
// hax.
|
||||
if ($page->mode == PageMode::PAGE && (!isset($page->blocks) || $this->count_main($page->blocks) == 0)) {
|
||||
$h_pagename = html_escape(implode('/', $event->args));
|
||||
log_debug("handle_404", "Hit 404: $h_pagename");
|
||||
log_debug("four_oh_four", "Hit 404: $h_pagename");
|
||||
$page->set_code(404);
|
||||
$page->set_title("404");
|
||||
$page->set_heading("404 - No Handler Found");
|
|
@ -1,5 +1,6 @@
|
|||
<?php declare(strict_types=1);
|
||||
class Handle404Test extends ShimmiePHPUnitTestCase
|
||||
|
||||
class FourOhFourTest extends ShimmiePHPUnitTestCase
|
||||
{
|
||||
public function test404Handler()
|
||||
{
|
Reference in a new issue