2 bugs and patches

Hello,I’d like to submit two patches for two bugs I found in phpvms, svn version:(1) in the pirep report page, the dropdown menu shows all airlines, regardless of being or not active.PATCH:

--- core/modules/PIREPS/PIREPS.php	2008-09-27 21:02:38.000000000 +0100+++ core/modules/PIREPS/PIREPS.php.new	2008-09-28 15:37:21.000000000 +0100@@ -155,7 +155,7 @@ Template::Set('pirepfields', PIREPData::GetAllFields()); Template::Set('bid', SchedulesData::GetBid($this->get->id)); // get the bid info Template::Set('allairports', OperationsData::GetAllAirports());- Template::Set('allairlines', OperationsData::GetAllAirlines());+ Template::Set('allairlines', OperationsData::GetAllAirlines(true)); Template::Set('allaircraft', OperationsData::GetAllAircraft()); Template::Show('pirep_new.tpl');

(2) I found a bit more complicated to show custom fields in the pilots list template, so I updated the comment and sample code.PATCH:

--- core/templates/pilots_list.tpl	2008-09-01 22:10:32.000000000 +0100+++ core/templates/pilots_list.tpl.new	2008-09-28 17:01:31.000000000 +0100@@ -14,13 +14,18 @@ foreach($allpilots as $pilot) { /*- * To include additional fields, uncomment this next line- * and then you can use the fields - $fields->VATSIM_ID for- * instance. your field name in all caps, and spaces replaced by - * an underscore+ * To include additional fields, uncomment the following lines,+ * set $fieldname to the desired field name (all caps, and spaces + * replaced by an underscore), and use the result in $value. */-	//$fields = PilotData::GetFieldData($pilot->pilotid);-	+ // $fieldname = "VATSIM_ID";+ // $value = "";+ // $fields = PilotData::GetFieldData($pilot->pilotid);+ // foreach($fields as $f) {+ // if ($f->fieldname==$fieldname) {+ // $value = $f->value;+ // }+ // } ?> <tr> <td><a href="<?=SITE_URL?>/index.php/Pilots/reports/<?=$pilot->pilotid?>">

I’ll probably have more in the near future, since I’m working hard to get phpvms working for my VA.All the best,Rodrigo Venturahttp://www.goldenjet-va.org

Thanks, I’ve added the first patch. For the second one, I’ve changed how that works a bit, I just merged the fields into the main array. It’s not in SVN yet, I’ll commit tonight maybe, I’m adding in FSACARS support.Thanks!

When you say FSACARS you mean satavirtual’s one? That’s really great, since we’d really like to have it in our VA. I’ll try it as soon as you commit it. Are you including docs on how to use it? I’m very interested in testing it right away.Cheers,Rodrigo Venturahttp://www.goldenjet-va.org

Yep that one. Add me on yahoo, [email protected], I do need some people for help with testing I’ll include docs, and it’ll generate the proper settings .ini file for use.

They’ve been commited, with FSACARS being partially working. Thanks!

Does this include the custom fields?

His patch yes, it makes it clearer on how to do it. I’ll leave it in to do that way.

Actually, fields will be this now:

public function GetFieldValue($pilotid, $fieldname)

IE:

$value = PilotData::GetFieldValue($pilotid, 'VATSIM ID');