From 8c2959494d7c2e5127f10a2be2f7460c02878174 Mon Sep 17 00:00:00 2001 From: Edwin Smulders Date: Sun, 22 Jul 2007 00:49:15 +0000 Subject: [PATCH] Hide RESOLVED and CLOSED bugs unless we are displaying all bugs. --- include/bugs.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/bugs.php b/include/bugs.php index d1c15e9..213e589 100644 --- a/include/bugs.php +++ b/include/bugs.php @@ -287,6 +287,11 @@ class Bug { return $sReturn; } + + function isOpen() + { + return ($this->sBug_status != 'RESOLVED' && $this->sBug_status != 'CLOSED'); + } } @@ -335,8 +340,11 @@ function view_version_bugs($iVersionId = null, $aBuglinkIds) { $oBuglink = new Bug($iBuglinkId); - if ( (!isset($aClean['sAllBugs']) && $oBuglink->sBug_status != 'RESOLVED') - || isset($aClean['sAllBugs']) ) + if ( + (!isset($aClean['sAllBugs']) && $oBuglink->isOpen() ) + || + isset($aClean['sAllBugs']) + ) { // set row color $bgcolor = ($c % 2 == 0) ? "color0" : "color1";