=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java 2012-11-30 18:17:32 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java 2012-12-07 21:28:50 +0000 @@ -85,7 +85,9 @@ final String DEFAULT_APPLICATION_TITLE = "District Health Information Software 2"; final int DEFAULT_COMPLETENESS_OFFSET = 15; - final String DEFAULT_TIME_FOR_SENDING_MESSAGE = "08:00"; + final String DEFAULT_TIME_FOR_SENDING_MESSAGE = "08:00"; + + final String SYSPROP_PORTAL = "runningAsPortal"; final HashSet DEFAULT_SCHEDULED_PERIOD_TYPES = new HashSet() { { add( MonthlyPeriodType.NAME ); === removed file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/error.html' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/error.html 2012-03-16 18:28:34 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/error.html 1970-01-01 00:00:00 +0000 @@ -1,62 +0,0 @@ - - - - DHIS 2 - Error Occurred - - - -
-
-
- Oops, something went wrong
- Do not panic, we have recorded it in the log -
-
-
- - \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/exception.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/exception.vm 2009-03-03 16:46:36 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/exception.vm 2012-12-07 21:28:50 +0000 @@ -66,9 +66,9 @@ var stackTraceId = 'stackTrace' + idCount; var toggleId = 'toggle' + idCount; - var stackTraceElement = document.getElementById( stackTraceId ); // div - var toggleElement = document.getElementById( toggleId ); // span - toggleElement = toggleElement.firstChild; // a + var stackTraceElement = document.getElementById( stackTraceId ); + var toggleElement = document.getElementById( toggleId ); + toggleElement = toggleElement.firstChild; if ( stackTraceElement.style.display == 'none' ) { @@ -87,16 +87,14 @@ -## -------------------------------------------------------------------------- ## -

$i18n.getString( "an_exception_occured" )

$encoder.htmlEncode( $i18n.getString( "exception_explanation_text" ))

+#if( $runningAsPortal == "false" ) #printException( $exception $i18n.getString( "exception" ) ) - -## -------------------------------------------------------------------------- ## +#end === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java 2012-11-30 18:17:32 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java 2012-12-07 21:28:50 +0000 @@ -38,6 +38,8 @@ import static org.hisp.dhis.setting.SystemSettingManager.*; +import static org.apache.commons.lang.StringUtils.defaultIfEmpty; + /** * @author Lars Helge Overland */ @@ -94,6 +96,8 @@ map.put( KEY_ACCOUNT_RECOVERY, systemSettingManager.getSystemSetting( KEY_ACCOUNT_RECOVERY, false ) ); map.put( KEY_CONFIGURATION, configurationService.getConfiguration() ); + map.put( SYSPROP_PORTAL, defaultIfEmpty( System.getProperty( SYSPROP_PORTAL ), String.valueOf( false ) ) ); + invocation.getStack().push( map ); return invocation.invoke(); === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties' --- dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties 2012-11-20 14:43:33 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties 2012-12-07 21:28:50 +0000 @@ -6,7 +6,7 @@ no_page_specified=No page specified an_exception_occured=An exception occurred -exception_explanation_text=Sorry! The system failed to execute the operation. Usually, no data is lost and you can continue working by going back to the previous page. If you wish to report the incident, please save this page by choosing "File -> Save (page as)" in your browser and include the saved page in the report. The problem details are listed below. +exception_explanation_text=Sorry! The system failed to execute the operation. Usually, no data is lost and you can continue working by going back to the previous page. exception=Exception caused_by=Caused by unknown_source=Unknown source === modified file 'dhis-2/dhis-web/dhis-web-portal/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-portal/src/main/resources/META-INF/dhis/beans.xml 2012-10-23 14:04:27 +0000 +++ dhis-2/dhis-web/dhis-web-portal/src/main/resources/META-INF/dhis/beans.xml 2012-12-07 21:28:50 +0000 @@ -4,4 +4,15 @@ xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd"> + + + + + + runningAsPortal + true + + + + === modified file 'dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml' --- dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml 2012-12-06 21:55:24 +0000 +++ dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml 2012-12-07 21:28:50 +0000 @@ -154,11 +154,5 @@ webapi-fred /api-fred/* - - - - - java.lang.Throwable - /error.html - +