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