issue 46 Validator apply install module.

viewing error message debug


git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8506 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2011-06-17 09:58:36 +00:00
parent 077e931a2e
commit b4f4afcc17
25 changed files with 237 additions and 41 deletions

View file

@ -9,11 +9,15 @@
<action name="dispInstallDBForm" type="view" standalone="true" />
<action name="dispInstallConfigForm" type="view" standalone="true" />
<action name="dispInstallManagerForm" type="view" standalone="true" />
<action name="procInstallAgreement" type="controller" standalone="true" />
<action name="procDBSetting" type="controller" standalone="true" />
<action name="procConfigSetting" type="controller" standalone="true" />
<action name="procInstall" type="controller" standalone="true" />
<action name="procCubridDBSetting" type="controller" standalone="true" ruleset="cubrid" />
<action name="procFirebirdDBSetting" type="controller" standalone="true" ruleset="firebird" />
<action name="procMssqlDBSetting" type="controller" standalone="true" ruleset="mssql" />
<action name="procMysqlDBSetting" type="controller" standalone="true" ruleset="mysql" />
<action name="procPostgresqlDBSetting" type="controller" standalone="true" ruleset="postgresql" />
<action name="procSqliteDBSetting" type="controller" standalone="true" ruleset="sqlite" />
<action name="procConfigSetting" type="controller" standalone="true" ruleset="config" />
<action name="procInstall" type="controller" standalone="true" ruleset="install" />
<action name="procInstallFTP" type="controller" standalone="true" />
<action name="procInstallCheckFTP" type="controller" standalone="true" />
<action name="procInstallAdminInstall" type="controller" standalone="true" />

View file

@ -39,10 +39,64 @@
header('location:'.$url);
}
/**
* @brief cubrid db setting wrapper, becase Server Side Validator...
* Server Side Validatro can use only one proc, one ruleset
**/
function procCubridDBSetting()
{
return $this->_procDBSetting();
}
/**
* @brief firebird db setting wrapper, becase Server Side Validator...
* Server Side Validatro can use only one proc, one ruleset
**/
function procFirebirdDBSetting()
{
return $this->_procDBSetting();
}
/**
* @brief mssql db setting wrapper, becase Server Side Validator...
* Server Side Validatro can use only one proc, one ruleset
**/
function procMssqlDBSetting()
{
return $this->_procDBSetting();
}
/**
* @brief mysql db setting wrapper, becase Server Side Validator...
* Server Side Validatro can use only one proc, one ruleset
**/
function procMysqlDBSetting()
{
return $this->_procDBSetting();
}
/**
* @brief postgresql db setting wrapper, becase Server Side Validator...
* Server Side Validatro can use only one proc, one ruleset
**/
function procPostgresqlDBSetting()
{
return $this->_procDBSetting();
}
/**
* @brief sqlite db setting wrapper, becase Server Side Validator...
* Server Side Validatro can use only one proc, one ruleset
**/
function procSqliteDBSetting()
{
return $this->_procDBSetting();
}
/**
* @brief division install step... DB Config temp file create
**/
function procDBSetting() {
function _procDBSetting() {
// Get DB-related variables
$db_info = Context::gets('db_type','db_port','db_hostname','db_userid','db_password','db_database','db_table_prefix');
if(!$db_info->default_url) $db_info->default_url = Context::getRequestUri();
@ -54,13 +108,20 @@
$oDB = &DB::getInstance();
// Check if available to connect to the DB
$output = $oDB->getError();
if(!$output->toBool()) return $output;
if(!$oDB->isConnected()) return $oDB->getError();
// When installing firebire DB, transaction will not be used
// When installing firebird DB, transaction will not be used
if($db_info->db_type != "firebird") $oDB->begin();
if($db_info->db_type != "firebird") $oDB->commit();
// Create a db temp config file
if(!$this->makeDBConfigFile()) return new Object(-1, 'msg_install_failed');
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'act', 'dispInstallConfigForm');
header('location:'.$returnUrl);
return;
}
}
/**
@ -73,6 +134,12 @@
// Create a db temp config file
if(!$this->makeEtcConfigFile($config_info)) return new Object(-1, 'msg_install_failed');
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'act', 'dispInstallManagerForm');
header('location:'.$returnUrl);
return;
}
}
/**
@ -116,6 +183,12 @@
// Display a message that installation is completed
$this->setMessage('msg_install_completed');
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('');
header('location:'.$returnUrl);
return;
}
}
/**

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<ruleset version="1.5.0">
<customrules>
</customrules>
<fields>
<field name="time_zone" required="true" />
</fields>
</ruleset>

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<ruleset version="1.5.0">
<customrules>
</customrules>
<fields>
<field name="db_type" required="true" default="mysql" />
<field name="db_hostname" required="true" length="1:250" default="localhost" />
<field name="db_port" required="true" length="1:250" rule="number" default="3306" />
<field name="db_userid" required="true" length="1:250" rule="alpha_number" />
<field name="db_password" required="true" length="1:250"/>
<field name="db_database" required="true" length="1:250" />
<field name="db_table_prefix" required="true" length="2:20" rule="alpha" default="xe" />
</fields>
</ruleset>

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<ruleset version="1.5.0">
<customrules>
</customrules>
<fields>
<field name="db_type" required="true" default="mysql" />
<field name="db_hostname" required="true" length="1:250" default="localhost" />
<field name="db_port" required="true" length="1:250" rule="number" default="3306" />
<field name="db_userid" required="true" length="1:250" rule="alpha_number" />
<field name="db_password" required="true" length="1:250"/>
<field name="db_database" required="true" length="1:250" />
<field name="db_table_prefix" required="true" length="2:20" rule="alpha" default="xe" />
</fields>
</ruleset>

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<ruleset version="1.5.0">
<customrules>
</customrules>
<fields>
<field name="user_id" required="true" length="2:20" rule="userid" />
<field name="password" required="true" length="1:20" />
<field name="password2" required="true" length="1:20" equalto="password" />
<field name="user_name" required="true" length="2:20" />
<field name="nick_name" required="true" length="2:20" />
<field name="email_address" required="true" length="1:20" rule="email" />
</fields>
</ruleset>

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<ruleset version="1.5.0">
<customrules>
</customrules>
<fields>
<field name="db_type" required="true" default="mysql" />
<field name="db_hostname" required="true" length="1:250" default="localhost" />
<field name="db_port" required="true" length="1:250" rule="number" default="3306" />
<field name="db_userid" required="true" length="1:250" rule="alpha_number" />
<field name="db_password" required="true" length="1:250"/>
<field name="db_database" required="true" length="1:250" />
<field name="db_table_prefix" required="true" length="2:20" rule="alpha" default="xe" />
</fields>
</ruleset>

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<ruleset version="1.5.0">
<customrules>
</customrules>
<fields>
<field name="db_type" required="true" default="mysql" />
<field name="db_hostname" required="true" length="1:250" default="localhost" />
<field name="db_port" required="true" length="1:250" rule="number" default="3306" />
<field name="db_userid" required="true" length="1:250" rule="alpha_number" />
<field name="db_password" required="true" length="1:250"/>
<field name="db_database" required="true" length="1:250" />
<field name="db_table_prefix" required="true" length="2:20" rule="alpha" default="xe" />
</fields>
</ruleset>

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<ruleset version="1.5.0">
<customrules>
</customrules>
<fields>
<field name="db_type" required="true" default="mysql" />
<field name="db_hostname" required="true" length="1:250" default="localhost" />
<field name="db_port" required="true" length="1:250" rule="number" default="3306" />
<field name="db_userid" required="true" length="1:250" rule="alpha_number" />
<field name="db_password" required="true" length="1:250"/>
<field name="db_database" required="true" length="1:250" />
<field name="db_table_prefix" required="true" length="2:20" rule="alpha" default="xe" />
</fields>
</ruleset>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<ruleset version="1.5.0">
<customrules>
</customrules>
<fields>
<field name="db_type" required="true" default="mysql" />
<field name="db_database_file" required="true" length="1:250" />
<field name="db_table_prefix" required="true" length="2:20" rule="alpha" default="xe" />
</fields>
</ruleset>

View file

@ -1,16 +1,17 @@
<!--%import("filter/admin.xml")-->
<!--%import("js/install_admin.js")-->
<!--#include("header.html")-->
<div id="body">
<!--#include("progress_menu.html")-->
<span class="dummy"></span>
<div id="content">
<form action="./" method="post" onsubmit="return procFilter(this, install)">
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
<form rule="install" action="./" method="post">
<input type="hidden" name="act" value="procInstall" />
<ul class="form formAdmin">
<li><label for="aId">{$lang->user_id}</label><input name="user_id" type="text" value="admin" class="iText" id="aId" /></li>
<li><label for="aPw1">{$lang->password1}</label><input name="password1" type="password" class="iText" id="aPw1" /></li>
<li><label for="aPw1">{$lang->password1}</label><input name="password" type="password" class="iText" id="aPw1" /></li>
<li><label for="aPw2">{$lang->password2}</label><input name="password2" type="password" class="iText" id="aPw2" /></li>
<li><label for="aName">{$lang->user_name}</label><input name="user_name" type="text" class="iText" id="aName" /></li>
<li><label for="aName">{$lang->user_name}</label><input name="user_name" type="text" class="iText" id="aName" value="" /></li>
<li><label for="aNick">{$lang->nick_name}</label><input name="nick_name" type="text" class="iText" id="aNick" /></li>
<li><label for="aMail">{$lang->email_address}</label><input name="email_address" type="text" class="iText" id="aMail" /></li>
</ul>

View file

@ -1,11 +1,12 @@
<!--%import("filter/config.xml")-->
<!--%import("js/install_admin.js")-->
<!--#include("header.html")-->
<div id="body">
<!--#include("progress_menu.html")-->
<span class="dummy"></span>
<div id="content">
<form action="./" method="post" onsubmit="return procFilter(this, config)">
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
<form action="./" method="post">
<input type="hidden" name="act" value="procConfigSetting" />
<ul class="form formXe">
<li>
<input name="use_rewrite" value="Y" <!--@if(function_exists('apache_get_modules')&&in_array('mod_rewrite',apache_get_modules()))-->checked="checked"<!--@end--> type="checkbox" class="iCheck" id="rewrite" /> <label for="rewrite">{$lang->use_rewrite}</label>

View file

@ -75,7 +75,7 @@ html{height:100%;background:url(../img/bgHtml.gif) repeat-x 0 0}
.select div.myValue{height:19px;text-indent:8px}
.select .ctrl{position:absolute;top:0;right:0;width:18px;height:19px;border:1px solid #999;border-left:1px solid #999;background:#444}
.select .arrow{position:absolute;width:0;height:0;top:9px;right:6px;line-height:0;font-size:0;border-top:3px solid #999;border-left:3px solid #444;border-right:3px solid #444}
.select ul{position:absolute;top:20px;left:0;width:100%;list-style:none;border:0;border-top:1px solid #bababa;border-bottom:1px solid #bababa;background:#fff;overflow:hidden}
.select ul{position:absolute;top:20px;left:0;width:100%;list-style:none;border:0;border-top:1px solid #bababa;border-bottom:1px solid #bababa;background:#fff;overflow:auto;height:200px;}
.select ul.aList{display:none}
.select.open ul.aList{display:block}
.select ul.iList{left:-2000%}
@ -110,4 +110,4 @@ html{height:100%;background:url(../img/bgHtml.gif) repeat-x 0 0}
.agreement label{font-weight:bold;vertical-align:middle;cursor:pointer}
.agreement a{color:#6CF;text-decoration:underline;vertical-align:middle}
.agreement em{color:#f60}
.agreement p{line-height:1.5}
.agreement p{line-height:1.5}

View file

@ -1,16 +1,18 @@
<!--%import("filter/cubrid.xml")-->
<!--%import("js/install_admin.js")-->
<!--#include("header.html")-->
<div id="body">
<!--#include("progress_menu.html")-->
<span class="dummy"></span>
<div id="content">
<form action="./" method="post" onsubmit="return procFilter(this, dbSetting)">
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
<form rule="cubrid" action="./" method="post">
<input type="hidden" value="{getUrl('', 'act', $act, 'db_type', $db_type)}" name="error_return_url">
<input type="hidden" name="act" value="procCubridDBSetting" />
<input type="hidden" name="db_type" value="{$db_type}" />
<h2 class="h2">{$db_type}</h2>
<ul class="form formDbInfo">
<li><label for="dbHostName">{$lang->db_hostname}</label><input name="db_hostname" value="localhost" type="text" class="iText" id="dbHostName" /></li>
<li><label for="dbPort">{$lang->db_port}</label><input name="db_port" value="3306" type="text" class="iText" id="dbPort" /></li>
<li><label for="dbHostName">{$lang->db_hostname}</label><input name="db_hostname" value="127.0.0.1" type="text" class="iText" id="dbHostName" /></li>
<li><label for="dbPort">{$lang->db_port}</label><input name="db_port" value="33000" type="text" class="iText" id="dbPort" /></li>
<li><label for="dbId">{$lang->db_userid}</label><input name="db_userid" type="text" class="iText" id="dbId" /></li>
<li><label for="dbPw">{$lang->db_password}</label><input name="db_password" type="password" class="iText" id="dbPw" /></li>
<li><label for="dbName">{$lang->db_database}</label><input name="db_database" type="text" class="iText" id="dbName" /></li>

View file

@ -1,11 +1,12 @@
<!--%import("filter/firebird.xml")-->
<!--%import("js/install_admin.js")-->
<!--#include("header.html")-->
<div id="body">
<!--#include("progress_menu.html")-->
<span class="dummy"></span>
<div id="content">
<form action="./" method="post" onsubmit="return procFilter(this, dbSetting)">
<form rule="firebird" action="./" method="post">
<input type="hidden" value="{getUrl('', 'act', $act, 'db_type', $db_type)}" name="error_return_url">
<input type="hidden" name="act" value="procFirebirdDBSetting" />
<input type="hidden" name="db_type" value="{$db_type}" />
<h2 class="h2">{$db_type}</h2>
<ul class="form formDbInfo">

View file

@ -1,11 +1,12 @@
<!--%import("filter/mssql.xml")-->
<!--%import("js/install_admin.js")-->
<!--#include("header.html")-->
<div id="body">
<!--#include("progress_menu.html")-->
<span class="dummy"></span>
<div id="content">
<form action="./" method="post" onsubmit="return procFilter(this, dbSetting)">
<form rule="mssql" action="./" method="post">
<input type="hidden" value="{getUrl('', 'act', $act, 'db_type', $db_type)}" name="error_return_url">
<input type="hidden" name="act" value="procMssqlDBSetting" />
<input type="hidden" name="db_type" value="{$db_type}" />
<h2 class="h2">{$db_type}</h2>
<ul class="form formDbInfo">

View file

@ -1,11 +1,13 @@
<!--%import("filter/mysql.xml")-->
<!--%import("js/install_admin.js")-->
<!--#include("header.html")-->
<div id="body">
<!--#include("progress_menu.html")-->
<span class="dummy"></span>
<div id="content">
<form action="./" method="post" onsubmit="return procFilter(this, dbSetting)">
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
<form rule="mysql" action="./" method="post">
<input type="hidden" value="{getUrl('', 'act', $act, 'db_type', $db_type)}" name="error_return_url">
<input type="hidden" name="act" value="procMysqlDBSetting" />
<input type="hidden" name="db_type" value="{$db_type}" />
<h2 class="h2">{$db_type}</h2>
<ul class="form formDbInfo">

View file

@ -1,11 +1,13 @@
<!--%import("filter/mysql.xml")-->
<!--%import("js/install_admin.js")-->
<!--#include("header.html")-->
<div id="body">
<!--#include("progress_menu.html")-->
<span class="dummy"></span>
<div id="content">
<form action="./" method="post" onsubmit="return procFilter(this, dbSetting)">
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
<form rule="mysql" action="./" method="post">
<input type="hidden" value="{getUrl('', 'act', $act, 'db_type', $db_type)}" name="error_return_url">
<input type="hidden" name="act" value="procMysqlDBSetting" />
<input type="hidden" name="db_type" value="{$db_type}" />
<h2 class="h2">{$db_type}</h2>
<ul class="form formDbInfo">

View file

@ -1,11 +1,13 @@
<!--%import("filter/mysql.xml")-->
<!--%import("js/install_admin.js")-->
<!--#include("header.html")-->
<div id="body">
<!--#include("progress_menu.html")-->
<span class="dummy"></span>
<div id="content">
<form action="./" method="post" onsubmit="return procFilter(this, dbSetting)">
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
<form rule="mysql" action="./" method="post">
<input type="hidden" value="{getUrl('', 'act', $act, 'db_type', $db_type)}" name="error_return_url">
<input type="hidden" name="act" value="procMysqlDBSetting" />
<input type="hidden" name="db_type" value="{$db_type}" />
<h2 class="h2">{$db_type}</h2>
<ul class="form formDbInfo">

View file

@ -1,11 +1,13 @@
<!--%import("filter/postgresql.xml")-->
<!--%import("js/install_admin.js")-->
<!--#include("header.html")-->
<div id="body">
<!--#include("progress_menu.html")-->
<span class="dummy"></span>
<div id="content">
<form action="./" method="post" onsubmit="return procFilter(this, dbSetting)">
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
<form rule="postgresql" action="./" method="post">
<input type="hidden" value="{getUrl('', 'act', $act, 'db_type', $db_type)}" name="error_return_url">
<input type="hidden" name="act" value="procPostgresqlDBSetting" />
<input type="hidden" name="db_type" value="{$db_type}" />
<h2 class="h2">{$db_type}</h2>
<ul class="form formDbInfo">

View file

@ -1,11 +1,13 @@
<!--%import("filter/sqlite2.xml")-->
<!--%import("js/install_admin.js")-->
<!--#include("header.html")-->
<div id="body">
<!--#include("progress_menu.html")-->
<span class="dummy"></span>
<div id="content">
<form action="./" method="post" onsubmit="return procFilter(this, dbSetting)">
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
<form rule="sqlite" action="./" method="post">
<input type="hidden" value="{getUrl('', 'act', $act, 'db_type', $db_type)}" name="error_return_url">
<input type="hidden" name="act" value="procSqliteDBSetting" />
<input type="hidden" name="db_type" value="{$db_type}" />
<h2 class="h2">{$db_type}</h2>
<ul class="form formDbInfo">

View file

@ -1,11 +1,12 @@
<!--%import("filter/sqlite2.xml")-->
<!--%import("js/install_admin.js")-->
<!--#include("header.html")-->
<div id="body">
<!--#include("progress_menu.html")-->
<span class="dummy"></span>
<div id="content">
<form action="./" method="post" onsubmit="return procFilter(this, dbSetting)">
<form rule="sqlite" action="./" method="post">
<input type="hidden" value="{getUrl('', 'act', $act, 'db_type', $db_type)}" name="error_return_url">
<input type="hidden" name="act" value="procSqliteDBSetting" />
<input type="hidden" name="db_type" value="{$db_type}" />
<h2 class="h2">{$db_type}</h2>
<ul class="form formDbInfo">