From 31759cb3b3090c1b9d68ac54f2d2622584003563 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 15 Dec 2008 08:37:09 +0000 Subject: Delete trunk/kohana and trunk/modules/unit_test in preparation to refresh them properly from the vendor branch. --- kohana/helpers/expires.php | 110 --------------------------------------------- 1 file changed, 110 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 72bfd79b..00000000 --- a/kohana/helpers/expires.php +++ /dev/null @@ -1,110 +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 (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