Show
Ignore:
Timestamp:
2007-03-27 17:58:03 (17 months ago)
Author:
fredck
Message:

Fixed #279 : Corrected the releaser to include the UTF-8 BOM only in the necessary files.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKreleaser/trunk/_source/includes/fckpackager/common.inc

    r159 r226  
    2929function StrEndsWith( $str, $sub ) 
    3030{ 
    31    return ( substr( $str, strlen( $str ) - strlen( $sub ) ) == $sub ) ; 
     31        return ( substr( $str, strlen( $str ) - strlen( $sub ) ) == $sub ) ; 
    3232} 
    3333 
     
    4343{ 
    4444        $dirParts = explode( '/', $path ) ; 
    45          
     45 
    4646        $currentDir = '' ; 
    4747 
     
    4949        { 
    5050                $currentDir .= $dirPart . '/' ; 
    51                  
     51 
    5252                if ( strlen( $dirPart ) > 0 && !is_dir( $currentDir ) ) 
    5353                        mkdir( $currentDir, $rights ) ; 
     
    6565                fwrite( $f, "\xEF\xBB\xBF" ) ;  // BOM 
    6666 
    67         fwrite( $f, $strData ) ; 
    68         fclose( $f ) ; 
    69  
    70         return TRUE ; 
    71 } 
    72  
    73 function SaveStringToUtf8File( $strData, $filePath, $includeBom = TRUE ) 
    74 { 
    75         $f = @fopen( $filePath, 'wb' ) ; 
    76  
    77         if ( !$f ) 
    78                 return FALSE ; 
    79  
    80         if ( $includeBom ) 
    81                 fwrite( $f, "\xEF\xBB\xBF" ) ;  // BOM 
    82  
    83         fwrite( $f, ( $strData ) ) ; 
    84  
     67        fwrite( $f, StripUtf8Bom( $strData ) ) ; 
    8568        fclose( $f ) ; 
    8669