Show
Ignore:
Timestamp:
09/21/11 12:09:35 (8 months ago)
Author:
mbrevda
Message:

re #5342 - fix js packer, remove compression variable - were defaulting to compression for now and can esially do another version that is uncompressed if people have issues

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/buildtools/pack_javascripts.php

    r12544 r12624  
    11#!/usr/bin/php -q 
    22<?php 
    3  
    4 //include database conifguration  
    5 $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 } 
    103 
    114$libfreepbx = '../amp_conf/htdocs/admin/assets/js/pbxlib.js.php'; 
     
    2114 * $finalB is then merged with $final, with $finalB being put first 
    2215 */   
     16 
     17$skip = array( 
     18    "|$dir/progress-polyfill.min.js|", 
     19    "|$dir/jquery-.*\.js|", 
     20    "|$dir/jquery-ui-.*\.js$|" 
     21); 
    2322foreach ($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 
    2432  switch(true){ 
    25     case preg_match("|$dir/jquery-.*\.js|",$file)://jquery 
    26     case 'progress-polyfill.min.js'://no need to minimize - for ie only 
    27        //$finalB[] = $file; 
    28     break; 
    2933    case preg_match("|$dir/jquery.cookie.js$|",$file)://jquery ui 
    3034      $finalB[] = $file; 
    31     break; 
    32     case preg_match("|$dir/jquery-ui-.*\.js$|",$file)://jquery ui 
    33       //$finalB[] = $file; 
    3435    break; 
    3536    case $file==$dir.'/script.legacy.js'://legacy script 
     
    5253header('Expires: ' . date('r', strtotime('+1 year'))); 
    5354header('Last-Modified: ' . date('r', strtotime('-1 year'))); 
    54 ob_start('" . $amp_conf['buffering_callback'] . "'); 
     55ob_start(ob_gzhandler); 
    5556?> 
    5657";