diff --git a/merge.php b/merge.php index 7f2ae35..ee59c1c 100755 --- a/merge.php +++ b/merge.php @@ -145,7 +145,7 @@ array( 'name' => $rawname, 'description' => "Module of FreePBX (".trim($name).") :: ".trim(strip_tags(str_replace(array("\r", "\n"), '', $description))), - 'default_branch' => 'release/13.0', + 'default_branch' => 'release/'.$options['updatemaster'], 'homepage' => 'http://www.freepbx.org', "has_issues" => false, "has_wiki" => false, diff --git a/pack_javascripts.php b/pack_javascripts.php index c9f524d..8097484 100755 --- a/pack_javascripts.php +++ b/pack_javascripts.php @@ -36,12 +36,12 @@ exec("ls $dir/bootstrap-table-extensions-dev/*.js",$output2,$ret); $output = array_merge($output,$output2); } -$final=$finalB=array(); +$final=$firstJS=$lastJS=array(); /* * to order js files: files will be appened to the array in the order they appear * in the switch statmenet below. To give a file priority, create a case for it and - * add it to the $finalB array. All other files will be appended to the $final array. - * $finalB is then merged with $final, with $finalB being put first + * add it to the $firstJS array. All other files will be appended to the $final array. + * $firstJS is then merged with $final, with $firstJS being put first */ /* Array @@ -118,7 +118,7 @@ "|$dir/module_admin\.js|", "|$dir/eventsource-.*\.min\.js|", ); - $finalB = array(); + $firstJS = array(); } foreach ($output as $file) { @@ -135,10 +135,10 @@ //add files switch(true){ case preg_match("|$dir/jquery\.cookie\.js|",$file): - $finalB[] = $file; + $firstJS[] = $file; break; case $file==$dir.'/script.legacy.js'://legacy script - $finalB[] = $file; + $firstJS[] = $file; break; case $file != $dir.'/script.legacy.js'://default $final[] = $file; @@ -148,13 +148,13 @@ //add files switch(true){ case preg_match("|$dir/moment-duration-format-.*\.js|",$file): - $finalB[] = $file; + $lastJS[] = $file; break; case preg_match("|$dir/moment-with-locales-.*\.min\.js|",$file): - $finalB[] = $file; + $firstJS[] = $file; break; case $file==$dir.'/script.legacy.js'://legacy script - $finalB[] = $file; + $firstJS[] = $file; break; case $file != $dir.'/script.legacy.js'://default $final[] = $file; @@ -163,10 +163,11 @@ } } -sort($finalB); +sort($lastJS); +sort($firstJS); sort($final); -$final=array_merge($finalB,$final); +$final=array_merge($firstJS,$final,$lastJS); echo "\narray(\n"; foreach($final as $f) {