Changeset 554 for trunk/lib/JS.inc.php
- Timestamp:
- Dec 15, 2015 9:50:28 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/JS.inc.php
r553 r554 38 38 protected $_params = array( 39 39 'character_set' => 'utf-8', 40 'cache_js' => false, 40 'cache_enable' => false, 41 'cache_js' => null, // Same as above; kept for backwards compatibility. 41 42 'cache_seconds' => 86400, 42 43 'strip_whitespace' => false, … … 57 58 // Merge new parameters with old overriding only those passed. 58 59 $this->_params = array_merge($this->_params, $params); 60 // Maintaining backwards compatibility. 61 if (isset($params['cache_js']) && !isset($params['cache_enable'])) { 62 $this->_params['cache_enable'] = $params['cache_js']; 63 } 59 64 } else { 60 65 $app->logMsg(sprintf('Parameters are not an array: %s', $params), LOG_ERR, __FILE__, __LINE__); … … 140 145 } 141 146 142 if ($this->getParam('cache_ js')) {147 if ($this->getParam('cache_enable')) { 143 148 header(sprintf('Last-Modified: %s GMT', gmdate('D, d M Y H:i:s', $latest_mtime), null)); 144 149 header(sprintf('Cache-Control: private, max-age=%s', $this->getParam('cache_seconds')));
Note: See TracChangeset
for help on using the changeset viewer.