From 12fe58d997d2066dc362fd393a18b4e5da190513 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 27 May 2009 15:11:53 -0700 Subject: Rename 'kohana' to 'system' to conform to the Kohana filesystem layout. I'm comfortable with us not clearly drawing the distinction about the fact that it's Kohana. --- kohana/helpers/expires.php | 111 --------------------------------------------- 1 file changed, 111 deletions(-) delete mode 100644 kohana/helpers/expires.php (limited to 'kohana/helpers/expires.php') diff --git a/kohana/helpers/expires.php b/kohana/helpers/expires.php deleted file mode 100644 index c43cc0cc..00000000 --- a/kohana/helpers/expires.php +++ /dev/null @@ -1,111 +0,0 @@ - 0) - { - // Re-send headers - header('Last-Modified: '.gmdate('D, d M Y H:i:s T', $mod_time)); - header('Expires: '.gmdate('D, d M Y H:i:s T', time() + $mod_time_diff)); - header('Cache-Control: max-age='.$mod_time_diff); - header('Status: 304 Not Modified', TRUE, 304); - - // Prevent any output - Event::add('system.display', array('expires', 'prevent_output')); - - // Exit to prevent other output - exit; - } - } - - return FALSE; - } - - /** - * Check headers already created to not step on download or Img_lib's feet - * - * @return boolean - */ - public static function check_headers() - { - foreach (headers_list() as $header) - { - if ((session_cache_limiter() == '' AND stripos($header, 'Last-Modified:') === 0) - OR stripos($header, 'Expires:') === 0) - { - return FALSE; - } - } - - return TRUE; - } - - /** - * Prevent any output from being displayed. Executed during system.display. - * - * @return void - */ - public static function prevent_output() - { - Kohana::$output = ''; - } - -} // End expires \ No newline at end of file -- cgit v1.2.3