Ticket #2063: 2063.patch

File 2063.patch, 2.9 KB (added by alfonsoml, 22 months ago)

Proposed patch

  • _whatsnew.html

     
    106106                        are applied in the image preview dialog.</li> 
    107107                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2056">#2056</a>] Fixed several validation  
    108108                        errors in the dialogs.</li> 
     109                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2063">#2063</a>] Fixed some problems in asp 
     110                        related to the use of network paths for the location of the uploaded files.</li> 
    109111        </ul> 
    110112        <h3> 
    111113                Version 2.6</h3> 
  • editor/filemanager/connectors/asp/commands.asp

     
    103103        Else 
    104104                ' Map the virtual path to the local server path of the current folder. 
    105105                Dim sServerDir 
    106                 sServerDir = ServerMapFolder( resourceType, CombinePaths(currentFolder, sNewFolderName), "CreateFolder" ) 
     106                sServerDir = ServerMapFolder( resourceType, CombineLocalPaths(currentFolder, sNewFolderName), "CreateFolder" ) 
    107107 
    108108                On Error Resume Next 
    109109 
     
    171171 
    172172                        Do While ( True ) 
    173173                                Dim sFilePath 
    174                                 sFilePath = sServerDir & sFileName 
     174                                sFilePath = CombineLocalPaths(sServerDir, sFileName) 
    175175 
    176176                                If ( oFSO.FileExists( sFilePath ) ) Then 
    177177                                        iCounter = iCounter + 1 
  • editor/filemanager/connectors/asp/io.asp

     
    2525        CombinePaths =  RemoveFromEnd( sBasePath, "/" ) & "/" & RemoveFromStart( sFolder, "/" ) 
    2626end function 
    2727 
     28function CombineLocalPaths( sBasePath, sFolder) 
     29        sFolder = replace(sFolder, "/", "\") 
     30        ' The RemoveFrom* functions use RegExp, so we must escape the \ 
     31        CombineLocalPaths =  RemoveFromEnd( sBasePath, "\\" ) & "\" & RemoveFromStart( sFolder, "\\" ) 
     32end function 
     33 
    2834Function GetResourceTypePath( resourceType, sCommand ) 
    2935        if ( sCommand = "QuickUpload") then 
    3036                GetResourceTypePath = ConfigQuickUploadPath.Item( resourceType ) 
     
    6975        CreateServerFolder sResourceTypePath 
    7076 
    7177        ' Return the resource type directory combined with the required path. 
    72         ServerMapFolder = CombinePaths( sResourceTypePath, folderPath ) 
     78        ServerMapFolder = CombineLocalPaths( sResourceTypePath, folderPath ) 
    7379End Function 
    7480 
    7581Sub CreateServerFolder( folderPath ) 
     
    7985        Dim sParent 
    8086        sParent = oFSO.GetParentFolderName( folderPath ) 
    8187 
     88        ' If folderPath is a network path (\\server\folder\) then sParent is an empty string. 
     89        ' Get out. 
     90        if (sParent = "") then exit sub 
     91 
    8292        ' Check if the parent exists, or create it. 
    8393        If ( NOT oFSO.FolderExists( sParent ) ) Then CreateServerFolder( sParent ) 
    8494