Changeset 12625 for freepbx/branches/2.10/buildtools
- Timestamp:
- 09/21/11 13:17:09 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/branches/2.10/buildtools/pack_javascripts.php
r12544 r12625 1 1 #!/usr/bin/php -q 2 2 <?php 3 4 //include database conifguration5 $bootstrap_settings['skip_astman'] = true;6 $restrict_mods = true;7 if (!@include_once(getenv('FREEPBX_CONF') ? getenv('FREEPBX_CONF') : '/etc/freepbx.conf')) {8 include_once('/etc/asterisk/freepbx.conf');9 }10 3 11 4 $libfreepbx = '../amp_conf/htdocs/admin/assets/js/pbxlib.js.php'; … … 21 14 * $finalB is then merged with $final, with $finalB being put first 22 15 */ 16 17 $skip = array( 18 "|$dir/progress-polyfill.min.js|", 19 "|$dir/jquery-.*\.js|", 20 "|$dir/jquery-ui-.*\.js$|" 21 ); 23 22 foreach ($output as $file) { 23 24 //skip the files in the skip array 25 foreach ($skip as $s) { 26 if (preg_match($s, $file)) { 27 continue 2; 28 } 29 } 30 31 //add files 24 32 switch(true){ 25 case preg_match("|$dir/jquery-.*\.js|",$file)://jquery26 case 'progress-polyfill.min.js'://no need to minimize - for ie only27 //$finalB[] = $file;28 break;29 33 case preg_match("|$dir/jquery.cookie.js$|",$file)://jquery ui 30 34 $finalB[] = $file; 31 break;32 case preg_match("|$dir/jquery-ui-.*\.js$|",$file)://jquery ui33 //$finalB[] = $file;34 35 break; 35 36 case $file==$dir.'/script.legacy.js'://legacy script … … 52 53 header('Expires: ' . date('r', strtotime('+1 year'))); 53 54 header('Last-Modified: ' . date('r', strtotime('-1 year'))); 54 ob_start( '" . $amp_conf['buffering_callback'] . "');55 ob_start(ob_gzhandler); 55 56 ?> 56 57 ";
