Config for ajax debug and apc cache usage

This commit is contained in:
Deon George
2012-11-02 16:28:23 +11:00
parent 002c3b8f44
commit c4e760fa21
3 changed files with 24 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
<?php
class Cache extends Kohana_Cache {
public static $default = 'apc';
}
?>

View File

@@ -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();