yoda Posted September 28, 2008 Report Share Posted September 28, 2008 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 Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted September 28, 2008 Administrators Report Share Posted September 28, 2008 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! Quote Link to comment Share on other sites More sharing options...
yoda Posted September 28, 2008 Author Report Share Posted September 28, 2008 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 Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted September 28, 2008 Administrators Report Share Posted September 28, 2008 Yep that one. Add me on yahoo, nabby86@yahoo.com, I do need some people for help with testing I'll include docs, and it'll generate the proper settings .ini file for use. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted September 30, 2008 Administrators Report Share Posted September 30, 2008 They've been commited, with FSACARS being partially working. Thanks! Quote Link to comment Share on other sites More sharing options...
RogerB Posted October 2, 2008 Report Share Posted October 2, 2008 Does this include the custom fields? Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted October 3, 2008 Administrators Report Share Posted October 3, 2008 His patch yes, it makes it clearer on how to do it. I'll leave it in to do that way. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted October 3, 2008 Administrators Report Share Posted October 3, 2008 Actually, fields will be this now: public function GetFieldValue($pilotid, $fieldname) IE: $value = PilotData::GetFieldValue($pilotid, 'VATSIM ID'); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.