Changeset 227
- Timestamp:
- 2007-03-27 18:00:46 (19 months ago)
- Files:
-
- 1 modified
-
FCKeditor/trunk/_dev/releaser/fckreleaser.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/_dev/releaser/fckreleaser.php
r164 r227 349 349 function StrEndsWith( $str, $sub ) 350 350 { 351 return ( substr( $str, strlen( $str ) - strlen( $sub ) ) == $sub ) ;351 return ( substr( $str, strlen( $str ) - strlen( $sub ) ) == $sub ) ; 352 352 } 353 353 … … 363 363 { 364 364 $dirParts = explode( '/', $path ) ; 365 365 366 366 $currentDir = '' ; 367 367 … … 369 369 { 370 370 $currentDir .= $dirPart . '/' ; 371 371 372 372 if ( strlen( $dirPart ) > 0 && !is_dir( $currentDir ) ) 373 373 mkdir( $currentDir, $rights ) ; … … 385 385 fwrite( $f, "\xEF\xBB\xBF" ) ; // BOM 386 386 387 fwrite( $f, $strData ) ; 388 fclose( $f ) ; 389 390 return TRUE ; 391 } 392 393 function SaveStringToUtf8File( $strData, $filePath, $includeBom = TRUE ) 394 { 395 $f = @fopen( $filePath, 'wb' ) ; 396 397 if ( !$f ) 398 return FALSE ; 399 400 if ( $includeBom ) 401 fwrite( $f, "\xEF\xBB\xBF" ) ; // BOM 402 403 fwrite( $f, ( $strData ) ) ; 404 387 fwrite( $f, StripUtf8Bom( $strData ) ) ; 405 388 fclose( $f ) ; 406 389 … … 954 937 function ProcessFile( $sourceFilePath, $destinationFilePath, $onlyHeader = FALSE ) 955 938 { 956 SaveStringTo Utf8File(939 SaveStringToFile( 957 940 FCKPreProcessor::Process( file_get_contents( $sourceFilePath ), $onlyHeader ), 958 941 $destinationFilePath, 959 ( !StrEndsWith( $sourceFilePath, '.asp' ) && !StrEndsWith( $sourceFilePath, '.js' ) ) ) ; // Only ASP and JavaScript files require the BOM.942 ( StrEndsWith( $sourceFilePath, '.asp' ) || StrEndsWith( $sourceFilePath, '.js' ) ) ) ; // Only ASP and JavaScript files require the BOM. 960 943 961 944 // Set the destination file Last Access and Last Write times.