mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-07 13:24:22 +00:00
fix: PHP4x + PHP5x constructors change for PHP7+ compatible ones
This commit is contained in:
@@ -28,7 +28,7 @@ include_once("../GameEngine/Database.php");
|
||||
class adm_DB {
|
||||
|
||||
var $connection;
|
||||
function adm_DB(){
|
||||
function __construct(){
|
||||
global $database;
|
||||
$database = new MYSQLi_DB;
|
||||
$this->connection = $database->return_link();
|
||||
|
||||
@@ -165,7 +165,7 @@ class Automation {
|
||||
return $popT;
|
||||
}
|
||||
|
||||
public function Automation() {
|
||||
public function __construct() {
|
||||
|
||||
$this->procNewClimbers();
|
||||
$this->ClearUser();
|
||||
|
||||
@@ -25,7 +25,7 @@ class Building {
|
||||
private $basic,$inner,$plus = 0;
|
||||
public $buildArray = array();
|
||||
|
||||
public function Building() {
|
||||
public function __construct() {
|
||||
global $session;
|
||||
$this->maxConcurrent = BASIC_MAX;
|
||||
if(ALLOW_ALL_TRIBE || $session->tribe == 1) {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
class MYSQLi_DB {
|
||||
|
||||
var $dblink;
|
||||
function mysqli_DB() {
|
||||
function __construct() {
|
||||
$this->dblink = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysqli_error());
|
||||
mysqli_select_db($this->dblink, SQL_DB);
|
||||
mysqli_query($this->dblink,"SET NAMES 'UTF8'");
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ class Form {
|
||||
public $valuearray = array();
|
||||
private $errorcount;
|
||||
|
||||
public function Form() {
|
||||
public function __construct() {
|
||||
if(isset($_SESSION['errorarray']) && isset($_SESSION['valuearray'])) {
|
||||
$this->errorarray = $_SESSION['errorarray'];
|
||||
$this->valuearray = $_SESSION['valuearray'];
|
||||
|
||||
@@ -17,7 +17,7 @@ class Message {
|
||||
private $totalMessage, $totalNotice;
|
||||
private $allNotice = array();
|
||||
|
||||
function Message() {
|
||||
function __construct() {
|
||||
$this->getMessages();
|
||||
$this->getNotice();
|
||||
if($this->totalMessage > 0) {
|
||||
|
||||
Reference in New Issue
Block a user