=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java 2015-09-24 07:35:03 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java 2015-09-24 07:36:33 +0000 @@ -66,9 +66,12 @@ @Autowired private SystemSettingManager systemSettingManager; + private static final String LOGO_BANNER = "logo_banner"; + private static final String LOGO_FRONT = "logo_front"; + private static final Map KEY_WHITELIST_MAP = ImmutableMap.builder(). - put( "logo_banner", SystemSettingManager.KEY_USE_CUSTOM_LOGO_BANNER ). - put( "logo_front", SystemSettingManager.KEY_USE_CUSTOM_LOGO_FRONT ).build(); + put( LOGO_BANNER, SystemSettingManager.KEY_USE_CUSTOM_LOGO_BANNER ). + put( LOGO_FRONT, SystemSettingManager.KEY_USE_CUSTOM_LOGO_FRONT ).build(); /** * Serves a PNG associated with the key. if custom logo is not used, the @@ -182,12 +185,12 @@ { String relativeUrlToImage = null; - if ( key.equals( "logo_banner" ) ) + if ( key.equals( LOGO_BANNER ) ) { relativeUrlToImage = "/dhis-web-commons/css/light_blue/logo_banner.png"; } - if ( key.equals( "logo_front" ) ) + if ( key.equals( LOGO_FRONT ) ) { relativeUrlToImage = "/dhis-web-commons/flags/" + systemSettingManager.getFlagImage(); }