This one is in PilotData.class.php:
public static function changePilotRank($pilotid, $rankid) {
$rank = RanksData::getRankInfo($rankid);
if (!($rank_level = RanksData::getRankLevel($rankid))) {
return false;
}
return self::updateProfile($pilotid, array(
'rankid' => $rank->rankid,
'rank' => $rank->rank,
'ranklevel' => $rank_level
));
}
And this is in RanksData.class.php:
public static function calculatePilotRanks() {
/* Don't calculate a pilot's rank if this is set */
if (Config::Get('RANKS_AUTOCALCULATE') === false) {
return;
}
$ranks_list = self::getAllRanks();
$pilots = PilotData::getAllPilots();
if (count($pilots) == 0 || !is_array($pilots)) {
return;
}
foreach ($pilots as $pilot) {
self::calculateUpdatePilotRank($pilot->pilotid, $ranks_list);
}
}
Hope these help.