/[drupal]/contributions/modules/boost/boost.module
ViewVC logotype

Diff of /contributions/modules/boost/boost.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3.2.2.2.5.2.245, Wed Nov 11 07:21:14 2009 UTC revision 1.3.2.2.2.5.2.246, Wed Nov 11 08:14:03 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: boost.module,v 1.3.2.2.2.5.2.244 2009/11/10 21:50:32 mikeytown2 Exp $  // $Id: boost.module,v 1.3.2.2.2.5.2.245 2009/11/11 07:21:14 mikeytown2 Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 2071  function boost_cache_set($path, $data, $ Line 2071  function boost_cache_set($path, $data, $
2071    // Append the Boost footer with the relevant timestamps    // Append the Boost footer with the relevant timestamps
2072    switch ($extension) {    switch ($extension) {
2073      case BOOST_FILE_EXTENSION:      case BOOST_FILE_EXTENSION:
       $comment_start = '<!-- ';  
       $comment_end = " -->\n";  
2074        $expire = BOOST_CACHE_LIFETIME;        $expire = BOOST_CACHE_LIFETIME;
2075        $expires_at = date('Y-m-d H:i:s', BOOST_TIME + $expire);        if (variable_get('boost_apache_xheader', 0) < 2) {
2076        $comment = $comment_start . str_replace(array('%cached_at', '%expires_at'), array($cached_at, $expires_at), BOOST_BANNER) . $comment_end;          $comment_start = '<!-- ';
2077        //$data = _boost_inject_code(rtrim($data), "\n" . $comment);          $comment_end = " -->\n";
2078        $data = rtrim($data) . "\n" . $comment;          $expires_at = date('Y-m-d H:i:s', BOOST_TIME + $expire);
2079            $comment = $comment_start . str_replace(array('%cached_at', '%expires_at'), array($cached_at, $expires_at), BOOST_BANNER) . $comment_end;
2080            //$data = _boost_inject_code(rtrim($data), "\n" . $comment);
2081            $data = rtrim($data) . "\n" . $comment;
2082          }
2083        break;        break;
2084      case BOOST_XML_EXTENSION:      case BOOST_XML_EXTENSION:
       $comment_start = '<!-- ';  
       $comment_end = " -->\n";  
2085        $expire = BOOST_CACHE_XML_LIFETIME;        $expire = BOOST_CACHE_XML_LIFETIME;
2086        $expires_at = date('Y-m-d H:i:s', BOOST_TIME + $expire);        if (variable_get('boost_apache_xheader', 0) < 2) {
2087        $comment = $comment_start . str_replace(array('%cached_at', '%expires_at'), array($cached_at, $expires_at), BOOST_BANNER) . $comment_end;          $comment_start = '<!-- ';
2088        $data = rtrim($data) . "\n" . $comment;          $comment_end = " -->\n";
2089            $expires_at = date('Y-m-d H:i:s', BOOST_TIME + $expire);
2090            $comment = $comment_start . str_replace(array('%cached_at', '%expires_at'), array($cached_at, $expires_at), BOOST_BANNER) . $comment_end;
2091            $data = rtrim($data) . "\n" . $comment;
2092          }
2093        break;        break;
2094      case BOOST_JSON_EXTENSION:      case BOOST_JSON_EXTENSION:
       $comment_start = '/* ';  
       $comment_end = " */\n";  
2095        $expire = BOOST_CACHE_JSON_LIFETIME;        $expire = BOOST_CACHE_JSON_LIFETIME;
2096        $expires_at = date('Y-m-d H:i:s', BOOST_TIME + $expire);        if (variable_get('boost_apache_xheader', 0) < 2) {
2097        $comment = $comment_start . str_replace(array('%cached_at', '%expires_at'), array($cached_at, $expires_at), BOOST_BANNER) . $comment_end;          $comment_start = '/* ';
2098        $data = rtrim($data) . "\n" . $comment;          $comment_end = " */\n";
2099            $expires_at = date('Y-m-d H:i:s', BOOST_TIME + $expire);
2100            $comment = $comment_start . str_replace(array('%cached_at', '%expires_at'), array($cached_at, $expires_at), BOOST_BANNER) . $comment_end;
2101            $data = rtrim($data) . "\n" . $comment;
2102          }
2103        break;        break;
2104    }    }
2105    

Legend:
Removed from v.1.3.2.2.2.5.2.245  
changed lines
  Added in v.1.3.2.2.2.5.2.246

  ViewVC Help
Powered by ViewVC 1.1.2