Reorganize web configuration, allow custom SQL port

ryzomclassic-develop
kaetemi 4 years ago
parent dba5d1a1ca
commit 449c90a4b0
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

@ -9,39 +9,39 @@
// config_user.php file.
// Variables for database access to the www/CMS database (only if support role)
$cfg['db']['web']['host'] = '%amsSqlHostname%';
$cfg['db']['web']['port'] = '3306';
$cfg['db']['web']['host'] = '%nelSqlHostname%';
$cfg['db']['web']['port'] = '%nelSqlPort%';
$cfg['db']['web']['user'] = '%nelSqlUsername%';
$cfg['db']['web']['pass'] = '%nelSqlPassword%';
$cfg['db']['web']['name'] = '%amsDatabase%';
$cfg['db']['web']['user'] = '%amsSqlUsername%';
$cfg['db']['web']['pass'] = '%amsSqlPassword%';
// Variables for database access to the lib database (only if support role)
$cfg['db']['lib']['host'] = '%amsSqlHostname%';
$cfg['db']['lib']['port'] = '3306';
$cfg['db']['lib']['host'] = '%nelSqlHostname%';
$cfg['db']['lib']['port'] = '%nelSqlPort%';
$cfg['db']['lib']['user'] = '%nelSqlUsername%';
$cfg['db']['lib']['pass'] = '%nelSqlPassword%';
$cfg['db']['lib']['name'] = '%amsLibDatabase%';
$cfg['db']['lib']['user'] = '%amsSqlUsername%';
$cfg['db']['lib']['pass'] = '%amsSqlPassword%';
// Variables for database access to the shard database
$cfg['db']['shard']['host'] = '%nelSqlHostname%';
$cfg['db']['shard']['port'] = '3306';
$cfg['db']['shard']['name'] = '%nelDatabase%';
$cfg['db']['shard']['port'] = '%nelSqlPort%';
$cfg['db']['shard']['user'] = '%nelSqlUsername%';
$cfg['db']['shard']['pass'] = '%nelSqlPassword%';
$cfg['db']['shard']['name'] = '%nelDatabase%';
// Variables for database access to the ring_open database (only if domain role)
$cfg['db']['ring']['host'] = '%nelSqlHostname%';
$cfg['db']['ring']['port'] = '3306';
$cfg['db']['ring']['name'] = '%domainDatabase%';
$cfg['db']['ring']['port'] = '%nelSqlPort%';
$cfg['db']['ring']['user'] = '%nelSqlUsername%';
$cfg['db']['ring']['pass'] = '%nelSqlPassword%';
$cfg['db']['ring']['name'] = '%domainDatabase%';
// Variables for database access to the nel_tool database (only if service role)
$cfg['db']['tool']['host'] = '%nelSqlHostname%';
$cfg['db']['tool']['port'] = '3306';
$cfg['db']['tool']['name'] = '%toolDatabase%';
$cfg['db']['tool']['port'] = '%nelSqlPort%';
$cfg['db']['tool']['user'] = '%nelSqlUsername%';
$cfg['db']['tool']['pass'] = '%nelSqlPassword%';
$cfg['db']['tool']['name'] = '%toolDatabase%';
// To connect to an IMAP server running on port 143 on the local machine,
// do the following: $mbox = imap_open("{localhost:143}INBOX", "user_id", "password");

@ -144,9 +144,6 @@ require_once('setup/version.php');
$config = str_replace("%nelSqlPassword%", addslashes($_POST["nelSqlPassword"]), $config);
$config = str_replace("%nelDatabase%", addslashes($_POST["nelDatabase"]), $config);
$config = str_replace("%toolDatabase%", addslashes($_POST["toolDatabase"]), $config);
$config = str_replace("%amsSqlHostname%", addslashes($_POST["amsSqlHostname"]), $config);
$config = str_replace("%amsSqlUsername%", addslashes($_POST["amsSqlUsername"]), $config);
$config = str_replace("%amsSqlPassword%", addslashes($_POST["amsSqlPassword"]), $config);
$config = str_replace("%amsDatabase%", addslashes($_POST["amsDatabase"]), $config);
$config = str_replace("%amsLibDatabase%", addslashes($_POST["amsLibDatabase"]), $config);
$config = str_replace("%nelSetupPassword%", addslashes($_POST["nelSetupPassword"]), $config);
@ -400,7 +397,7 @@ require_once('setup/version.php');
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">Service Database <small>(Used for NeL login, admin tools and domain databases)</small></h2>
<h2 class="panel-title">SQL Database</h2>
</div>
<div class="panel-body">
<div class="form-group">
@ -409,6 +406,12 @@ require_once('setup/version.php');
<input type="text" class="form-control" id="nelSqlHostname" name="nelSqlHostname" value="localhost">
</div>
</div>
<div class="form-group">
<label for="nelSqlPort" class="col-sm-3 control-label">SQL Port</label>
<div class="col-sm-6">
<input type="text" class="form-control" id="nelSqlPort" name="nelSqlPort" value="3306">
</div>
</div>
<div class="form-group">
<label for="nelSqlUsername" class="col-sm-3 control-label">SQL Username</label>
<div class="col-sm-6">
@ -421,6 +424,13 @@ require_once('setup/version.php');
<input type="password" class="form-control" id="nelSqlPassword" name="nelSqlPassword" value="">
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">Login Service</h2>
</div>
<div class="panel-body">
<div class="form-group">
<label for="nelDatabase" class="col-sm-3 control-label">NeL Database</label>
<div class="col-sm-6">
@ -460,25 +470,7 @@ require_once('setup/version.php');
</div>
<div class="panel-body">
<div class="form-group">
<label for="amsSqlHostname" class="col-sm-3 control-label">SQL Hostname</label>
<div class="col-sm-6">
<input type="text" class="form-control" id="amsSqlHostname" name="amsSqlHostname" value="localhost">
</div>
</div>
<div class="form-group">
<label for="amsSqlUsername" class="col-sm-3 control-label">SQL Username</label>
<div class="col-sm-6">
<input type="text" class="form-control" id="amsSqlUsername" name="amsSqlUsername" value="root">
</div>
</div>
<div class="form-group">
<label for="amsSqlPassword" class="col-sm-3 control-label">SQL Password</label>
<div class="col-sm-6">
<input type="password" class="form-control" id="amsSqlPassword" name="amsSqlPassword" value="">
</div>
</div>
<div class="form-group">
<label for="amsDatabase" class="col-sm-3 control-label">CMS Database</label>
<label for="amsDatabase" class="col-sm-3 control-label">AMS Database</label>
<div class="col-sm-6">
<input type="text" class="form-control" id="amsDatabase" name="amsDatabase" value="nel_ams">
</div>

Loading…
Cancel
Save