Index: portal-impl/impl/src/java/org/sakaiproject/portal/charon/handlers/PageHandler.java =================================================================== --- portal-impl/impl/src/java/org/sakaiproject/portal/charon/handlers/PageHandler.java (revision 130307) +++ portal-impl/impl/src/java/org/sakaiproject/portal/charon/handlers/PageHandler.java (working copy) @@ -22,7 +22,9 @@ package org.sakaiproject.portal.charon.handlers; import java.io.IOException; +import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.List; @@ -61,6 +63,13 @@ private static final Log log = LogFactory.getLog(PageHandler.class); private static final String URL_FRAGMENT = "page"; + + /** + * sfoster9 + * Keyword to look for in sakai.properties copyright message to replace + * for the server's time's year for auto-update of Copyright end date + */ + private static final String SERVER_COPYRIGHT_CURRENT_YEAR_KEYWORD = "currentYearFromServer"; public PageHandler() { @@ -266,6 +275,15 @@ String copyright = ServerConfigurationService .getString("bottom.copyrighttext"); + /** + * sfoster9 + * Replace keyword in copyright message from sakai.properties + * with the server's current year to auto-update of Copyright end date + */ + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy"); + String currentServerYear = simpleDateFormat.format(new Date()); + copyright = copyright.replaceAll(SERVER_COPYRIGHT_CURRENT_YEAR_KEYWORD, currentServerYear); + String service = ServerConfigurationService.getString("ui.service", "Sakai"); String serviceVersion = ServerConfigurationService.getString( Index: portal-impl/impl/src/java/org/sakaiproject/portal/charon/SkinnableCharonPortal.java =================================================================== --- portal-impl/impl/src/java/org/sakaiproject/portal/charon/SkinnableCharonPortal.java (revision 130307) +++ portal-impl/impl/src/java/org/sakaiproject/portal/charon/SkinnableCharonPortal.java (working copy) @@ -32,6 +32,7 @@ import java.util.Map; import java.util.Properties; import java.util.TimeZone; +import java.text.SimpleDateFormat; import javax.servlet.ServletConfig; import javax.servlet.ServletException; @@ -168,6 +169,13 @@ private PortalService portalService; private SecurityService securityService = null; + + /** + * sfoster9 + * Keyword to look for in sakai.properties copyright message to replace + * for the server's time's year for auto-update of Copyright end date + */ + private static final String SERVER_COPYRIGHT_CURRENT_YEAR_KEYWORD = "currentYearFromServer"; /** * Chat helper. @@ -1640,6 +1648,17 @@ String copyright = ServerConfigurationService .getString("bottom.copyrighttext"); + + + /** + * sfoster9 + * Replace keyword in copyright message from sakai.properties + * with the server's current year to auto-update of Copyright end date + */ + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy"); + String currentServerYear = simpleDateFormat.format(new Date()); + copyright = copyright.replaceAll(SERVER_COPYRIGHT_CURRENT_YEAR_KEYWORD, currentServerYear); + String service = ServerConfigurationService.getString("ui.service", "Sakai"); String serviceVersion = ServerConfigurationService.getString( "version.service", "?");