Skip to content
This repository has been archived by the owner on Dec 6, 2019. It is now read-only.

Commit

Permalink
code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Nabeel Shahzad committed Feb 15, 2011
1 parent e75ef76 commit b8cce8a
Show file tree
Hide file tree
Showing 29 changed files with 5,551 additions and 6,271 deletions.
10 changes: 4 additions & 6 deletions core/common/ACARSData.class.php
Expand Up @@ -18,7 +18,7 @@
*/

class ACARSData extends CodonData {

public static $lasterror;
public static $pirepid;

Expand Down Expand Up @@ -172,7 +172,7 @@ public static function updateFlightData($pilotid, $data) {

DB::query($query);
} else {

// form array with $ins[column]=value and then
// give it to quick_insert to finish
$ins = array();
Expand All @@ -181,8 +181,7 @@ public static function updateFlightData($pilotid, $data) {
foreach ($data as $field => $value) {
$ins[] = "`{$field}`";
if ($field === 'deptime' || $field === 'arrtime') {
if (empty($value))
$value = time();
if (empty($value)) $value = time();
$vals[] = "FROM_UNIXTIME({$value})";
} elseif ($field === 'lastupdate') {
$vals[] = 'NOW()';
Expand Down Expand Up @@ -283,8 +282,7 @@ public static function FilePIREP($pilotid, $data) {
# Set them as non-retired
PilotData::setPilotRetired($pilotid, 0);

if (!$ret)
return false;
if (!$ret) return false;

self::$pirepid = DB::$insert_id;

Expand Down
27 changes: 13 additions & 14 deletions core/common/AircraftStats.class.php
@@ -1,4 +1,5 @@
<?php

/**
* phpVMS - Virtual Airline Administration Software
* Copyright (c) 2008 Nabeel Shahzad
Expand All @@ -16,18 +17,16 @@
* @license http://creativecommons.org/licenses/by-nc-sa/3.0/
*/

class AircraftStats extends CodonData
{


/**
* Return summary/detailed information about all aircraft
*
* @return array Array of objects with the flight data
*
*/
public static function getAircraftDetails()
{
return StatsData::AircraftUsage();
class AircraftStats extends CodonData {


/**
* Return summary/detailed information about all aircraft
*
* @return array Array of objects with the flight data
*
*/
public static function getAircraftDetails() {
return StatsData::AircraftUsage();
}
}
}

0 comments on commit b8cce8a

Please sign in to comment.