mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-17 16:51:00 +00:00
@@ -48,7 +48,7 @@ class adm_DB {
|
|||||||
var $connection;
|
var $connection;
|
||||||
function __construct(){
|
function __construct(){
|
||||||
global $database;
|
global $database;
|
||||||
$database = new MYSQLi_DB(SQL_SERVER.':'.SQL_PORT, SQL_USER, SQL_PASS, SQL_DB);
|
$database = new MYSQLi_DB(SQL_SERVER.':'.(defined('SQL_PORT') ? SQL_PORT : 3306), SQL_USER, SQL_PASS, SQL_DB);
|
||||||
$this->connection = $database->return_link();
|
$this->connection = $database->return_link();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6812,7 +6812,7 @@ References:
|
|||||||
// database is not needed if we're displaying static pages
|
// database is not needed if we're displaying static pages
|
||||||
$req_file = basename($_SERVER['PHP_SELF']);
|
$req_file = basename($_SERVER['PHP_SELF']);
|
||||||
if (!in_array($req_file, ['tutorial.php', 'anleitung.php'])) {
|
if (!in_array($req_file, ['tutorial.php', 'anleitung.php'])) {
|
||||||
$database = new MYSQLi_DB(SQL_SERVER, SQL_USER, SQL_PASS, SQL_DB, SQL_PORT);
|
$database = new MYSQLi_DB(SQL_SERVER, SQL_USER, SQL_PASS, SQL_DB, (defined('SQL_PORT') ? SQL_PORT : 3306));
|
||||||
$link = $database->return_link();
|
$link = $database->return_link();
|
||||||
$GLOBALS['db'] = $database;
|
$GLOBALS['db'] = $database;
|
||||||
$GLOBALS['link'] = $database->return_link();
|
$GLOBALS['link'] = $database->return_link();
|
||||||
|
|||||||
Reference in New Issue
Block a user