Config for ajax debug and apc cache usage
This commit is contained in:
parent
002c3b8f44
commit
c4e760fa21
5
application/classes/cache.php
Normal file
5
application/classes/cache.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
class Cache extends Kohana_Cache {
|
||||
public static $default = 'apc';
|
||||
}
|
||||
?>
|
@ -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();
|
||||
|
18
application/config/debug.php
Normal file
18
application/config/debug.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* OSB Configuration - Debug Settings
|
||||
*
|
||||
* @package OSB
|
||||
* @subpackage Debug
|
||||
* @category Configuration
|
||||
* @author Deon George
|
||||
* @copyright (c) 2010 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
|
||||
return array
|
||||
(
|
||||
'ajax'=>FALSE, // AJAX actions can only be run by ajax calls if set to FALSE
|
||||
);
|
||||
?>
|
Reference in New Issue
Block a user