Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions admin/Default/1.6/universe_create_save_processing.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
if($numRacePorts[$raceID]==0)
unset($numRacePorts[$raceID]);

$port =& $galSector->createPort();
$port =& $galSector->getPort();
$port->setRaceID($raceID);
$port->upgradeToLevel($i);
$port->setCreditsToDefault();
Expand Down Expand Up @@ -305,12 +305,7 @@
}
//update port
if ($_POST['port_level'] > 0) {
if(!$sector->hasPort()) {
$port =& $sector->createPort();
}
else {
$port =& $sector->getPort();
}
$port =& $sector->getPort();
if ($port->getLevel()!=$_POST['port_level']) {
$port->upgradeToLevel($_POST['port_level']);
$port->setCreditsToDefault();
Expand Down
8 changes: 0 additions & 8 deletions lib/Default/SmrPort.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,6 @@ class SmrPort {
unset(self::$CACHE_PORTS[$gameID][$sectorID]);
}

public static function &createPort($gameID,$sectorID) {
if(!isset(self::$CACHE_PORTS[$gameID][$sectorID])) {
$p = new SmrPort($gameID,$sectorID);
self::$CACHE_PORTS[$gameID][$sectorID] =& $p;
}
return self::$CACHE_PORTS[$gameID][$sectorID];
}

public static function savePorts() {
foreach(self::$CACHE_PORTS as &$gamePorts) {
foreach($gamePorts as &$port) {
Expand Down
4 changes: 0 additions & 4 deletions lib/Default/SmrSector.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -592,10 +592,6 @@ class SmrSector {
return SmrPort::getPort($this->getGameID(),$this->getSectorID());
}

public function &createPort() {
return SmrPort::createPort($this->getGameID(),$this->getSectorID());
}

public function removePort() {
SmrPort::removePort($this->getGameID(),$this->getSectorID());
}
Expand Down