fix: work on very basic PHP remediation
This commit is contained in:
parent
b18b795ab3
commit
6ee9078e0c
117 changed files with 216 additions and 208 deletions
scripts/game/beta5
actions.inc
alliance
library.inc
library
acceptRequest.incaddCandidate.inccancelRequest.incchangeRank.inccreate.inccreateForum.inccreateRank.incdeleteForum.incdeleteRank.incget.incgetCandidates.incgetForums.incgetForumsComplete.incgetId.incgetKeepers.incgetMembers.incgetMilitary.incgetPlanets.incgetPrivileges.incgetRankPrivileges.incgetRankSize.incgetRanks.inc
fleet
library.inclibrary
planet
player/library
rules
ticks/universe
|
@ -30,7 +30,7 @@ class actions_beta5 {
|
|||
var $ePower = array();
|
||||
|
||||
|
||||
function actions_beta5($game) {
|
||||
public function __construct($game) {
|
||||
$this->game = $game;
|
||||
$this->lib = $game->getLib();
|
||||
$this->alliance = $game->getLib('beta5/alliance');
|
||||
|
|
|
@ -53,7 +53,7 @@ class beta5_alliance_library {
|
|||
);
|
||||
|
||||
|
||||
function beta5_alliance_library($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_alliance_acceptRequest {
|
||||
|
||||
function beta5_alliance_acceptRequest($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
$this->msgs = $this->lib->game->getLib('beta5/msg');
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_alliance_addCandidate {
|
||||
|
||||
function beta5_alliance_addCandidate($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_alliance_cancelRequest {
|
||||
|
||||
function beta5_alliance_cancelRequest($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_alliance_changeRank {
|
||||
|
||||
function beta5_alliance_changeRank($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->game = $this->lib->game;
|
||||
$this->db = $this->game->db;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_alliance_create {
|
||||
|
||||
function beta5_alliance_create($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_alliance_createForum {
|
||||
|
||||
function beta5_alliance_createForum($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_alliance_createRank {
|
||||
|
||||
function beta5_alliance_createRank($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_alliance_deleteForum {
|
||||
|
||||
function beta5_alliance_deleteForum($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_alliance_deleteRank {
|
||||
|
||||
function beta5_alliance_deleteRank($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_alliance_get {
|
||||
|
||||
function beta5_alliance_get($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_alliance_getCandidates {
|
||||
|
||||
function beta5_alliance_getCandidates($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_alliance_getForums {
|
||||
|
||||
function beta5_alliance_getForums($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_alliance_getForumsComplete {
|
||||
|
||||
function beta5_alliance_getForumsComplete($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
$this->players = $this->lib->game->getLib('beta5/player');
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_alliance_getId {
|
||||
|
||||
function beta5_alliance_getId($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_alliance_getKeepers {
|
||||
|
||||
function beta5_alliance_getKeepers($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_alliance_getMembers {
|
||||
|
||||
function beta5_alliance_getMembers($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_alliance_getMilitary {
|
||||
|
||||
function beta5_alliance_getMilitary($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_alliance_getPlanets {
|
||||
|
||||
function beta5_alliance_getPlanets($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
$this->planets = $this->lib->game->getLib('beta5/planet');
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_alliance_getPrivileges {
|
||||
|
||||
function beta5_alliance_getPrivileges($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
$this->players = $this->lib->game->getLib('beta5/player');
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_alliance_getRankPrivileges {
|
||||
|
||||
function beta5_alliance_getRankPrivileges($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_alliance_getRankSize {
|
||||
|
||||
function beta5_alliance_getRankSize($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_alliance_getRanks {
|
||||
|
||||
function beta5_alliance_getRanks($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ class beta5_fleet_library {
|
|||
);
|
||||
|
||||
|
||||
function beta5_fleet_library($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
class beta5_fleet_getPower {
|
||||
var $ePower = array();
|
||||
|
||||
function beta5_fleet_getPower($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
$this->rules = $this->lib->game->getLib('beta5/rules');
|
||||
|
|
|
@ -17,7 +17,7 @@ class beta5_library {
|
|||
'updateRankings'
|
||||
);
|
||||
|
||||
function beta5_library($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_getPlayerCount {
|
||||
|
||||
function beta5_getPlayerCount($lib) {
|
||||
function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_getPlayerStatus {
|
||||
|
||||
function beta5_getPlayerStatus($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_register {
|
||||
|
||||
function beta5_register($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ class beta5_planet_library {
|
|||
);
|
||||
|
||||
|
||||
function beta5_planet_library($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->game = $this->lib->game;
|
||||
$this->db = $this->game->db;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
class beta5_planet_updateHappiness {
|
||||
var $avgFPower = null;
|
||||
|
||||
function beta5_planet_updateHappiness($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
$this->players = $this->lib->game->getLib('beta5/player');
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
class beta5_planet_updateMaxPopulation {
|
||||
var $maxPops = array();
|
||||
|
||||
function beta5_planet_updateMaxPopulation($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
$this->rules = $this->lib->game->getLib('beta5/rules');
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class beta5_player_assign {
|
||||
|
||||
function beta5_player_assign($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->game = $this->lib->game;
|
||||
$this->db = $this->game->db;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
class beta5_player_getPlanetCount {
|
||||
var $pPlanets = array();
|
||||
|
||||
function beta5_player_getPlanetCount($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
class beta5_player_getPower {
|
||||
var $pFleets = array();
|
||||
|
||||
function beta5_player_getPower($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
$this->fleets = $this->lib->game->getLib('beta5/fleet');
|
||||
|
|
|
@ -7,7 +7,7 @@ class beta5_rules_library {
|
|||
);
|
||||
|
||||
|
||||
function beta5_rules_library($lib) {
|
||||
public function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
$this->planets = $this->lib->game->getLib('beta5/planet');
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
|
||||
class beta5_rules_get {
|
||||
function beta5_rules_get($lib) {
|
||||
|
||||
function __construct($lib) {
|
||||
$this->lib = $lib;
|
||||
$this->db = $this->lib->game->db;
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ class beta5_ticks_universe_library {
|
|||
// Run a special version of the tick if we are using a CTF map
|
||||
$map = (int) $this->game->params['usemap'];
|
||||
if ($map > 0) {
|
||||
l::debug("handling CTF map");
|
||||
$this->handleCTFMap($map);
|
||||
return;
|
||||
}
|
||||
|
@ -40,6 +41,7 @@ class beta5_ticks_universe_library {
|
|||
if ($this->maxSystems) {
|
||||
$ns = $this->getAllSystems();
|
||||
if ($ns >= $this->maxSystems) {
|
||||
l::debug("max system count reached");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -47,7 +49,8 @@ class beta5_ticks_universe_library {
|
|||
// Get the amount of free systems
|
||||
$this->reassignEmpty();
|
||||
$ns = $this->getFreeSystems();
|
||||
if ($ns >= $this->minSystems) {
|
||||
if (!is_null($this->minSystems) && $ns >= $this->minSystems) {
|
||||
l::debug("$ns systems are available, exiting");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue