From ba57175628acfbe3564d38c22ecfa67935e85b2b Mon Sep 17 00:00:00 2001 From: chenfei Date: Mon, 27 Jul 2020 08:07:21 +0800 Subject: [PATCH] * Finish task #7523. --- module/bug/model.php | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/module/bug/model.php b/module/bug/model.php index b107894db5..7274b663bc 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -13,8 +13,6 @@ buildStepOrder($step, $steps, $i); - $stepResult = (!isset($stepResults[$stepId]) or empty($stepResults[$stepId]['real'])) ? '' : $stepResults[$stepId]['real']; - $bugStep .= $order . '. ' . $step->desc . "
"; - $bugResult .= $order . '. ' . $stepResult . "
"; - $bugExpect .= $order . '. ' . $step->expect . "
"; + $bugStep .= $i . '. ' . $step->desc . "
"; + $bugResult .= $i . '. ' . $stepResult . "
"; + $bugExpect .= $i . '. ' . $step->expect . "
"; $i++; } - $bugSteps .= $bugStep ? str_replace('
', '', $this->lang->bug->tplStep) . $bugStep : $this->lang->bug->tplStep; + $bugSteps .= $bugStep ? str_replace('
', '', $this->lang->bug->tplStep) . $bugStep : $this->lang->bug->tplStep; $bugSteps .= $bugResult ? str_replace('
', '', $this->lang->bug->tplResult) . $bugResult : $this->lang->bug->tplResult; $bugSteps .= $bugExpect ? str_replace('
', '', $this->lang->bug->tplExpect) . $bugExpect : $this->lang->bug->tplExpect; } @@ -2849,24 +2845,4 @@ class bugModel extends model return sprintf($this->lang->bug->summary, count($bugs), $unresolved); } - - /** - * Build step order. - * - * @param object $step - * @param array $caseSteps - * @param int $i - * @access public - * @return array - */ - public function buildStepOrder($step, $caseSteps, $i) - { - if($step->parent == 0 or !in_array($step->parent, $caseSteps)) return array($i, $i); - - $i --; - $j = isset($this->steps[$step->parent]) ? (count($this->steps[$step->parent]) + 1) : 1; - $this->steps[$step->parent][] = $step->id; - - return array($i, "$i.$j"); - } }