Hardening
This commit is contained in:
@@ -80,12 +80,15 @@ foreach ($products as $product) {
|
||||
$version_configurations = [];
|
||||
|
||||
foreach ($product_config as $item) {
|
||||
|
||||
if ($item['productrowid'] == $product['rowID']) {
|
||||
// Initialize version array if it doesn't exist
|
||||
if (!isset($version_configurations[$item['version']])) {
|
||||
|
||||
$version_configurations[$item['version']] = [
|
||||
'version_id' => $item['version'],
|
||||
'config_setting' => $item['config'],
|
||||
'main_option_for_display' => $item['measurement'],
|
||||
'configurations' => []
|
||||
];
|
||||
}
|
||||
@@ -106,7 +109,7 @@ foreach ($products as $product) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Add all version configurations to the catalog
|
||||
$catalog[$product['rowID']]['versions'] = array_values($version_configurations);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ if(isset($get_content) && $get_content!=''){
|
||||
//Filter out only relevant servicereports
|
||||
$filter_key_1 = '"%serialnumber%"';
|
||||
$filter_key_2 = '"ServiceReport"';
|
||||
$clause .= ' AND h.type = '.$filter_key_2.' AND h.description like '.$filter_key_1;
|
||||
$clause .= ' AND h.type = '.$filter_key_2.' AND NOT e.productrowid = "31" AND h.description like '.$filter_key_1;
|
||||
}
|
||||
elseif ($v[0] == 'created') {
|
||||
//build up search
|
||||
|
||||
@@ -69,7 +69,7 @@ if (isset($criterias['productrowid']) && $criterias['productrowid'] != ''){
|
||||
}
|
||||
else {
|
||||
//SQL for Paging include name from different tables
|
||||
$sql = 'SELECT pc.*, pv.config,pag.group_mandatory, pag.group_type,
|
||||
$sql = 'SELECT pc.*, pv.config,pv.measurement,pag.group_mandatory, pag.group_type,
|
||||
CASE WHEN p.rowID IS NOT NULL THEN p.productname
|
||||
WHEN pag.group_id IS NOT NULL THEN pag.group_name
|
||||
END AS assignment_name,
|
||||
|
||||
Reference in New Issue
Block a user