Changeset 1580

Show
Ignore:
Timestamp:
2008-02-21 11:56:37 (2 years ago)
Author:
wwalc
Message:

Fix for #1692: resolved issues in ColdFusion with GetTempDirectory() calls, added changelog entry for #1379

Location:
FCKeditor/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/filemanager/connectors/cfm/cf_commands.cfm

    r1565 r1580  
    3333        <cfset var sFileExt = ""> 
    3434        <cfset var sFileUrl = ""> 
     35        <cfset var sTempDir = ""> 
    3536        <cfset var sTempFilePath = ""> 
    3637        <cfset var errorNumber = 0> 
     
    3940        <cfset var destination = ""> 
    4041 
    41     <cftry> 
    42         <cffile action="UPLOAD" filefield="NewFile" destination="#GetTempDirectory()#" nameconflict="makeunique" mode="0755" /> 
     42        <cftry> 
     43                <cfif isDefined( "REQUEST.Config.TempDirectory" )> 
     44                        <cfset sTempDir = REQUEST.Config.TempDirectory> 
     45                <cfelse> 
     46                        <cfset sTempDir = GetTempDirectory()> 
     47                </cfif> 
     48                <cfif NOT DirectoryExists (sTempDir)> 
     49                        <cfthrow message="Invalid temporary directory: #sTempDir#"> 
     50                </cfif> 
     51 
     52                <cffile action="UPLOAD" filefield="NewFile" destination="#sTempDir#" nameconflict="makeunique" mode="0755" /> 
    4353                <cfset sTempFilePath = CFFILE.ServerDirectory & REQUEST.fs & CFFILE.ServerFile> 
    4454 
     
    93103 
    94104                <cfset destination = sServerDir & sFileName> 
    95 <!--- 
    96                 <cfdump var="#sTempFilePath#"> 
    97                 <cfoutput ><br /></cfoutput> 
    98                 <cfdump var="#destination#"> 
    99                 <cfabort> 
    100  ---> 
     105 
    101106                <cflock name="#destination#" timeout="30" type="Exclusive"> 
    102107                <cftry> 
     
    121126                </cfcatch> 
    122127 
    123     </cftry> 
     128        </cftry> 
    124129 
    125130        <cfset SendUploadResults( errorNumber, sFileUrl, sFileName, customMsg ) > 
  • FCKeditor/trunk/editor/filemanager/connectors/cfm/config.cfm

    r1565 r1580  
    6262        Config.HtmlExtensions                                   = "html,htm,xml,xsd,txt,js" ; 
    6363 
     64        //Due to known issues with GetTempDirectory function, it is 
     65        //recommended to set this vairiable to a valid directory 
     66        //instead of using the GetTempDirectory function 
     67        //(used by MX 6.0 and above) 
     68        Config.TempDirectory = GetTempDirectory(); 
    6469 
    6570//      Configuration settings for each Resource Type 
  • FCKeditor/trunk/_whatsnew.html

    r1579 r1580  
    120120                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1815">#1815</a>] PHP integration: removed  
    121121                        closing tag: "?>", so no additional whitespace added when files are included.</li> 
     122                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1692">#1692</a>] ColdFusion file browser:  
     123                        it is possible now to define TempDirectory to avoid issues with GetTempdirectory() returning  
     124                        an empty string.</li> 
     125                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1379">#1379</a>] ColdFusion file browser:  
     126                        resolved issues with OnRequestEnd.cfm breaking the file browser.</li> 
    122127        </ul> 
    123128        <p>