Dotclear


Ignore:
Timestamp:
09/17/18 05:52:14 (7 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Back to the old array() notation for build tools (they still may be used with old PHP versions)

Location:
build-tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • build-tools/Minifier.php

    r3874 r3877  
    2424 * Usage - Minifier::minify($js); 
    2525 * Usage - Minifier::minify($js, $options); 
    26  * Usage - Minifier::minify($js, ['flaggedComments' => false]); 
     26 * Usage - Minifier::minify($js, array('flaggedComments' => false)); 
    2727 * 
    2828 * @package JShrink 
     
    8282     * @var array 
    8383     */ 
    84     protected static $defaultOptions = ['flaggedComments' => true]; 
     84    protected static $defaultOptions = array('flaggedComments' => true); 
    8585 
    8686    /** 
     
    9090     * @var array 
    9191     */ 
    92     protected $locks = []; 
     92    protected $locks = array(); 
    9393 
    9494    /** 
     
    101101     * @return bool|string 
    102102     */ 
    103     public static function minify($js, $options = []) 
     103    public static function minify($js, $options = array()) 
    104104    { 
    105105        try { 
     
    552552        $lock = '"LOCK---' . crc32(time()) . '"'; 
    553553 
    554         $matches = []; 
     554        $matches = array(); 
    555555        preg_match('/([+-])(\s+)([+-])/S', $js, $matches); 
    556556        if (empty($matches)) { 
  • build-tools/make-l10n.php

    r3874 r3877  
    1818exec($cmd, $eres, $ret); 
    1919 
    20 $res = []; 
     20$res = array(); 
    2121 
    2222foreach ($eres as $f) { 
  • build-tools/min-js.php

    r3874 r3877  
    2020 
    2121    $content = file_get_contents($js); 
    22     $res     = \JShrink\Minifier::minify($content, ['flaggedComments' => false]); 
     22    $res     = \JShrink\Minifier::minify($content, array('flaggedComments' => false)); 
    2323 
    2424    if (($fp = fopen($js, 'wb')) === false) { 
  • build-tools/setup.php

    r3874 r3877  
    1212$php_exec = $_SERVER['_']; 
    1313 
    14 $opts = [ 
    15     'http' => [] 
    16 ]; 
     14$opts = array( 
     15    'http' => array() 
     16); 
    1717if (getenv('http_proxy') !== false) { 
    1818    $opts['http']['proxy'] = 'tcp://' . getenv('http_proxy'); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map