diff --git a/code/web/public_php/login/config.php b/code/web/public_php/login/config.php index 805252b62..d69bdfea1 100644 --- a/code/web/public_php/login/config.php +++ b/code/web/public_php/login/config.php @@ -21,7 +21,6 @@ $DBName = $cfg['db']['shard']['name']; $RingDBUserName = $cfg['db']['ring']['user']; $RingDBPassword = $cfg['db']['ring']['pass']; -$RingDBName = $cfg['db']['ring']['name']; // If true, the server will add automatically unknown user in the database // (in nel.user, nel.permission, ring.ring_user and ring.characters diff --git a/code/web/public_php/ring/edit_session.php b/code/web/public_php/ring/edit_session.php index e567f2296..4fef39520 100644 --- a/code/web/public_php/ring/edit_session.php +++ b/code/web/public_php/ring/edit_session.php @@ -16,10 +16,10 @@ $domainInfo = getDomainInfo($domainId); - global $DBHost, $RingDBUserName, $RingDBPassword, $RingDBName; + global $DBHost, $RingDBUserName, $RingDBPassword; $link = mysqli_connect($DBHost, $RingDBUserName, $RingDBPassword) or die ("Can't connect to database host:$DBHost user:$RingDBUserName"); - mysqli_select_db($link, $RingDBName) or die ("Can't access to the db dbname:$RingDBName"); + mysqli_select_db($link, $domainInfo['ring_db_name']) or die ("Can't access to the db dbname:" . $domainInfo['ring_db_name']); // Find out if the character has an open editing session $query = "SELECT session_id, state "; diff --git a/code/web/public_php/ring/invite_pioneer.php b/code/web/public_php/ring/invite_pioneer.php index 44cd83349..bb1f5ca7e 100644 --- a/code/web/public_php/ring/invite_pioneer.php +++ b/code/web/public_php/ring/invite_pioneer.php @@ -42,10 +42,10 @@ if (isset($_POST["execute"])) { // lookup in the database to convert character name into - global $DBHost, $RingDBUserName, $RingDBPassword, $RingDBName; + global $DBHost, $RingDBUserName, $RingDBPassword; $link = mysqli_connect($DBHost, $RingDBUserName, $RingDBPassword) or die ("Can't connect to database host:$DBHost user:$RingDBUserName"); - mysqli_select_db($link, $RingDBName) or die ("Can't access to the table dbname:$RingDBName"); + mysqli_select_db($link, $domainInfo['ring_db_name']) or die ("Can't access to the table dbname:" . $domainInfo['ring_db_name']); // extract the character that have the specified name $charName = mysqli_real_escape_string($link, $_POST['charName']); diff --git a/code/web/public_php/ring/session_tools.php b/code/web/public_php/ring/session_tools.php index de6900727..e5f12763f 100644 --- a/code/web/public_php/ring/session_tools.php +++ b/code/web/public_php/ring/session_tools.php @@ -107,14 +107,14 @@ function inviteOwnerInSession($charId, $domainId, $sessionId) $RSMHost = $addr[0]; $RSMPort = $addr[1]; - global $rsmProxy, $rsmSkel, $userId, $charId, $callbackClient, $RingDBName, /*$SessionId,*/ $SessionToolsResult; + global $rsmProxy, $rsmSkel, $userId, $charId, $callbackClient, /*$SessionId,*/ $SessionToolsResult; global $DBHost, $RingDBUserName, $RingDBPassword; $SessionId = $sessionId; $DomainId = $domainId; $link = mysqli_connect($DBHost, $RingDBUserName, $RingDBPassword) or die("Can't connect to ring database"); - mysqli_select_db($link, $RingDBName) or die ("Can't access to the db dbname:$RingDBName"); + mysqli_select_db($link, $domainInfo['ring_db_name']) or die ("Can't access to the db dbname:" . $domainInfo['ring_db_name']); $sessionId = (int) $sessionId; $query = "select session_type from sessions where session_id=".$sessionId; @@ -146,7 +146,7 @@ class StartSessionCb extends CRingSessionManagerWeb { function invokeResult($userId, $resultCode, $resultString) { - global $rsmProxy, $rsmSkel, $userId, $charId, $callbackClient, $RingDBName, $SessionId, $DomainId, $SessionToolsResult; + global $rsmProxy, $rsmSkel, $userId, $charId, $callbackClient, $SessionId, $DomainId, $SessionToolsResult; if ($resultCode != 0) { @@ -170,7 +170,7 @@ class InviteOwnerCb extends CRingSessionManagerWeb { function invokeResult($userId, $resultCode, $resultString) { - global $rsmProxy, $rsmSkel, $userId, $charId, $callbackClient, $RingDBName, $SessionId, $DomainId, $SessionToolsResult; + global $rsmProxy, $rsmSkel, $userId, $charId, $callbackClient, $SessionId, $DomainId, $SessionToolsResult; // jump back to main page echo "