refactor: Session.php only included once, login procedure optimization

#313
This commit is contained in:
Martin Ambrus
2017-11-20 00:39:37 +01:00
parent cb843dda57
commit 66132a7cdf
5 changed files with 36 additions and 30 deletions
+5 -5
View File
@@ -9,11 +9,11 @@
## ##
#################################################################################
include("Session.php");
include("Building.php");
include("Market.php");
include_once("Session.php");
include_once("Building.php");
include_once("Market.php");
include_once("GameEngine/Units.php");
include("Technology.php");
include_once("Technology.php");
class Village {
@@ -30,7 +30,7 @@ class Village {
function __construct() {
global $session, $database;
if(isset($_SESSION['wid'])) {
$this->wid = $_SESSION['wid'];
$this->wid = $_SESSION['wid'];
}
else {
$this->wid = $session->villages[0];