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 2012/07/19 08:15:50 UTC

svn commit: r1363229 - /incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/installation/ImportInitvalues.java

Author: solomax
Date: Thu Jul 19 06:15:50 2012
New Revision: 1363229

URL: http://svn.apache.org/viewvc?rev=1363229&view=rev
Log:
Default (localhost) server was not created on system restore via admin.

Modified:
    incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/installation/ImportInitvalues.java

Modified: incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/installation/ImportInitvalues.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/installation/ImportInitvalues.java?rev=1363229&r1=1363228&r2=1363229&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/installation/ImportInitvalues.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/installation/ImportInitvalues.java Thu Jul 19 06:15:50 2012
@@ -1023,11 +1023,11 @@ public class ImportInitvalues {
 	}
 	// ------------------------------------------------------------------------------
 
-	public void loadSystem(InstallationConfig cfg, boolean force) throws Exception {
+	public Server loadSystem(InstallationConfig cfg, boolean force) throws Exception {
 		//FIXME dummy check if installation was performed before
 		if(!force && usersDao.getAllUsers().size() > 0) {
 			log.debug("System contains users, no need to install data one more time.");
-			return;
+			return null;
 		}
 		loadMainMenu();
 		loadErrorMappingsFromXML();
@@ -1042,6 +1042,8 @@ public class ImportInitvalues {
 		loadRoomTypes();
 		
 		loadConfiguration(cfg);
+		
+		return serverDao.saveServer(-1, "local", "localhost");
 	}
 	
 	public void loadAll(InstallationConfig cfg, String username,
@@ -1051,8 +1053,7 @@ public class ImportInitvalues {
 			log.debug("System contains users, no need to install data one more time.");
 			return;
 		}
-		loadSystem(cfg, force);
-		Server s = serverDao.saveServer(-1, "local", "localhost");
+		Server s = loadSystem(cfg, force);
 		loadInitUserAndOrganisation(username,
 				userpass, useremail, groupame, timeZone, cfg.defaultLangId, s);