This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/application/classes/kohana.php

37 lines
1010 B
PHP
Raw Normal View History

2011-12-29 23:54:54 +00:00
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class overrides Kohana's Core
*
* @package OSB/Modifications
* @category Classes
* @category Helpers
* @author Deon George
* @copyright (c) 2010 Deon George
* @license http://dev.leenooks.net/license.html
*/
class Kohana extends Kohana_Core {
/**
* Override Kohana's shutdown_handler()
*
* When set up for multi-site, we need to disable Kohana's caching
* unless each site has exactly the same modules enabled.
* This is because Kohana::$file is cached with the enabled modules
* and is not OSB multi-site aware.
2012-08-01 12:43:33 +00:00
*
2011-12-29 23:54:54 +00:00
* @todo It might be nice to cache the Kohana::$file site-aware for improved performance
*/
public static function shutdown_handler() {
// If caching isnt enabled, we can skip this anyway
if (! Kohana::$caching)
return parent::shutdown_handler();;
Kohana::$caching = FALSE;
$result = parent::shutdown_handler();
Kohana::$caching = TRUE;
return $result;
}
}
?>