From e303914c3962cacd38d09b3d80a51627d1dc4f5c Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 16 Apr 2019 09:46:09 +0200 Subject: [statistics] Handle system an mainboard model separately ...especially for BIOS updates checks... --- modules-available/statistics/inc/parser.inc.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'modules-available/statistics/inc/parser.inc.php') diff --git a/modules-available/statistics/inc/parser.inc.php b/modules-available/statistics/inc/parser.inc.php index 4e0740fc..be9300f4 100644 --- a/modules-available/statistics/inc/parser.inc.php +++ b/modules-available/statistics/inc/parser.inc.php @@ -40,12 +40,19 @@ class Parser { } continue; } - if ($section === 'System Information' || $section === 'Base Board Information') { - if (empty($row['pcmodel']) && preg_match('/^\s*Product Name: +(\S.+?) *$/i', $line, $out)) { + if ($section === 'Base Board Information') { + if (preg_match('/^\s*Product Name: +(\S.+?) *$/i', $line, $out)) { + $row['mobomodel'] = $out[1]; + } + if (preg_match('/^\s*Manufacturer: +(\S.+?) *$/i', $line, $out)) { + $row['mobomanufacturer'] = $out[1]; + } + } elseif ($section === 'System Information') { + if (preg_match('/^\s*Product Name: +(\S.+?) *$/i', $line, $out)) { $row['pcmodel'] = $out[1]; } - if (empty($row['manufacturer']) && preg_match('/^\s*Manufacturer: +(\S.+?) *$/i', $line, $out)) { - $row['manufacturer'] = $out[1]; + if (preg_match('/^\s*Manufacturer: +(\S.+?) *$/i', $line, $out)) { + $row['pcmanufacturer'] = $out[1]; } } elseif ($section === 'Physical Memory Array') { if (!$ramOk && preg_match('/Use: System Memory/i', $line)) { -- cgit v1.2.3-55-g7522