Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logs in issue report #82

Open
asylume opened this issue Jul 9, 2014 · 0 comments
Open

Logs in issue report #82

asylume opened this issue Jul 9, 2014 · 0 comments

Comments

@asylume
Copy link

asylume commented Jul 9, 2014

There is minor issue with formatting logs preview: if PID is not included, html table cell (<td>) is not created, so main log message falls to PID column.

To fix this I replaced this part in includes/report.class.php line 184:

foreach ($cols as $idx=>$value) {
  switch ($idx) {
    case 0 : // TAG
        $html .= '<td>'.$value.'</td>';
      break;
    case 1 : // PID
        $html.= '<td>'.$value.'</td>';
      break;
  }
}

with:

$cols_count = count($cols);
if ($cols_count == 0) {
  // append empty cells
  $html .= '<td></td><td></td>';
}
else if ($cols_count == 1) {
  $html .= '<td>'.$cols[0].'</td>';
  // append empty cell, no pid
  $html .= '<td></td>';
}
else {
  $html .= '<td>'.$cols[0].'</td>';
  $html .= '<td>'.$cols[1].'</td>';
}

This ensures that rows have static number of columns (at least for tag/pid pair, I didn't check other possibilities).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant