You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2023/10/09 06:22:50 UTC

[openmeetings] branch master updated: [OPENMEETINGS-2778] locale detection is fixed; build enhanced

This is an automated email from the ASF dual-hosted git repository.

solomax pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openmeetings.git


The following commit(s) were added to refs/heads/master by this push:
     new 5fce9e525 [OPENMEETINGS-2778] locale detection is fixed; build enhanced
5fce9e525 is described below

commit 5fce9e5257b5f7aba9a16ba4754eb1bb416c1a7b
Author: Maxim Solodovnik <so...@apache.org>
AuthorDate: Mon Oct 9 13:22:39 2023 +0700

    [OPENMEETINGS-2778] locale detection is fixed; build enhanced
---
 openmeetings-server/pom.xml                        | 20 +++------------
 .../apache/openmeetings/web/pages/HashPage.java    | 29 ++++++++++++----------
 2 files changed, 20 insertions(+), 29 deletions(-)

diff --git a/openmeetings-server/pom.xml b/openmeetings-server/pom.xml
index 80d975dc1..6308dc322 100644
--- a/openmeetings-server/pom.xml
+++ b/openmeetings-server/pom.xml
@@ -238,16 +238,18 @@
 						<id>get-tomcat</id>
 						<phase>process-resources</phase>
 						<goals>
-							<goal>copy</goal>
+							<goal>unpack</goal>
 						</goals>
 						<configuration>
-							<outputDirectory>${server-file.dir}</outputDirectory>
+							<outputDirectory>${project.build.directory}</outputDirectory>
 							<artifactItems>
 								<artifactItem>
 									<groupId>org.apache.tomcat</groupId>
 									<artifactId>tomcat</artifactId>
 									<version>${tomcat.version}</version>
 									<type>tar.gz</type>
+									<overWrite>true</overWrite>
+									<includes>**/*</includes>
 								</artifactItem>
 							</artifactItems>
 						</configuration>
@@ -352,20 +354,6 @@
 			<plugin>
 				<artifactId>maven-antrun-plugin</artifactId>
 				<executions>
-					<execution>
-						<id>unpack-web-server</id>
-						<phase>prepare-package</phase>
-						<goals>
-							<goal>run</goal>
-						</goals>
-						<configuration>
-							<target>
-								<untar src="${server-file.dir}/tomcat-${tomcat.version}.tar.gz" dest="${project.build.directory}"
-									compression="gzip" overwrite="true"/>
-							</target>
-							<skip>${om.quick.build}</skip>
-						</configuration>
-					</execution>
 					<execution>
 						<id>copy-site-site</id>
 						<phase>site</phase>
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/HashPage.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/HashPage.java
index 786d32cb9..498bc1177 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/HashPage.java
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/HashPage.java
@@ -73,7 +73,10 @@ public class HashPage extends BaseInitedPage implements IUpdatable {
 	private boolean error = true;
 	private MainPanel mainPanel = null;
 	private RoomPanel roomPanel = null;
-	private final PageParameters p;
+	private final StringValue secure;
+	private final StringValue invitation;
+	private final StringValue swf;
+	private final StringValue app;
 
 	@SpringBean
 	private RoomDao roomDao;
@@ -81,7 +84,18 @@ public class HashPage extends BaseInitedPage implements IUpdatable {
 	private RecordingDao recDao;
 
 	public HashPage(PageParameters p) {
-		this.p = p;
+		secure = p.get(HASH);
+		invitation = p.get(INVITATION_HASH);
+		swf = p.get(SWF);
+		app = swf.isEmpty() ? p.get(APP) : swf;
+
+		WebSession ws = WebSession.get();
+		ws.checkHashes(secure, invitation);
+		long lang = p.get(LANG).toLong(-1L);
+		if (lang > -1) {
+			ws.setLanguage(lang);
+			ws.setLocale(LocaleHelper.getLocale(lang));
+		}
 	}
 
 	private void createRoom(Long roomId) {
@@ -100,17 +114,8 @@ public class HashPage extends BaseInitedPage implements IUpdatable {
 	@Override
 	protected void onInitialize() {
 		super.onInitialize();
-		StringValue secure = p.get(HASH);
-		StringValue invitation = p.get(INVITATION_HASH);
 
 		WebSession ws = WebSession.get();
-		ws.checkHashes(secure, invitation);
-		long lang = p.get(LANG).toLong(-1L);
-		if (lang > -1) {
-			ws.setLanguage(lang);
-			ws.setLocale(LocaleHelper.getLocale(lang));
-		}
-
 		String errorMsg = getString("invalid.hash");
 		recContainer.setVisible(false);
 		add(new EmptyPanel(PANEL_MAIN).setVisible(false));
@@ -161,8 +166,6 @@ public class HashPage extends BaseInitedPage implements IUpdatable {
 			}
 		}
 
-		StringValue swf = p.get(SWF);
-		StringValue app = swf.isEmpty() ? p.get(APP) : swf;
 		if (!app.isEmpty()) {
 			if (APP_TYPE_NETWORK.equals(app.toString())) {
 				replace(new NetTestPanel(PANEL_MAIN).add(AttributeModifier.append("class", "app")));