added index redirect plugin
This commit is contained in:
parent
0c80e23e72
commit
f6572151ec
3 changed files with 14 additions and 2 deletions
|
@ -27,8 +27,7 @@ class IndexController extends Katharsis_Controller_Abstract
|
|||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
$controller = new PageController();
|
||||
$controller->homeAction();
|
||||
// will be overwritten by IndexRedirect Plugin
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
12
library/Local/Controller/Plugin/IndexRedirect.php
Normal file
12
library/Local/Controller/Plugin/IndexRedirect.php
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
class Local_Controller_Plugin_IndexRedirect extends Katharsis_Controller_Plugin_Abstract
|
||||
{
|
||||
public function preController()
|
||||
{
|
||||
if(Katharsis_Request::getControllerName() == 'index' && Katharsis_Request::getActionName() == 'index')
|
||||
{
|
||||
Katharsis_Request::setControllerName('page');
|
||||
Katharsis_Request::setActionName('home');
|
||||
}
|
||||
}
|
||||
}
|
|
@ -16,6 +16,7 @@ Katharsis_Autoload::init();
|
|||
//Katharsis_Controller_Plugin::registerPlugin(new DidgeridooArtwork_Controller_Plugin_SetNames());
|
||||
Katharsis_Controller_Plugin::registerPlugin(new Katharsis_Controller_Plugin_StartSession());
|
||||
Katharsis_Controller_Plugin::registerPlugin(new DidgeridooArtwork_Controller_Plugin_Notice());
|
||||
Katharsis_Controller_Plugin::registerPlugin(new Local_Controller_Plugin_IndexRedirect());
|
||||
Katharsis_Controller_Plugin::registerPlugin(new Katharsis_Controller_Plugin_Autorender());
|
||||
|
||||
Katharsis_Controller_Plugin::registerPlugin(new DidgeridooArtwork_Controller_Plugin_Access());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue