diff options
author | Simon Rettberg | 2019-04-16 09:46:09 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-04-16 09:46:09 +0200 |
commit | 22b8ce53944c23ae5552abf2e1b24e56622590b5 (patch) | |
tree | 117e1aeca0c42a8f2966956b37cb40204acf5c55 /modules-available/statistics/inc/parser.inc.php | |
parent | [serversetup-bwlp-ipxe] Add debug-shell boot entry (diff) | |
download | slx-admin-22b8ce53944c23ae5552abf2e1b24e56622590b5.tar.gz slx-admin-22b8ce53944c23ae5552abf2e1b24e56622590b5.tar.xz slx-admin-22b8ce53944c23ae5552abf2e1b24e56622590b5.zip |
[statistics] Handle system an mainboard model separately
...especially for BIOS updates checks...
Diffstat (limited to 'modules-available/statistics/inc/parser.inc.php')
-rw-r--r-- | modules-available/statistics/inc/parser.inc.php | 15 |
1 files changed, 11 insertions, 4 deletions
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)) { |