details: /erp/erp/devel/pi/rev/6e7aeed85875 changeset: 4687:6e7aeed85875 user: Stefan Hühner <stefan.huehner <at> openbravo.com> date: Thu Aug 20 20:12:44 2009 +0200 summary: Issue 10340: Rename GetOpsLogo.png request by GetOpenbravoLogo.png as it better matches its use
diffstat: src-db/database/sourcedata/AD_MODEL_OBJECT.xml | 4 +- src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml | 2 +- src/org/openbravo/erpCommon/obps/ActivationKey.java | 1 - src/org/openbravo/erpCommon/obps/GetOpenbravoLogo.java | 79 +++++++++++++++++++ src/org/openbravo/erpCommon/obps/GetOpsLogo.java | 79 ------------------- web/skins/Default/Openbravo_ERP_250.css | 2 +- 6 files changed, 83 insertions(+), 84 deletions(-) diffs (218 lines): diff -r d40512d656e7 -r 6e7aeed85875 src-db/database/sourcedata/AD_MODEL_OBJECT.xml --- a/src-db/database/sourcedata/AD_MODEL_OBJECT.xml Thu Aug 20 19:39:05 2009 +0200 +++ b/src-db/database/sourcedata/AD_MODEL_OBJECT.xml Thu Aug 20 20:12:44 2009 +0200 @@ -17408,11 +17408,11 @@ <!--8993A79B45F8457CB56FC27F084FF5C6--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> <!--8993A79B45F8457CB56FC27F084FF5C6--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> <!--8993A79B45F8457CB56FC27F084FF5C6--> <ACTION><![CDATA[M]]></ACTION> -<!--8993A79B45F8457CB56FC27F084FF5C6--> <CLASSNAME><![CDATA[org.openbravo.erpCommon.obps.GetOpsLogo]]></CLASSNAME> +<!--8993A79B45F8457CB56FC27F084FF5C6--> <CLASSNAME><![CDATA[org.openbravo.erpCommon.obps.GetOpenbravoLogo]]></CLASSNAME> <!--8993A79B45F8457CB56FC27F084FF5C6--> <ISDEFAULT><![CDATA[N]]></ISDEFAULT> <!--8993A79B45F8457CB56FC27F084FF5C6--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> <!--8993A79B45F8457CB56FC27F084FF5C6--> <OBJECT_TYPE><![CDATA[S]]></OBJECT_TYPE> -<!--8993A79B45F8457CB56FC27F084FF5C6--> <NAME><![CDATA[GetOpsLogo]]></NAME> +<!--8993A79B45F8457CB56FC27F084FF5C6--> <NAME><![CDATA[GetOpenbravoLogo]]></NAME> <!--8993A79B45F8457CB56FC27F084FF5C6--></AD_MODEL_OBJECT> <!--8B195128618D46C9B146B8A845522ACA--><AD_MODEL_OBJECT> diff -r d40512d656e7 -r 6e7aeed85875 src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml --- a/src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml Thu Aug 20 19:39:05 2009 +0200 +++ b/src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml Thu Aug 20 20:12:44 2009 +0200 @@ -25406,7 +25406,7 @@ <!--372045A027A74A08B6EBE5761AE7F061--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> <!--372045A027A74A08B6EBE5761AE7F061--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> <!--372045A027A74A08B6EBE5761AE7F061--> <AD_MODEL_OBJECT_ID><![CDATA[8993A79B45F8457CB56FC27F084FF5C6]]></AD_MODEL_OBJECT_ID> -<!--372045A027A74A08B6EBE5761AE7F061--> <MAPPINGNAME><![CDATA[/utility/GetOpsLogo.png]]></MAPPINGNAME> +<!--372045A027A74A08B6EBE5761AE7F061--> <MAPPINGNAME><![CDATA[/utility/GetOpenbravoLogo.png]]></MAPPINGNAME> <!--372045A027A74A08B6EBE5761AE7F061--> <ISDEFAULT><![CDATA[N]]></ISDEFAULT> <!--372045A027A74A08B6EBE5761AE7F061--></AD_MODEL_OBJECT_MAPPING> diff -r d40512d656e7 -r 6e7aeed85875 src/org/openbravo/erpCommon/obps/ActivationKey.java --- a/src/org/openbravo/erpCommon/obps/ActivationKey.java Thu Aug 20 19:39:05 2009 +0200 +++ b/src/org/openbravo/erpCommon/obps/ActivationKey.java Thu Aug 20 20:12:44 2009 +0200 @@ -196,7 +196,6 @@ } isActive = true; setLogger(); - System.out.println(getProperty("customer")); OBContext.getOBContext().setInAdministratorMode(adminMode); } diff -r d40512d656e7 -r 6e7aeed85875 src/org/openbravo/erpCommon/obps/GetOpenbravoLogo.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/openbravo/erpCommon/obps/GetOpenbravoLogo.java Thu Aug 20 20:12:44 2009 +0200 @@ -0,0 +1,79 @@ +/* + ************************************************************************* + * The contents of this file are subject to the Openbravo Public License + * Version 1.0 (the "License"), being the Mozilla Public License + * Version 1.1 with a permitted attribution clause; you may not use this + * file except in compliance with the License. You may obtain a copy of + * the License at http://www.openbravo.com/legal/license.html + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * The Original Code is Openbravo ERP. + * The Initial Developer of the Original Code is Openbravo SL + * All portions are Copyright (C) 2009 Openbravo SL + * All Rights Reserved. + * Contributor(s): ______________________________________. + ************************************************************************ + */ + +package org.openbravo.erpCommon.obps; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.openbravo.base.HttpBaseServlet; +import org.openbravo.dal.core.OBContext; +import org.openbravo.utils.FileUtility; + +/** + * Servlet which returns the openbravo logo image. Depending on instance activation status either + * the ops image or the normal powered by openbravo image is returned. + * + * @author huehner + * + */ +public class GetOpenbravoLogo extends HttpBaseServlet { + private static final long serialVersionUID = 1L; + + public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, + ServletException { + + String communityLogo = "PoweredByOpenbravo.png"; + String opsLogo = "PoweredByOpenbravoOPS.png"; + + // get instance active status from db + boolean active = false; + OBContext.setAdminContext(); + try { + ActivationKey ak = new ActivationKey(); + active = ak.isActive(); + log4j.debug("GetOpsLogo: activated: " + active); + } finally { + OBContext.setOBContext((OBContext) null); + } + + String activeLogo; + if (active) { + activeLogo = opsLogo; + } else { + activeLogo = communityLogo; + } + + FileUtility f = new FileUtility(this.globalParameters.prefix + "web/images", activeLogo, false, + true); + response.setContentType("image/png"); + // mark response as cache-forever + response.addHeader("Expires", "Sun, 17 Jan 2038 19:14:07 GMT"); + response.addHeader("Cache-Control", "public"); + + f.dumpFile(response.getOutputStream()); + response.getOutputStream().flush(); + response.getOutputStream().close(); + + } + +} diff -r d40512d656e7 -r 6e7aeed85875 src/org/openbravo/erpCommon/obps/GetOpsLogo.java --- a/src/org/openbravo/erpCommon/obps/GetOpsLogo.java Thu Aug 20 19:39:05 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -/* - ************************************************************************* - * The contents of this file are subject to the Openbravo Public License - * Version 1.0 (the "License"), being the Mozilla Public License - * Version 1.1 with a permitted attribution clause; you may not use this - * file except in compliance with the License. You may obtain a copy of - * the License at http://www.openbravo.com/legal/license.html - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. - * The Original Code is Openbravo ERP. - * The Initial Developer of the Original Code is Openbravo SL - * All portions are Copyright (C) 2009 Openbravo SL - * All Rights Reserved. - * Contributor(s): ______________________________________. - ************************************************************************ - */ - -package org.openbravo.erpCommon.obps; - -import java.io.IOException; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.openbravo.base.HttpBaseServlet; -import org.openbravo.dal.core.OBContext; -import org.openbravo.utils.FileUtility; - -/** - * Servlet which returns the openbravo logo image. Depending on instance activation status either - * the ops image or the normal powered by openbravo image is returned. - * - * @author huehner - * - */ -public class GetOpsLogo extends HttpBaseServlet { - private static final long serialVersionUID = 1L; - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, - ServletException { - - String communityLogo = "PoweredByOpenbravo.png"; - String opsLogo = "PoweredByOpenbravoOPS.png"; - - // get instance active status from db - boolean active = false; - OBContext.setAdminContext(); - try { - ActivationKey ak = new ActivationKey(); - active = ak.isActive(); - log4j.debug("GetOpsLogo: activated: " + active); - } finally { - OBContext.setOBContext((OBContext) null); - } - - String activeLogo; - if (active) { - activeLogo = opsLogo; - } else { - activeLogo = communityLogo; - } - - FileUtility f = new FileUtility(this.globalParameters.prefix + "web/images", activeLogo, false, - true); - response.setContentType("image/png"); - // mark response as cache-forever - response.addHeader("Expires", "Sun, 17 Jan 2038 19:14:07 GMT"); - response.addHeader("Cache-Control", "public"); - - f.dumpFile(response.getOutputStream()); - response.getOutputStream().flush(); - response.getOutputStream().close(); - - } - -} diff -r d40512d656e7 -r 6e7aeed85875 web/skins/Default/Openbravo_ERP_250.css --- a/web/skins/Default/Openbravo_ERP_250.css Thu Aug 20 19:39:05 2009 +0200 +++ b/web/skins/Default/Openbravo_ERP_250.css Thu Aug 20 20:12:44 2009 +0200 @@ -5437,7 +5437,7 @@ height: 34px; background-repeat: no-repeat; background-position: center center; - background-image: url(../../../../utility/GetOpsLogo.png); + background-image: url(../../../../utility/GetOpenbravoLogo.png); } .Main_NavBar_separator_cell { ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits