Changeset 2576
- Timestamp:
- 04/16/10 18:07:10 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/inc/class.javascript.inc.php
r2561 r2576 134 134 if ($GLOBALS['phpgw_info']['server']['jspacker'] == "True") 135 135 { 136 $filePath=PHPGW_INCLUDE_ROOT.SEP.$app.SEP.'js'.SEP.$pkg.SEP.$file.'.js'; 137 if (!file_exists( $filePath."pack.js"))136 137 if (!file_exists(PHPGW_INCLUDE_ROOT.SEP.$app.SEP.'js'.SEP.$pkg.SEP.$pkg.'.jspack.js')) 138 138 { 139 $fp = fopen($filePath."pack.js", 'w'); 140 $script = file_get_contents($filePath); 141 require_once('class.JavaScriptPacker.php'); 142 $packer = new JavaScriptPacker($script, 'Normal', true, false); 143 $packed = $packer->pack(); 144 fwrite($fp, $packed); 145 fclose($fp); 139 $filePath=PHPGW_INCLUDE_ROOT.SEP.$app.SEP.'js'.SEP.$pkg.SEP.$file.'.js'; 140 $script .= file_get_contents($filePath).";\n"; 146 141 } 147 $links .= '<script type="text/javascript" src="'148 .$GLOBALS['phpgw_info']['server']['webserver_url']149 ."/$app/js/$pkg/$file" . ".jspack.js\"></script>\n";150 142 } 151 143 else … … 160 152 } 161 153 } 154 155 if ($GLOBALS['phpgw_info']['server']['jspacker'] == "True") 156 { 157 $filePath=PHPGW_INCLUDE_ROOT.SEP.$app.SEP.'js'.SEP.$pkg.SEP.$pkg.'.jspack.js'; 158 if (!file_exists($filePath)) 159 { 160 $fp = fopen($filePath, 'w'); 161 require_once('class.JavaScriptPacker.php'); 162 $packer = new JavaScriptPacker($script, 'Normal', true, false); 163 $packed = $packer->pack(); 164 fwrite($fp, $packed); 165 fclose($fp); 166 } 167 $links .= '<script type="text/javascript" src="' 168 .$GLOBALS['phpgw_info']['server']['webserver_url'] 169 ."/$app/js/$pkg/$pkg" . ".jspack.js\"></script>\n"; 170 } 162 171 } 163 172 }
Note: See TracChangeset
for help on using the changeset viewer.