From ba5b7604803db32b174728c29701cbf041ccd357 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 26 Sep 2013 17:34:39 -0500 Subject: [PATCH] IDEMPIERE-1184 Register browser information available on AD_Session --- .../i1.0z/oracle/201309261730_IDEMPIERE-1184.sql | 13 +++++++++++++ .../postgresql/201309261730_IDEMPIERE-1184.sql | 13 +++++++++++++ .../src/org/adempiere/webui/AdempiereWebUI.java | 4 ++++ 3 files changed, 30 insertions(+) create mode 100644 migration/i1.0z/oracle/201309261730_IDEMPIERE-1184.sql create mode 100644 migration/i1.0z/postgresql/201309261730_IDEMPIERE-1184.sql diff --git a/migration/i1.0z/oracle/201309261730_IDEMPIERE-1184.sql b/migration/i1.0z/oracle/201309261730_IDEMPIERE-1184.sql new file mode 100644 index 0000000000..e2f95094d7 --- /dev/null +++ b/migration/i1.0z/oracle/201309261730_IDEMPIERE-1184.sql @@ -0,0 +1,13 @@ +-- Jul 17, 2013 3:14:50 PM COT +-- IDEMPIERE-1184 Register browser information available on AD_Session +UPDATE AD_Column SET FieldLength=2000,Updated=TO_DATE('2013-07-17 15:14:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=54349 +; + +-- Jul 17, 2013 3:14:55 PM COT +-- IDEMPIERE-1184 Register browser information available on AD_Session +ALTER TABLE AD_Session MODIFY Description NVARCHAR2(2000) DEFAULT NULL +; + +SELECT register_migration_script('201309261730_IDEMPIERE-1184.sql') FROM dual +; + diff --git a/migration/i1.0z/postgresql/201309261730_IDEMPIERE-1184.sql b/migration/i1.0z/postgresql/201309261730_IDEMPIERE-1184.sql new file mode 100644 index 0000000000..c08339c0fc --- /dev/null +++ b/migration/i1.0z/postgresql/201309261730_IDEMPIERE-1184.sql @@ -0,0 +1,13 @@ +-- Jul 17, 2013 3:14:50 PM COT +-- IDEMPIERE-1184 Register browser information available on AD_Session +UPDATE AD_Column SET FieldLength=2000,Updated=TO_TIMESTAMP('2013-07-17 15:14:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=54349 +; + +-- Jul 17, 2013 3:14:55 PM COT +-- IDEMPIERE-1184 Register browser information available on AD_Session +INSERT INTO t_alter_column values('ad_session','Description','VARCHAR(2000)',null,'NULL') +; + +SELECT register_migration_script('201309261730_IDEMPIERE-1184.sql') FROM dual +; + diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java index 3fd0ecc6e8..0fd0358742 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java @@ -216,6 +216,10 @@ public class AdempiereWebUI extends Window implements EventListener, IWeb MSession mSession = MSession.get (ctx, x_Forward_IP!=null ? x_Forward_IP : currSess.getRemoteAddr(), currSess.getRemoteHost(), httpSess.getId() ); + if (clientInfo.userAgent != null) { + mSession.setDescription(mSession.getDescription() + "\n" + clientInfo.toString()); + mSession.saveEx(); + } currSess.setAttribute("Check_AD_User_ID", Env.getAD_User_ID(ctx));