Changeset 2595
- Timestamp:
- 04/20/10 08:08:44 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/inc/class.javascript.inc.php
r2580 r2595 132 132 foreach($files as $file => $ignored) 133 133 { 134 $jsFilePath=PHPGW_INCLUDE_ROOT.SEP.$app.SEP.'js'.SEP.$pkg.SEP.$file.'.js'; 134 135 if ($GLOBALS['phpgw_info']['server']['jspacker'] == "True") 135 136 { 136 137 137 if (!file_exists(PHPGW_INCLUDE_ROOT.SEP.$app.SEP.'js'.SEP.$pkg.SEP.$pkg.'.jspack.js')) 138 $packFilePath=PHPGW_INCLUDE_ROOT.SEP.$app.SEP.'js'.SEP.$pkg.SEP.$pkg.'.jspack.js'; 139 if (filemtime($jsFilePath) > filemtime($packFilePath)) // Is newer 138 140 { 139 $filePath=PHPGW_INCLUDE_ROOT.SEP.$app.SEP.'js'.SEP.$pkg.SEP.$file.'.js'; 140 $script .= file_get_contents($filePath); 141 $regeratePack = True; 141 142 } 143 $script .= file_get_contents($jsFilePath); 142 144 } 143 145 else 144 146 { 145 $_file = PHPGW_INCLUDE_ROOT . SEP . $app . SEP . 'js' . SEP . $pkg . SEP. $file . '.js';146 147 147 $links .= '<script type="text/javascript" src="' 148 148 . $GLOBALS['phpgw_info']['server']['webserver_url'] 149 . "/$app/js/$pkg/$file" . '.js?' . filemtime( $ _file) . '">'149 . "/$app/js/$pkg/$file" . '.js?' . filemtime( $jsFilePath ) . '">' 150 150 . "</script>\n"; 151 151 } … … 157 157 if ($GLOBALS['phpgw_info']['server']['jspacker'] == "True") 158 158 { 159 $filePath=PHPGW_INCLUDE_ROOT.SEP.$app.SEP.'js'.SEP.$pkg.SEP.$pkg.'.jspack.js'; 160 if (!file_exists($filePath)) 159 if (!file_exists($packFilePath) || $regeratePack) 161 160 { 162 $fp = fopen($ filePath, 'w');161 $fp = fopen($packFilePath, 'w'); 163 162 require_once('class.JavaScriptPacker.php'); 164 163 $packer = new JavaScriptPacker($script, 'High ASCII', true, true);
Note: See TracChangeset
for help on using the changeset viewer.