Changeset 5456
- Timestamp:
- 09/07/08 19:03:06 (3 months ago)
- Files:
-
- openmrs-modules/remoteformentry/metadata/config.xml (modified) (1 diff)
- openmrs-modules/remoteformentry/src/org/openmrs/module/remoteformentry/impl/RemoteFormEntryServiceImpl.java (modified) (4 diffs)
- openmrs-modules/remoteformentry/web/module/generateReturnDataForm.jsp (modified) (1 diff)
- openmrs-modules/remoteformentry/web/module/returnDataToRemoteForm.jsp (modified) (1 diff)
- openmrs-modules/remoteformentry/web/src/org/openmrs/module/remoteformentry/web/QueueDownloadServlet.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
openmrs-modules/remoteformentry/metadata/config.xml
r5128 r5456 7 7 <id>remoteformentry</id> 8 8 <name>Remote FormEntry</name> 9 <version> 1.9</version>9 <version>2.0</version> 10 10 <package>org.openmrs.module.@MODULE_ID@</package> 11 11 <author>Ben Wolfe</author> openmrs-modules/remoteformentry/src/org/openmrs/module/remoteformentry/impl/RemoteFormEntryServiceImpl.java
r5128 r5456 49 49 import org.openmrs.scheduler.TaskDefinition; 50 50 import org.openmrs.util.OpenmrsUtil; 51 import org.openmrs.web.WebUtil; 51 52 import org.w3c.dom.Document; 52 53 … … 86 87 RemoteFormEntryPendingQueue pendingQueue) { 87 88 File queueDir = RemoteFormEntryUtil.getPendingQueueDir(); 88 89 File outFile = OpenmrsUtil.getOutFile(queueDir, 90 null, 91 pendingQueue.getCreator()); 89 90 String fileSystemUrl = pendingQueue.getFileSystemUrl(); 91 92 File outFile = null; 93 94 if (fileSystemUrl != null) { 95 // get just the file name out of the full path 96 String filename = WebUtil.stripFilename(fileSystemUrl); 97 // create the file with the same name as the filename in the current pending queue's url 98 outFile = new File(queueDir, filename); 99 } 100 else 101 outFile = OpenmrsUtil.getOutFile(queueDir, 102 null, 103 pendingQueue.getCreator()); 92 104 93 105 // write the queue's data to the file … … 547 559 for (RemoteFormEntryPendingQueue queue : pendingQueueItems) { 548 560 // if this filename matches the pending queue filename 549 if (queue.getFileSystemUrl().equals(filename)) { 561 String fileSystemUrl = queue.getFileSystemUrl(); 562 String fileSystemName = WebUtil.stripFilename(fileSystemUrl); 563 if (fileSystemName.equals(filename)) { 550 564 // create and save formentry archive 551 565 FormEntryArchive archive = new FormEntryArchive(); … … 574 588 // change the extension to 'ack' 575 589 String filename = filenames.get(0); 576 Integer period = filename.lastIndexOf(" 0");590 Integer period = filename.lastIndexOf("."); 577 591 if (period != -1) 578 592 filename = filename.substring(0, period) + ".ack"; openmrs-modules/remoteformentry/web/module/generateReturnDataForm.jsp
r2718 r5456 1 i<%@ include file="/WEB-INF/template/include.jsp"%>1 <%@ include file="/WEB-INF/template/include.jsp"%> 2 2 3 3 <openmrs:require privilege="Remote Form Entry Return To Remote" otherwise="/login.htm" redirect="/module/remoteformentry/generateReturnData.form" /> openmrs-modules/remoteformentry/web/module/returnDataToRemoteForm.jsp
r2443 r5456 1 i<%@ include file="/WEB-INF/template/include.jsp"%>1 <%@ include file="/WEB-INF/template/include.jsp"%> 2 2 3 3 <openmrs:require privilege="Remote Form Entry Return To Remote" otherwise="/login.htm" redirect="/module/remoteformentry/returnDataToRemote.form" /> openmrs-modules/remoteformentry/web/src/org/openmrs/module/remoteformentry/web/QueueDownloadServlet.java
r5087 r5456 172 172 pendingQueue.setCreator(queueItem.getCreator()); 173 173 pendingQueue.setDateCreated(queueItem.getDateCreated()); 174 pendingQueue.setFileSystemUrl(queueItem.getFileSystemUrl()); // so that when creating it, it uses the same filename as was passed to central 174 175 remoteService.createRemoteFormEntryPendingQueue(pendingQueue); 175 176 log.debug("Done creating remote pending queue item: " + pendingQueue.getFileSystemUrl());