diff options
author | Bill Marquette <bill.marquette@gmail.com> | 2009-02-15 21:58:34 -0600 |
---|---|---|
committer | Bill Marquette <bill.marquette@gmail.com> | 2009-02-15 21:58:34 -0600 |
commit | 7206b74c18aa8a1790748cb3fe5f0845ac54f44e (patch) | |
tree | 672d330d09406c04f0a975d7710cf5194364e64f /config | |
parent | 2c6030880fbf9ef72951ae288324adb9ccb67edd (diff) | |
download | pfsense-packages-7206b74c18aa8a1790748cb3fe5f0845ac54f44e.tar.gz pfsense-packages-7206b74c18aa8a1790748cb3fe5f0845ac54f44e.tar.bz2 pfsense-packages-7206b74c18aa8a1790748cb3fe5f0845ac54f44e.zip |
hopefully fix logging from old versions
Diffstat (limited to 'config')
-rw-r--r-- | config/imspector/services_imspector_logs.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/config/imspector/services_imspector_logs.php b/config/imspector/services_imspector_logs.php index 6da86d47..26ebd97a 100644 --- a/config/imspector/services_imspector_logs.php +++ b/config/imspector/services_imspector_logs.php @@ -101,15 +101,21 @@ if ($_POST['mode'] == "render") { while (!feof($fd)) { $line = fgets($fd); if(feof($fd)) continue; - - preg_match('/([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),(|.*),(.*)/', $line, $matches); + $new_format = '([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*)'; + $old_format = '([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*)'; + preg_match("/${new_format}|${old_format}/", $line, $matches); $address = $matches[1]; $timestamp = $matches[2]; $direction = $matches[3]; $type = $matches[4]; $filtered = $matches[5]; - $category = $matches[6]; - $data = $matches[7]; + if(count($matches) == 8) { + $category = $matches[6]; + $data = $matches[7]; + } else { + $category = ""; + $data = $matches[6]; + } if($direction == '0') { $bgcolor = $convo_remote_bgcolor; |