Ticket #1622: 1622_packager.patch
File 1622_packager.patch, 1.5 KB (added by , 17 years ago) |
---|
-
fckpackager.php
493 493 echo ' Adding ' . basename( $file ) . "\n" ; 494 494 495 495 // Compress (if needed) and process its contents. 496 if ( $this->CompactJavaScript ) 497 $outputData .= FCKJavaScriptCompressor::Compress( FCKPreProcessor::Process( $data ), $this->ConstantsProcessor ) ; 496 if ( preg_match( '/\.js$/', $file ) ) 497 { 498 if ( $this->CompactJavaScript ) 499 $outputData .= FCKJavaScriptCompressor::Compress( FCKPreProcessor::Process( $data ), $this->ConstantsProcessor ) ; 500 else 501 $outputData .= FCKPreProcessor::Process( $data ) ; 502 } 503 else if ( preg_match( '/\.css$/', $file ) ) 504 { 505 $outputData .= FCKCSSProcessor::Process( $data, $file ) ; 506 } 498 507 else 499 $outputData .= FCKPreProcessor::Process( $data ) ; 508 { 509 echo " Unknown file type, not added!\n"; 510 } 500 511 501 512 // Each file terminates with a CRLF, even if compressed. 502 513 $outputData .= "\r\n" ; … … 659 670 ?> 660 671 <?php 661 672 673 class FCKCSSProcessor 674 { 675 function FCKCSSProcessor( ) 676 { } 662 677 678 // Intended to be static 679 function Process( $data, $filename ) 680 { 681 $def = "FCKCSSManager.AddCachedCSS(" . json_encode( str_replace( 'editor/', '', $filename ) ) . ",". json_encode( $data ) .");" ; 682 return $def ; 683 } 684 } 685 663 686 class FCKPreProcessor 664 687 { 665 688 function FCKPreProcessor()