Skip to content

Commit

Permalink
GH-139 Further code cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
mdziekon committed Jun 1, 2022
1 parent 16422d9 commit 481653d
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions fleet2.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,24 @@
define('INSIDE', true);

$_EnginePath = './';
include($_EnginePath.'common.php');

include($_EnginePath . 'common.php');
include($_EnginePath . 'modules/flightControl/_includes.php');

use UniEngine\Engine\Modules\Flights;
use UniEngine\Engine\Modules\FlightControl;

loggedCheck();

if((!isset($_POST['sending_fleet']) || $_POST['sending_fleet'] != '1') && (!isset($_POST['fromEnd']) || $_POST['fromEnd'] != '1'))
{
if (
(
!isset($_POST['sending_fleet']) ||
$_POST['sending_fleet'] != '1'
) &&
(
!isset($_POST['fromEnd']) ||
$_POST['fromEnd'] != '1'
)
) {
header('Location: fleet.php');
safeDie();
}
Expand Down Expand Up @@ -301,14 +308,11 @@
$_Lang['TitlePos'] = ($_Planet['planet_type'] == 1 ? $_Lang['fl2_sendfromplanet'] : $_Lang['fl2_sendfrommoon'])." {$_Planet['name']} [{$_Planet['galaxy']}:{$_Planet['system']}:{$_Planet['planet']}]";

$_Lang['FleetArray'] = $_POST['FleetArray'];
if($_POST['quickres'] == '1')
{
$_Lang['P_SetQuickRes']= '1';
}
else
{
$_Lang['P_SetQuickRes']= '0';
}
$_Lang['P_SetQuickRes'] = (
($_POST['quickres'] == '1') ?
'1' :
'0'
);
$_Lang['Now'] = $Now;
$_Lang['This_metal'] = explode('.', sprintf('%f', floor($_Planet['metal'])));
$_Lang['This_metal'] = (string)$_Lang['This_metal'][0];
Expand Down

0 comments on commit 481653d

Please sign in to comment.