* Finish task #83943.

This commit is contained in:
zhujinyong
2023-02-09 12:22:54 +08:00
parent 8c0f3cce83
commit c3822c43c3
+8 -3
View File
@@ -115,7 +115,7 @@ class programplanModel extends model
*
* @param int $executionID
* @param int $productID
* @param string $type
* @param string $type all|leaf
* @access public
* @return array
*/
@@ -125,11 +125,16 @@ class programplanModel extends model
$pairs = array(0 => '');
$parents = array();
foreach($plans as $planID => $plan) $parents[$plan->parent] = true;
if(strpos($type, 'leaf') !== false)
{
$parents = array();
foreach($plans as $planID => $plan) $parents[$plan->parent] = true;
}
foreach($plans as $planID => $plan)
{
if(strpos($type, 'leaf') !== false and isset($parents[$plan->id])) continue;
$paths = array_slice(explode(',', trim($plan->path, ',')), 1);
$planName = '';
foreach($paths as $path)