cleaned project, repaired router
This commit is contained in:
parent
2156d3f5c6
commit
bffe0f1660
16 changed files with 1172 additions and 1440 deletions
21
library/Katharsis/Controller/Plugin/AutoScriptControl.php
Normal file
21
library/Katharsis/Controller/Plugin/AutoScriptControl.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
class Katharsis_Controller_Plugin_AutoScriptControl extends Katharsis_Controller_Plugin_Abstract
|
||||
{
|
||||
public function preController()
|
||||
{
|
||||
$view = Katharsis_View::getInstance();
|
||||
|
||||
$view->autoScriptFile = false;
|
||||
|
||||
|
||||
|
||||
$scriptName = ucfirst(Katharsis_Request::getControllerName()) . '/' . strtolower(Katharsis_Request::getActionName());
|
||||
$autoScriptFile = 'scripts/DidgeridooArtwork/' . $scriptName . '.js';
|
||||
$sl = DIRECTORY_SEPARATOR;
|
||||
|
||||
if(file_exists(getcwd() . $sl . str_replace('/', $sl, $autoScriptFile)))
|
||||
{
|
||||
$view->autoScriptFile = $view->base . '/' . $autoScriptFile;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue