diff --git a/application/classes/cache.php b/application/classes/cache.php new file mode 100644 index 00000000..09c92e3e --- /dev/null +++ b/application/classes/cache.php @@ -0,0 +1,5 @@ + diff --git a/application/classes/lnapp/controller/templatedefault.php b/application/classes/lnapp/controller/templatedefault.php index 149fa50e..94717310 100644 --- a/application/classes/lnapp/controller/templatedefault.php +++ b/application/classes/lnapp/controller/templatedefault.php @@ -82,9 +82,8 @@ abstract class lnApp_Controller_TemplateDefault extends Controller_Template { return; } - $TEST = FALSE; // Actions that start with ajax, should only be ajax - if (preg_match('/^ajax/',Request::current()->action()) AND ! Request::current()->is_ajax() AND ! $TEST) + if (! Kohana::Config('debug.ajax') AND preg_match('/^ajax/',Request::current()->action()) AND ! Request::current()->is_ajax()) die(); parent::before(); diff --git a/application/config/debug.php b/application/config/debug.php new file mode 100644 index 00000000..70848b77 --- /dev/null +++ b/application/config/debug.php @@ -0,0 +1,18 @@ +FALSE, // AJAX actions can only be run by ajax calls if set to FALSE +); +?>