diff --git a/module/execution/model.php b/module/execution/model.php index 2226bf4c81..c3687f85f2 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2008,7 +2008,6 @@ class executionModel extends model $parentList = array(); foreach($executions as $key => $execution) { - $execution->projectName = htmlspecialchars_decode($execution->projectName); $execution->productName = isset($productNameList[$execution->id]) ? $productNameList[$execution->id] : ''; /* Process the end time. */ diff --git a/module/program/model.php b/module/program/model.php index 9cfdc86cf2..b80bced09b 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -1490,9 +1490,6 @@ class programModel extends model $project->teamMembers = isset($teamMembers[$projectID]) ? array_keys($teamMembers[$projectID]) : array(); $project->leftTasks = isset($leftTasks[$projectID]) ? $leftTasks[$projectID]->tasks : '—'; - /* Convert predefined HTML entities to characters. */ - $project->name = htmlspecialchars_decode($project->name, ENT_QUOTES); - $stats[$projectID] = $project; } diff --git a/module/project/model.php b/module/project/model.php index 724ce53410..5d71e61c3f 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -2660,7 +2660,12 @@ class projectModel extends model $doingExecutions = array(); $latestExecutions = array(); - foreach($executions as $execution) $doingExecutions[$execution->project][$execution->id] = $execution; + foreach($executions as $execution) + { + if(!empty($execution->projectName)) $execution->projectName = htmlspecialchars_decode($execution->projectName); + $doingExecutions[$execution->project][$execution->id] = $execution; + } + foreach($doingExecutions as $projectID => $executions) { krsort($doingExecutions[$projectID]); @@ -2674,6 +2679,9 @@ class projectModel extends model { if(strpos('wait,doing,closed', $project->status) === false) continue; + /* Convert predefined HTML entities to characters. */ + $project->name = htmlspecialchars_decode($project->name, ENT_QUOTES); + $projectPath = explode(',', trim($project->path, ',')); $topProgram = !empty($project->parent) ? $projectPath[0] : $project->parent;