Skip to content

Commit

Permalink
Merge pull request opencad-community#7 in OC/opencad-app from ~DMAKEY…
Browse files Browse the repository at this point in the history
…/opencad-app:release/stable to release/stable

* commit 'eb5f9ba5d5f0f632148e70f1cda4c1cd45c8982a':
  Fixed Vehicle lookup plate owner returning owner id instead of Name
  • Loading branch information
Phill J. Fernandes committed Aug 9, 2019
2 parents f96e4b8 + eb5f9ba commit 361e2b8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
30 changes: 15 additions & 15 deletions actions/ncic.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ function name()
$warningIndex = 0;
foreach($result as $row)
{
$encode["warningId"][$warningIndex] = $row[0];
$encode["warning_name"][$warningIndex] = $row[2];
$encode["warningId"][$warningIndex] = $row['id'];
$encode["warning_name"][$warningIndex] = $row['warning_name'];

$warningIndex++;
}
Expand Down Expand Up @@ -250,16 +250,16 @@ function plate()
foreach($result as $row)
{

$encode["plate"] = $row[2];
$encode["veh_make"] = $row[3];
$encode["veh_model"] = $row[4];
$encode["veh_pcolor"] = $row[5];
$encode["veh_scolor"] = $row[6];
$encode["veh_ro"] = $row[12];
$encode["veh_insurance"] = $row[7];
$encode["flags"] = $row[8];
$encode["veh_reg_state"] = $row[9];
$encode["notes"] = $row[10];
$encode["plate"] = $row['veh_plate'];
$encode["veh_make"] = $row['veh_make'];
$encode["veh_model"] = $row['veh_model'];
$encode["veh_pcolor"] = $row['veh_pcolor'];
$encode["veh_scolor"] = $row['veh_scolor'];
$encode["veh_ro"] = $row['name'];
$encode["veh_insurance"] = $row['veh_insurance'];
$encode["flags"] = $row['flags'];
$encode["veh_reg_state"] = $row['veh_reg_state'];
$encode["notes"] = $row['notes'];

}
}
Expand Down Expand Up @@ -312,9 +312,9 @@ function weapon()
foreach($result as $row)
{
$userId = $row[0];
$encode["userId"] = $row[0];
$encode["first_name"] = $row[1];
$encode["weapon_permit"] = $row[2];
$encode["userId"] = $row['user_id'];
$encode["first_name"] = $row['name'];
$encode["weapon_permit"] = $row['weapon_permit'];
}

$stmt = $pdo->prepare("SELECT id, name_id, weapon_type, weapon_name FROM ".DB_PREFIX."ncic_weapons WHERE name_id = ?");
Expand Down
2 changes: 1 addition & 1 deletion sql/oc_update.sql
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ ALTER TABLE `<DB_PREFIX>ncic_plates` CHANGE `veh_insurance type`
set('CTP','Third Party','Comprehensive') AFTER `veh_insurance`;

ALTER TABLE `<DB_PREFIX>ncic_plates` CHANGE `flags`
set('STOLEN','WANTED','SUSPENDED REGISTRATION','CANCELED REGISTRATION','EXPIRED REGISTRATION','INSURANCE FLAG','DRIVER FLAG','NO INSURANCE') AFTER `veh_insurance type`;
set('NONE','STOLEN','WANTED','SUSPENDED REGISTRATION','CANCELED REGISTRATION','EXPIRED REGISTRATION','INSURANCE FLAG','DRIVER FLAG','NO INSURANCE') AFTER `veh_insurance type`;

ALTER TABLE `<DB_PREFIX>ncic_plates` CHANGE `veh_reg_state`
set('Los Santos','Blaine County','San Andreas') AFTER `flags`;
Expand Down

0 comments on commit 361e2b8

Please sign in to comment.