Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Changeset 5383

Show
Ignore:
Timestamp:
08/28/08 13:29:37 (3 months ago)
Author:
shahid
Message:

patientnotes: Modified fck editor connector servlet to work with OpenMRS

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs-modules/patientnotes/branches/example/web/src/net/fckeditor/connector/ConnectorServlet.java

    r5362 r5383  
    4949import org.slf4j.Logger; 
    5050import org.slf4j.LoggerFactory; 
     51import org.openmrs.util.OpenmrsUtil; 
    5152 
    5253/** 
     
    128129                        ResourceTypeHandler resourceType = ResourceTypeHandler.getDefaultResourceType(typeStr); 
    129130 
    130                         String typePath = UtilsFile.constructServerSidePath(request, resourceType); 
    131                         String typeDirPath = getServletContext().getRealPath(typePath); 
    132  
    133                         File typeDir = new File(typeDirPath); 
     131//                      String typePath = UtilsFile.constructServerSidePath(request, resourceType); 
     132//            String typePath = "/moduleResources/patientnotes/userfiles/image"; 
     133            String typePath = "patientnotes/userfiles/image"; 
     134//            String typeDirPath = getServletContext().getRealPath(typePath); 
     135            File typeDir = OpenmrsUtil.getDirectoryInApplicationDataDirectory(typePath);             
     136//            File typeDir = new File(typeDirPath); 
    134137                        UtilsFile.checkDirAndCreate(typeDir); 
    135138 
     
    226229                        ResourceTypeHandler resourceType = ResourceTypeHandler.getDefaultResourceType(typeStr); 
    227230 
    228                         String typePath = UtilsFile.constructServerSidePath(request, resourceType); 
    229                         String typeDirPath = getServletContext().getRealPath(typePath); 
    230  
    231                         File typeDir = new File(typeDirPath); 
    232                         UtilsFile.checkDirAndCreate(typeDir); 
     231//                      String typePath = UtilsFile.constructServerSidePath(request, resourceType); 
     232//                      String typeDirPath = getServletContext().getRealPath(typePath); 
     233// 
     234//                      File typeDir = new File(typeDirPath); 
     235 
     236            String typePath = "patientnotes/userfiles/image";             
     237            File typeDir = OpenmrsUtil.getDirectoryInApplicationDataDirectory(typePath); 
     238 
     239            UtilsFile.checkDirAndCreate(typeDir); 
    233240 
    234241                        File currentDir = new File(typeDir, currentFolderStr);