Jump to content

Advanced Fleet Manager [SOLVED]


CFVA

Recommended Posts

Install this module (php verion for PHPVMS 5.5.2) and get this error when selecting an aircraft, and the following screen http://....../fleet/view/(any aircraft)

gives this error:

Deprecated: Non-static method FleetData::getAircraftTotals() should not be called statically, assuming $this from incompatible context in /home/www/lakervirtual.com/core/modules/Fleet/Fleet.php on line 36

Deprecated: Non-static method FleetData::get5MostRecentFlights() should not be called statically, assuming $this from incompatible context in /home/www/lakervirtual.com/core/modules/Fleet/Fleet.php on line 37

Deprecated: Non-static method FleetData::getAllScheduledFlights() should not be called statically, assuming $this from incompatible context in /home/www/lakervirtual.com/core/modules/Fleet/Fleet.php on line 38

after those messages rest of page displays OK.

Any ideas anyone??

Thanks

Edited by LakerVirtual
SOLVED
Link to comment
Share on other sites

I've done that and still got same error messages. Here is fleet.php

<?php
/**
 * phpVMS - Virtual Airline Administration Software
 * Copyright (c) 2008 Nabeel Shahzad
 * For more information, visit www.phpvms.net
 *    Forums: http://www.phpvms.net/forum
 *    Documentation: http://www.phpvms.net/docs
 *
 * phpVMS is licenced under the following license:
 *   Creative Commons Attribution Non-commercial Share Alike (by-nc-sa)
 *   View license.txt in the root, or visit http://creativecommons.org/licenses/by-nc-sa/3.0/
 *
 * @author Nabeel Shahzad
 * @copyright Copyright (c) 2008, Nabeel Shahzad
 * @link http://www.phpvms.net
 * @license http://creativecommons.org/licenses/by-nc-sa/3.0/
 */
 
class Fleet extends CodonModule
{

    public function index()
    {
        $this->set('aircrafts', FleetData::GetAllAircrafts());
        $this->show('fleet/fleet_list');
        
    }
    
        public function view($aircraftid)
    {
        
        $this->set('basicinfo', FleetData::getBasicInfo($aircraftid));
        $this->set('purchasedate', FleetData::getDateOfPurchase($aircraftid));
        $this->set('firstflight', FleetData::getFirstFlight($aircraftid));
        $this->set('lastflight', FleetData::getLastFlight($aircraftid));
        $this->set('detailedinfo', FleetData::getAircraftTotals($aircraftid));
        $this->set('recentflights', FleetData::get5MostRecentFlights($aircraftid));
        $this->set('scheduledflights', FleetData::getAllScheduledFlights($aircraftid));
        $this->show('fleet/fleet_view');
        
    }
}

 

Link to comment
Share on other sites

22 minutes ago, servetas said:

Open your core/common/FleetData.class.php file and replace where:


public function

with:


public static function

 

there is only 'public static' not 'public function'

Part of FleetData.class.php:

<?php

    // -- Class Name : FleetData
    // -- Purpose : Gathers Detailed Information on VA Aircrafts
    // -- Created On : 10/27/2013
    // -- Last Revised On : 10/27/2013
    // -- Version : 1.0
    class FleetData extends CodonData
    {
        public static

        // -- Function Name : GetAllAircrafts
        // -- Params : 
        // -- Purpose : 
        function GetAllAircrafts()
        {
            $sql = 'SELECT * FROM '.TABLE_PREFIX.'aircraft WHERE `enabled` = 1';
            return DB::get_results($sql);
        }

        public static

        // -- Function Name : getBasicInfo
        // -- Params : $id
        // -- Purpose : 
        function getBasicInfo($id)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...