add port settings to setup
This commit is contained in:
parent
97f63d0066
commit
264e1c0cc6
@ -27,6 +27,7 @@ function setup_post(&$a) {
|
|||||||
case 3:
|
case 3:
|
||||||
$urlpath = $a->get_path();
|
$urlpath = $a->get_path();
|
||||||
$dbhost = notags(trim($_POST['dbhost']));
|
$dbhost = notags(trim($_POST['dbhost']));
|
||||||
|
$dbport = intval(notags(trim($_POST['dbport'])));
|
||||||
$dbuser = notags(trim($_POST['dbuser']));
|
$dbuser = notags(trim($_POST['dbuser']));
|
||||||
$dbpass = notags(trim($_POST['dbpass']));
|
$dbpass = notags(trim($_POST['dbpass']));
|
||||||
$dbdata = notags(trim($_POST['dbdata']));
|
$dbdata = notags(trim($_POST['dbdata']));
|
||||||
@ -47,7 +48,7 @@ function setup_post(&$a) {
|
|||||||
);
|
);
|
||||||
if($r) {
|
if($r) {
|
||||||
unset($db);
|
unset($db);
|
||||||
$db = new dba($dbhost, $dbuser, $dbpass, $dbdata, true);
|
$db = new dba($dbhost, $dbport, $dbuser, $dbpass, $dbdata, true);
|
||||||
} else {
|
} else {
|
||||||
$a->data['db_create_failed']=true;
|
$a->data['db_create_failed']=true;
|
||||||
}
|
}
|
||||||
@ -65,6 +66,7 @@ function setup_post(&$a) {
|
|||||||
case 4:
|
case 4:
|
||||||
$urlpath = $a->get_path();
|
$urlpath = $a->get_path();
|
||||||
$dbhost = notags(trim($_POST['dbhost']));
|
$dbhost = notags(trim($_POST['dbhost']));
|
||||||
|
$dbport = intval(notags(trim($_POST['dbport'])));
|
||||||
$dbuser = notags(trim($_POST['dbuser']));
|
$dbuser = notags(trim($_POST['dbuser']));
|
||||||
$dbpass = notags(trim($_POST['dbpass']));
|
$dbpass = notags(trim($_POST['dbpass']));
|
||||||
$dbdata = notags(trim($_POST['dbdata']));
|
$dbdata = notags(trim($_POST['dbdata']));
|
||||||
@ -81,6 +83,7 @@ function setup_post(&$a) {
|
|||||||
$tpl = get_intltext_template('htconfig.tpl');
|
$tpl = get_intltext_template('htconfig.tpl');
|
||||||
$txt = replace_macros($tpl,array(
|
$txt = replace_macros($tpl,array(
|
||||||
'$dbhost' => $dbhost,
|
'$dbhost' => $dbhost,
|
||||||
|
'$dbport' => $dbport,
|
||||||
'$dbuser' => $dbuser,
|
'$dbuser' => $dbuser,
|
||||||
'$dbpass' => $dbpass,
|
'$dbpass' => $dbpass,
|
||||||
'$dbdata' => $dbdata,
|
'$dbdata' => $dbdata,
|
||||||
@ -120,7 +123,7 @@ function setup_content(&$a) {
|
|||||||
global $install_wizard_pass, $db;
|
global $install_wizard_pass, $db;
|
||||||
$o = '';
|
$o = '';
|
||||||
$wizard_status = "";
|
$wizard_status = "";
|
||||||
$install_title = t('Red Identity/Communications Server - Setup');
|
$install_title = t('Red Matrix Server - Setup');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -222,6 +225,7 @@ function setup_content(&$a) {
|
|||||||
|
|
||||||
$dbhost = ((x($_POST,'dbhost')) ? notags(trim($_POST['dbhost'])) : 'localhost');
|
$dbhost = ((x($_POST,'dbhost')) ? notags(trim($_POST['dbhost'])) : 'localhost');
|
||||||
$dbuser = notags(trim($_POST['dbuser']));
|
$dbuser = notags(trim($_POST['dbuser']));
|
||||||
|
$dbport = intval(notags(trim($_POST['dbport'])));
|
||||||
$dbpass = notags(trim($_POST['dbpass']));
|
$dbpass = notags(trim($_POST['dbpass']));
|
||||||
$dbdata = notags(trim($_POST['dbdata']));
|
$dbdata = notags(trim($_POST['dbdata']));
|
||||||
$phpath = notags(trim($_POST['phpath']));
|
$phpath = notags(trim($_POST['phpath']));
|
||||||
@ -240,6 +244,7 @@ function setup_content(&$a) {
|
|||||||
'$status' => $wizard_status,
|
'$status' => $wizard_status,
|
||||||
|
|
||||||
'$dbhost' => array('dbhost', t('Database Server Name'), $dbhost, ''),
|
'$dbhost' => array('dbhost', t('Database Server Name'), $dbhost, ''),
|
||||||
|
'$dbport' => array('dbport', t('Database Port'), $dbport, t('Communication port number or leave blank to use default'),
|
||||||
'$dbuser' => array('dbuser', t('Database Login Name'), $dbuser, ''),
|
'$dbuser' => array('dbuser', t('Database Login Name'), $dbuser, ''),
|
||||||
'$dbpass' => array('dbpass', t('Database Login Password'), $dbpass, ''),
|
'$dbpass' => array('dbpass', t('Database Login Password'), $dbpass, ''),
|
||||||
'$dbdata' => array('dbdata', t('Database Name'), $dbdata, ''),
|
'$dbdata' => array('dbdata', t('Database Name'), $dbdata, ''),
|
||||||
@ -262,6 +267,7 @@ function setup_content(&$a) {
|
|||||||
case 3: { // Site settings
|
case 3: { // Site settings
|
||||||
require_once('datetime.php');
|
require_once('datetime.php');
|
||||||
$dbhost = ((x($_POST,'dbhost')) ? notags(trim($_POST['dbhost'])) : 'localhost');
|
$dbhost = ((x($_POST,'dbhost')) ? notags(trim($_POST['dbhost'])) : 'localhost');
|
||||||
|
$dbport = intval(notags(trim($_POST['dbuser'])));
|
||||||
$dbuser = notags(trim($_POST['dbuser']));
|
$dbuser = notags(trim($_POST['dbuser']));
|
||||||
$dbpass = notags(trim($_POST['dbpass']));
|
$dbpass = notags(trim($_POST['dbpass']));
|
||||||
$dbdata = notags(trim($_POST['dbdata']));
|
$dbdata = notags(trim($_POST['dbdata']));
|
||||||
@ -279,6 +285,7 @@ function setup_content(&$a) {
|
|||||||
'$status' => $wizard_status,
|
'$status' => $wizard_status,
|
||||||
|
|
||||||
'$dbhost' => $dbhost,
|
'$dbhost' => $dbhost,
|
||||||
|
'$dbport' => $dbport,
|
||||||
'$dbuser' => $dbuser,
|
'$dbuser' => $dbuser,
|
||||||
'$dbpass' => $dbpass,
|
'$dbpass' => $dbpass,
|
||||||
'$dbdata' => $dbdata,
|
'$dbdata' => $dbdata,
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
// Copy or rename this file to .htconfig.php
|
// Copy or rename this file to .htconfig.php
|
||||||
|
|
||||||
$db_host = '$dbhost';
|
$db_host = '$dbhost';
|
||||||
|
$db_port = '$dbport';
|
||||||
$db_user = '$dbuser';
|
$db_user = '$dbuser';
|
||||||
$db_pass = '$dbpass';
|
$db_pass = '$dbpass';
|
||||||
$db_data = '$dbdata';
|
$db_data = '$dbdata';
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
<input type="hidden" name="pass" value="3" />
|
<input type="hidden" name="pass" value="3" />
|
||||||
|
|
||||||
{{include file="field_input.tpl" field=$dbhost}}
|
{{include file="field_input.tpl" field=$dbhost}}
|
||||||
|
{{include file="field_input.tpl" field=$dbport}}
|
||||||
{{include file="field_input.tpl" field=$dbuser}}
|
{{include file="field_input.tpl" field=$dbuser}}
|
||||||
{{include file="field_password.tpl" field=$dbpass}}
|
{{include file="field_password.tpl" field=$dbpass}}
|
||||||
{{include file="field_input.tpl" field=$dbdata}}
|
{{include file="field_input.tpl" field=$dbdata}}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
<input type="hidden" name="phpath" value="{{$phpath}}" />
|
<input type="hidden" name="phpath" value="{{$phpath}}" />
|
||||||
<input type="hidden" name="dbhost" value="{{$dbhost}}" />
|
<input type="hidden" name="dbhost" value="{{$dbhost}}" />
|
||||||
|
<input type="hidden" name="dbport" value="{{$dbport}}" />
|
||||||
<input type="hidden" name="dbuser" value="{{$dbuser}}" />
|
<input type="hidden" name="dbuser" value="{{$dbuser}}" />
|
||||||
<input type="hidden" name="dbpass" value="{{$dbpass}}" />
|
<input type="hidden" name="dbpass" value="{{$dbpass}}" />
|
||||||
<input type="hidden" name="dbdata" value="{{$dbdata}}" />
|
<input type="hidden" name="dbdata" value="{{$dbdata}}" />
|
||||||
|
Reference in New Issue
Block a user