This commit is contained in:
hufangzhou
2021-07-14 17:51:06 +08:00
parent a2340a1a91
commit 089977624b
2 changed files with 4 additions and 3 deletions
+1
View File
@@ -129,6 +129,7 @@ class project extends control
foreach($projects as $project)
{
$project->parent = $this->program->getTopByID($project->parent);
$project->parent = isset($programs[$project->parent]) ? $project->parent : $project->id;
$orderedProjects[$project->parent][] = $project;
unset($projects[$project->id]);
}
+3 -3
View File
@@ -54,7 +54,7 @@ $projectsPinYin = common::convert2Pinyin($projectNames);
foreach($projects as $programID => $programProjects)
{
/* Add the program name before project. */
if($programID)
if(isset($programs[$programID]))
{
$programName = zget($programs, $programID);
@@ -99,8 +99,8 @@ foreach($projects as $programID => $programProjects)
if($selected == 'selected') $tabActive = 'closed';
}
/* If the programID is greater than 0, the project is the last one in the program, print the closed label. */
if($programID and !isset($programProjects[$index + 1]))
/* If the project is the last one in the program, print the closed label. */
if(isset($programs[$programID]) and !isset($programProjects[$index + 1]))
{
if($projectCounts[$programID]['myProject']) $myProjectsHtml .= '</ul></li>';
if($projectCounts[$programID]['others']) $normalProjectsHtml .= '</ul></li>';