This is something that i never seem to get round to but i have the following error with my hub / routemap,
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘RouteMap::hubmap’ was given in /home/mgrant/public_html/grantsva.com/core/classes/MainController.class.php on line 292
I posted about a year ago and Nabeel posted a line of code to add, is this still relevant?
Im on the latest beta but its never worked now or ages
<?php
class RouteMap extends CodonModule
{
public function __construct()
{
CodonRewrite::AddRule('routemap', array('maptype', 'hub'));
}
public function index()
{
if($this->get->maptype == 'hubmap')
{
// Show hubmap
$params = array(
's.depicao'=>$this->get->hub,
's.enabled'=>1
);
// Show only 20 routes
$allschedules = SchedulesData::findSchedules($params, Config::Get('ROUTE_MAP_SHOW_NUMBER'));
if(count($allschedules) == 0)
{
echo 'There are no departures from this airport!';
return;
}
$airportinfo = OperationsData::GetAirportInfo($this->get->hub);
echo '<h3>Departures from '.$airportinfo->name.'</h3>';
}
else
{
# Get all of the schedule
$allschedules = SchedulesData::findSchedules(array('s.enabled'=>1), Config::Get('ROUTE_MAP_SHOW_NUMBER'));
}
$this->set('allschedules', $allschedules);
$this->render('flown_routes_map.tpl');
}
}