Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Changeset 5455

Show
Ignore:
Timestamp:
09/07/08 17:05:24 (3 months ago)
Author:
shahid
Message:

patientnotes: Update image controller to use complex_obs_dir global property

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs-modules/patientnotes/branches/example/web/src/org/openmrs/module/patientnotes/web/controller/ImageController.java

    r5421 r5455  
    88import org.springframework.util.FileCopyUtils; 
    99import org.openmrs.util.OpenmrsUtil; 
     10import org.openmrs.api.context.Context; 
    1011 
    1112import javax.servlet.http.HttpServletRequest; 
     
    4142        String fileName = ServletRequestUtils.getRequiredStringParameter(httpServletRequest, "name"); 
    4243 
    43         String typePath = "patientnotes/userfiles/image";             
     44        String typePath = Context.getAdministrationService().getGlobalProperty("obs.complex_obs_dir"); 
     45        if(typePath == null) { 
     46            typePath = "patientnotes/userfiles/image"; 
     47        } 
     48             
    4449        File typeDir = OpenmrsUtil.getDirectoryInApplicationDataDirectory(typePath); 
    4550