This commit is contained in:
Ryan Prather 2018-10-17 14:42:49 -04:00
parent fc22e6875e
commit 43da94ed9c
2 changed files with 12 additions and 17 deletions

View File

@ -254,10 +254,10 @@ class ste_cat
*/
public function get_Table_Row($intCount = 0, $status_count = null)
{
$nf = 0;
$open = 0;
$na = 0;
if (!is_null($status_count)) {
$nf = $this->nf;
$open = $this->open;
$na = $this->na;
if (!is_null($status_count) && is_array($status_count)) {
if (isset($status_count['nf'])) {
$nf = $status_count['nf'];
}
@ -271,6 +271,10 @@ class ste_cat
}
}
if(!$intCount) {
$intCount = $this->tgt_count;
}
$cat_sources = [];
if (is_array($this->sources) && count($this->sources)) {
foreach ($this->sources as $src) {

View File

@ -468,20 +468,11 @@ include_once 'header.inc';
}
}
/**
* @var ste_cat $cat
*/
foreach ($cats as $cat) {
$nr = $db->get_Finding_Count_By_Status($cat->get_ID(), "Not Reviewed");
$na = $db->get_Finding_Count_By_Status($cat->get_ID(), "Not Applicable");
$nf = $db->get_Finding_Count_By_Status($cat->get_ID(), "Not a Finding");
$open = $db->get_Finding_Count_By_Status($cat->get_ID(), "Open");
$count = $db->get_STE_Cat_TGT_Count($cat->get_ID());
print $cat->get_Table_Row($count, [
"open" => $open,
"nf" => $nf,
"na" => $na,
"nr" => $nr
]);
print $cat->get_Table_Row();
}
}
else {