Update of
/var/cvs/contributions/CMSContainer_Portlets/portlets-jforum/src/java/net/jforum/view/install
In directory james.mmbase.org:/tmp/cvs-serv24724/net/jforum/view/install
Modified Files:
InstallAction.java
Log Message:
CMSC-915,JForum: externalize database and other configuration settings to the
context files
See also:
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Portlets/portlets-jforum/src/java/net/jforum/view/install
See also: http://www.mmbase.org/jira/browse/CMSC-915
Index: InstallAction.java
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer_Portlets/portlets-jforum/src/java/net/jforum/view/install/InstallAction.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- InstallAction.java 17 Jan 2008 08:04:50 -0000 1.1
+++ InstallAction.java 30 May 2008 07:53:49 -0000 1.2
@@ -84,12 +84,19 @@
* JForum Web Installer.
*
[EMAIL PROTECTED] Rafael Steil
- [EMAIL PROTECTED] $Id: InstallAction.java,v 1.1 2008/01/17 08:04:50 mguo
Exp $
+ [EMAIL PROTECTED] $Id: InstallAction.java,v 1.2 2008/05/30 07:53:49
kevinshen Exp $
*/
public class InstallAction extends Command {
private static Logger logger = Logger.getLogger(InstallAction.class);
+ public InstallAction(){
+ }
+
+ public InstallAction(ActionServletRequest request,SimpleHash context) {
+ this.request = request;
+ this.context = context;
+ }
/**
* Description of the Method
*
@@ -121,7 +128,6 @@
*/
public void doInstall() throws Exception {
Connection conn = null;
-
if (!this.checkForWritableDir()) {
return;
}
@@ -219,19 +225,18 @@
[EMAIL PROTECTED] Exception Description of Exception
*/
public void checkInformation() throws Exception {
- this.setTemplateName(TemplateKeys.INSTALL_CHECK_INFO);
-
- String language = this.request.getParameter("language");
- String database = this.request.getParameter("database");
- String dbHost = this.request.getParameter("dbhost");
- String dbUser = this.request.getParameter("dbuser");
- String dbName = this.request.getParameter("dbname");
- String dbPassword = this.request.getParameter("dbpasswd");
- String dbEncoding = this.request.getParameter("dbencoding");
- String dbEncodingOther =
this.request.getParameter("dbencoding_other");
- String usePool = this.request.getParameter("use_pool");
- String forumLink = this.request.getParameter("forum_link");
- String adminPassword = this.request.getParameter("admin_pass1");
+ //this.setTemplateName(TemplateKeys.INSTALL_CHECK_INFO);
+ String language =
this.request.getAttribute("language").toString();
+ String database =
this.request.getAttribute("database").toString();
+ String dbHost =
null;//this.request.getAttribute("dbhost").toString();
+ String dbUser =
null;//this.request.getAttribute("dbuser").toString();
+ String dbName =
null;//this.request.getAttribute("dbname").toString();
+ String dbPassword =
null;//this.request.getAttribute("dbpasswd").toString();
+ String dbEncoding =
this.request.getAttribute("dbencoding").toString();
+ String dbEncodingOther =
this.request.getAttribute("dbencoding_other").toString();
+ String usePool =
this.request.getAttribute("use_pool").toString();
+ String forumLink =
this.request.getAttribute("forum_link").toString();
+ String adminPassword =
this.request.getAttribute("admin_pass1").toString();
dbHost = this.notNullDefault(dbHost, "localhost");
dbEncodingOther = this.notNullDefault(dbEncodingOther, "utf-8");
@@ -258,10 +263,10 @@
this.addToSessionAndContext("dbEncoding", dbEncoding);
this.addToSessionAndContext("usePool", usePool);
this.addToSessionAndContext("forumLink", forumLink);
- this.addToSessionAndContext("siteLink",
this.request.getParameter("site_link"));
+ this.addToSessionAndContext("siteLink",
this.request.getAttribute("site_link").toString());
this.addToSessionAndContext("adminPassword", adminPassword);
- this.addToSessionAndContext("dbdatasource",
this.request.getParameter("dbdatasource"));
- this.addToSessionAndContext("db_connection_type",
this.request.getParameter("db_connection_type"));
+ this.addToSessionAndContext("dbdatasource",
this.request.getAttribute("dbdatasource").toString());
+ this.addToSessionAndContext("db_connection_type",
this.request.getAttribute("db_connection_type").toString());
this.addToSessionAndContext("configureDatabase", null);
this.addToSessionAndContext("createTables", null);
@@ -270,7 +275,7 @@
this.context.put("canWriteToWebInf", this.canWriteToWebInf());
this.context.put("canWriteToIndex", this.canWriteToIndex());
- this.context.put("moduleAction", "install_check_info.htm");
+ //this.context.put("moduleAction", "install_check_info.htm");
}
@@ -869,4 +874,7 @@
return value;
}
+ public void ignoreAction() {
+ super.ignoreAction();
+ }
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs