------------------------------------------------------------ revno: 18377 committer: Lars Helge Overland <larshe...@gmail.com> branch nick: dhis2 timestamp: Mon 2015-02-23 12:48:32 +0100 message: Cache manifest action, fixed nullpointer vulnerability modified: dhis-2/dhis-web/dhis-web-apps/src/main/resources/struts.xml dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/appcache/CacheManifestAction.java
-- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/resources/struts.xml' --- dhis-2/dhis-web/dhis-web-apps/src/main/resources/struts.xml 2015-01-22 16:55:07 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/resources/struts.xml 2015-02-23 11:48:32 +0000 @@ -46,6 +46,7 @@ <action name="index" class="org.hisp.dhis.commons.action.NoAction"> <result name="success" type="redirect">index.html</result> </action> + <action name="cacheManifest" class="org.hisp.dhis.appcache.CacheManifestAction"> <param name="appPath">dhis-web-event-capture</param> <param name="i18nPath">i18n</param> === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/appcache/CacheManifestAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/appcache/CacheManifestAction.java 2015-02-22 20:30:29 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/appcache/CacheManifestAction.java 2015-02-23 11:48:32 +0000 @@ -38,9 +38,9 @@ import javax.servlet.ServletContext; import org.apache.struts2.ServletActionContext; +import org.hisp.dhis.i18n.locale.LocaleManager; import org.hisp.dhis.system.SystemInfo; import org.hisp.dhis.system.SystemService; -import org.hisp.dhis.user.UserSettingService; import org.springframework.beans.factory.annotation.Autowired; import com.opensymphony.xwork2.Action; @@ -53,10 +53,10 @@ implements Action { @Autowired - private UserSettingService userSettingService; - - @Autowired private SystemService systemService; + + @Autowired + private LocaleManager localeManager; private String appPath; @@ -97,7 +97,8 @@ File i18nFolder = null; StringBuffer stringBuffer = null; - String locale = userSettingService.getUserSetting( UserSettingService.KEY_UI_LOCALE ).toString(); + String locale = localeManager.getCurrentLocale().toString(); + SystemInfo info = systemService.getSystemInfo(); String revisionTag = "#Revision:" + info.getRevision();
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp