1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Core controllers location, error controller

This commit is contained in:
secretr
2011-11-25 17:45:35 +00:00
parent a8cf6fbeac
commit 8ba02484a4
2 changed files with 53 additions and 0 deletions

View 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';
}
}

View 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);
}
}