IDEMPIERE-187 Support developer to generate migration script from webui

This commit is contained in:
Heng Sin Low 2012-03-09 07:59:08 +08:00
parent 96687acab4
commit f9d7dd29ce
3 changed files with 17 additions and 4 deletions

View File

@ -435,7 +435,13 @@ public abstract class Convert
public static void logMigrationScript(String oraStatement, String pgStatement) {
// Check AdempiereSys
// check property Log migration script
boolean logMigrationScript = Ini.isPropertyBool(Ini.P_LOGMIGRATIONSCRIPT);
boolean logMigrationScript = false;
if (Ini.isClient()) {
logMigrationScript = Ini.isPropertyBool(Ini.P_LOGMIGRATIONSCRIPT);
} else {
String sysProperty = System.getProperty(Ini.P_LOGMIGRATIONSCRIPT);
logMigrationScript = "y".equalsIgnoreCase(sysProperty) || "true".equalsIgnoreCase(sysProperty);
}
if (logMigrationScript) {
if (dontLog(oraStatement))
return;

View File

@ -88,7 +88,16 @@ public class MSequence extends X_AD_Sequence
int retValue = -1;
// Check AdempiereSys
boolean adempiereSys = Ini.isPropertyBool(Ini.P_ADEMPIERESYS);
boolean adempiereSys = false;
if (Ini.isClient())
{
adempiereSys = Ini.isPropertyBool(Ini.P_ADEMPIERESYS);
}
else
{
String sysProperty = System.getProperty(Ini.P_ADEMPIERESYS);
adempiereSys = "y".equalsIgnoreCase(sysProperty) || "true".equalsIgnoreCase(sysProperty);
}
if (adempiereSys && AD_Client_ID > 11)
adempiereSys = false;
//

View File

@ -89,8 +89,6 @@ public class WebUIServlet extends DHtmlLayoutServlet
logger = CLogger.getCLogger(WebUIServlet.class);
// hengsin: temporary solution for problem with zk client
Ini.setProperty(Ini.P_ADEMPIERESYS, false);
logger.log(Level.OFF, "ADempiere web ui service started successfully");
/**
* End ADempiere Start