mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 21:27:25 +02:00
Core controllers location, error controller
This commit is contained in:
40
e107_core/controllers/system/error.php
Normal file
40
e107_core/controllers/system/error.php
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class core_system_error_controller extends eController
|
||||||
|
{
|
||||||
|
function preAction()
|
||||||
|
{
|
||||||
|
e107::coreLan('error');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function actionNotfound()
|
||||||
|
{
|
||||||
|
$this->addTitle(LAN_ERROR_7);
|
||||||
|
//var_dump($this->getRequest()->getRouteHistory());
|
||||||
|
$errorText = "<img src='".e_IMAGE_ABS."generic/warning.png' alt='".LAN_ERROR_37."' /> ".LAN_ERROR_21.'<br />'.LAN_ERROR_9."<br /><br />";
|
||||||
|
if (strlen($errFrom)) $errorText .= LAN_ERROR_23." <a href='{$errFrom}' rel='external'>{$errFrom}</a> ".LAN_ERROR_24." -- ".LAN_ERROR_19."<br /><br />";
|
||||||
|
|
||||||
|
|
||||||
|
$errorText .= "<h3>".LAN_ERROR_45."</h3>";
|
||||||
|
if($errReturnTo)
|
||||||
|
{
|
||||||
|
foreach ($errReturnTo as $url => $label)
|
||||||
|
{
|
||||||
|
$errorText .= "<a href='{$url}'>".$label."</a><br />";
|
||||||
|
}
|
||||||
|
$errorText .= '<br />';
|
||||||
|
}
|
||||||
|
$url = e107::getUrl();
|
||||||
|
|
||||||
|
$errorText .= "<a href='".SITEURL."'>".LAN_ERROR_20."</a><br />";
|
||||||
|
$errorText .= "<a href='".$url->create('search')."'>".LAN_ERROR_22."</a>";
|
||||||
|
|
||||||
|
$this->addBody($errorText);
|
||||||
|
}
|
||||||
|
|
||||||
|
function actionHelloWorld()
|
||||||
|
{
|
||||||
|
$this->addTitle('Hello!');
|
||||||
|
echo 'Hello World';
|
||||||
|
}
|
||||||
|
}
|
13
e107_core/controllers/system/index.php
Normal file
13
e107_core/controllers/system/index.php
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class core_system_index_controller extends eController
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Temporary redirect to site Index
|
||||||
|
* XXX - move the index.php Front page detection to index/index/index, make index.php the entry point and _forward here
|
||||||
|
*/
|
||||||
|
public function actionIndex()
|
||||||
|
{
|
||||||
|
$this->_redirect('/', false, 301);
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user