Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/units/helpers/minifiers/minify_helper.php
Show First 20 Lines • Show All 225 Lines • ▼ Show 20 Line(s) | |||||
* @return void | * @return void | ||||
* @access protected | * @access protected | ||||
*/ | */ | ||||
protected function compressViaJava(&$string, $extension) | protected function compressViaJava(&$string, $extension) | ||||
{ | { | ||||
$tmp_file = tempnam('/tmp', 'to_compress_'); | $tmp_file = tempnam('/tmp', 'to_compress_'); | ||||
file_put_contents($tmp_file, $string); | file_put_contents($tmp_file, $string); | ||||
$command = 'java -jar ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . 'yuicompressor-2.4.2.jar --type ' . $extension . ' --charset utf-8 ' . $tmp_file; | $command = 'java -jar ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . 'yuicompressor-2.4.8.jar --type ' . $extension . ' --charset utf-8 ' . $tmp_file; | ||||
$string = shell_exec($command); | $string = shell_exec($command); | ||||
unlink($tmp_file); | unlink($tmp_file); | ||||
} | } | ||||
/** | /** | ||||
* Compresses string using PHP compressor | * Compresses string using PHP compressor | ||||
* | * | ||||
▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines |