[newupgrade] Fixed even more and more changes.
authorAntonio Moreno <antonio.moreno@openbravo.com>
Mon, 30 Nov 2009 19:03:29 +0100
changeset 5615 339f89761f1b
parent 5614 6d27bbb3fc03
child 5616 a338adfec049
[newupgrade] Fixed even more and more changes.
build.xml
legal/Licensing.txt
src/org/openbravo/erpCommon/ad_forms/ShowLogFile.java
src/org/openbravo/erpCommon/ad_forms/ShowLogFile.xml
src/org/openbravo/erpCommon/ad_process/ApplyModules.html
src/org/openbravo/erpCommon/ad_process/ApplyModules.java
src/org/openbravo/service/dataset/DataSetService.java
--- a/build.xml	Mon Nov 30 15:47:33 2009 +0100
+++ b/build.xml	Mon Nov 30 19:03:29 2009 +0100
@@ -252,6 +252,7 @@
 
     <ant dir="${base.src}" target="smartbuild" inheritAll="true" inheritRefs="true" />
 
+    <ant dir="${base.db}" target="setApplied" inheritAll="true" inheritRefs="true" />
     <antcall target="build.deploy" />
     <!-- only restart tomcat if the restart prop was set to true -->
     <condition property="dorestart">
@@ -498,7 +499,8 @@
   </target>
 
   <target name="install.source" depends="init, create.database, wad.lib, trl.lib, compile.complete.deploy">
-    
+
+    <ant dir="${base.db}" target="setApplied" inheritAll="true" inheritRefs="true" />
     <echo message="applying modules" />    
     <antcall inheritall="true" inheritrefs="true" target="apply.module" />
 
--- a/legal/Licensing.txt	Mon Nov 30 15:47:33 2009 +0100
+++ b/legal/Licensing.txt	Mon Nov 30 19:03:29 2009 +0100
@@ -85,6 +85,7 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: (http://developer.yahoo.net/yui/license.txt)
 
 # ant-1.6.5.jar
+# ant-apache-log4j.jar
 # ant-launcher.jar
 # ant-nodeps.jar
 # avalon-framework-4.1.5.jar
--- a/src/org/openbravo/erpCommon/ad_forms/ShowLogFile.java	Mon Nov 30 15:47:33 2009 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/ShowLogFile.java	Mon Nov 30 19:03:29 2009 +0100
@@ -30,7 +30,6 @@
 
 import org.openbravo.base.secureApp.HttpSecureAppServlet;
 import org.openbravo.base.secureApp.VariablesSecureApp;
-import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.xmlEngine.XmlDocument;
 
 public class ShowLogFile extends HttpSecureAppServlet {
@@ -46,28 +45,12 @@
     try {
       Long.parseLong(filePath);
     } catch (NumberFormatException e) {
-      final XmlDocument xmlDocument = xmlEngine.readXmlTemplate(
-          "org/openbravo/erpCommon/ad_forms/ShowLogFile").createXmlDocument();
-
-      xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n");
-      xmlDocument.setParameter("language", "defaultLang=\"" + vars.getLanguage() + "\";");
-      xmlDocument.setParameter("theme", vars.getTheme());
-      xmlDocument.setParameter("messageType", "Error");
-      xmlDocument.setParameter("messageTitle", Utility.messageBD(this, "InvalidFilePath", vars
-          .getLanguage()));
-      xmlDocument.setParameter("messageMessage", Utility.messageBD(this, "InvalidFilePath", vars
-          .getLanguage()));
-      final PrintWriter out = response.getWriter();
-
-      out.println(xmlDocument.print());
-
-      out.close();
-      return;
+      throw new ServletException("Invalid file path");
     }
     File file = new File(vars.getSessionValue("#sourcePath") + "/log/" + filePath + "-apply.log");
 
     final XmlDocument xmlDocument = xmlEngine.readXmlTemplate(
-        "org/openbravo/erpCommon/utility/ShowFile").createXmlDocument();
+        "org/openbravo/erpCommon/ad_forms/ShowLogFile").createXmlDocument();
     xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n");
     xmlDocument.setParameter("language", "defaultLang=\"" + vars.getLanguage() + "\";");
     xmlDocument.setParameter("theme", vars.getTheme());
--- a/src/org/openbravo/erpCommon/ad_forms/ShowLogFile.xml	Mon Nov 30 15:47:33 2009 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/ShowLogFile.xml	Mon Nov 30 19:03:29 2009 +0100
@@ -18,7 +18,7 @@
  ************************************************************************
 -->
 <REPORT>
-  <template file="ShowFile.html"/>
+  <template file="ShowLogFile.html"/>
   <PARAMETER id="paramLanguage" name="language" default=""/>
   <PARAMETER id="messageBoxID" name="messageType" attribute="class" replace="yy" default="HIDDEN"/>
   <PARAMETER id="messageBoxIDTitle" name="messageTitle" default=""/>
--- a/src/org/openbravo/erpCommon/ad_process/ApplyModules.html	Mon Nov 30 15:47:33 2009 +0100
+++ b/src/org/openbravo/erpCommon/ad_process/ApplyModules.html	Mon Nov 30 19:03:29 2009 +0100
@@ -397,6 +397,7 @@
     function onUnloadDo() {
       try {
         top.opener.setProcessingMode('window', false);
+        reloadOpener();
       }
       catch (e) {}
     }
@@ -575,6 +576,8 @@
               </tr>
               <tr>
                 <td style="height: 20px;"></td>
+              </tr>
+              <tr>
                 <td class="Button_RightAlign_ContentCell">
                   <div>
                     <button type="button"
--- a/src/org/openbravo/erpCommon/ad_process/ApplyModules.java	Mon Nov 30 15:47:33 2009 +0100
+++ b/src/org/openbravo/erpCommon/ad_process/ApplyModules.java	Mon Nov 30 19:03:29 2009 +0100
@@ -348,7 +348,7 @@
       Properties props = new Properties();
       props.setProperty("log4j.appender.DB", "org.openbravo.utils.OBRebuildAppender");
       props.setProperty("log4j.appender.DB.Basedir", vars.getSessionValue("#sourcePath"));
-      props.setProperty("log4j.rootCategory", "INFO,R,DB");
+      props.setProperty("log4j.rootCategory", "INFO,DB");
       PropertyConfigurator.configure(props);
 
       ant = new AntExecutor(vars.getSessionValue("#sourcePath"));
@@ -358,7 +358,7 @@
 
       ant.setLogFile(vars.getStringParameter("logfile"));
 
-      // do not execute tranlsation process (all entries should be already in the module)
+      // do not execute translation process (all entries should be already in the module)
       ant.setProperty("tr", "no");
 
       final Vector<String> tasks = new Vector<String>();
--- a/src/org/openbravo/service/dataset/DataSetService.java	Mon Nov 30 15:47:33 2009 +0100
+++ b/src/org/openbravo/service/dataset/DataSetService.java	Mon Nov 30 19:03:29 2009 +0100
@@ -117,13 +117,12 @@
       List<?> list = obc.list();
       if (obc.count() < 20 && obc.count() > 0) {
         log
-            .error("The following rows were changed after your last update.database or export.database:");
+            .warn("The following rows were changed after your last update.database or export.database:");
         for (Object obj : list) {
-          log.error("     -" + obj);
+          log.warn("     -" + obj);
         }
       } else if (obc.count() > 20) {
-        log.error("Rows inside the table "
-            + ((BaseOBObject) list.get(0)).getEntity().getTableName()
+        log.warn("Rows inside the table " + ((BaseOBObject) list.get(0)).getEntity().getTableName()
             + " were changed after your last update.database or export.database:");
       }
       if (obc.count() > 0) {