Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Ticket #1350: 1350.patch

File 1350.patch, 1.4 kB (added by andrew, 1 year ago)

patch that worked for me.

  • src/web/org/openmrs/web/filter/initialization/InitializationFilter.java

    old new  
    341341                         
    342342                        renderTemplate(page, referenceMap, writer); 
    343343                         
    344                 } // optional step four 
     344                } // optional step four f 
    345345                else if ("adminusersetup.vm".equals(page)) { 
    346346                         
    347347                        if ("Back".equals(httpRequest.getParameter("back"))) { 
     
    545545                         
    546546                        // start openmrs 
    547547                        try { 
     548                                Context.openSession(); 
    548549                                Context.startup(runtimeProperties); 
    549550                        } 
    550551                        catch (DatabaseUpdateException updateEx) { 
     
    565566                                renderTemplate(DEFAULT_PAGE, null, writer); 
    566567                                return; 
    567568                        } 
    568                          
     569                                        
    569570                        // TODO catch openmrs errors here and drop the user back out to the setup screen 
    570                          
    571571                        if (!wizardModel.implementationId.equals("")) { 
    572572                                try { 
    573573                                        Context.addProxyPrivilege(OpenmrsConstants.PRIV_MANAGE_GLOBAL_PROPERTIES); 
     
    642642                         
    643643                        // set this so that the wizard isn't run again on next page load 
    644644                        initializationComplete = true; 
     645                        Context.closeSession(); 
    645646                         
    646647                        // TODO send user to confirmation page with results of wizard, location of runtime props, etc instead? 
    647648                        httpResponse.sendRedirect("/" + WebConstants.WEBAPP_NAME);