From fdcb5ec109344d9258e707f50bb5f58903bdda00 Mon Sep 17 00:00:00 2001 From: Dave MacFarlane Date: Fri, 6 Nov 2015 15:54:09 -0500 Subject: [PATCH 1/2] Make dashboard retrieve project info from the correct place --- modules/dashboard/php/NDB_Form_dashboard.class.inc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/dashboard/php/NDB_Form_dashboard.class.inc b/modules/dashboard/php/NDB_Form_dashboard.class.inc index c51b14b79e4..1187a59b77b 100644 --- a/modules/dashboard/php/NDB_Form_dashboard.class.inc +++ b/modules/dashboard/php/NDB_Form_dashboard.class.inc @@ -89,20 +89,20 @@ class NDB_Form_Dashboard extends NDB_Form $useProjects = $config->getSetting('useProjects'); $this->tpl_data['useProjects'] = $useProjects; if ($useProjects == "true") { - $projects = $config->getSetting('Projects'); - foreach ($projects['project'] as $project) { + $projects = Utility::getProjectList(); + foreach ($projects as $projectID => $project) { + $projectInfo = $config->getProjectSettings($projectID); $this->createProjectProgressBar( - $project['id'], - $project['title'], - $project['recruitmentTarget'], - $this->getTotalRecruitmentByProject($project['id']) + $projectID, + $projectInfo['Name'], + $projectInfo['recruitmentTarget'], + $this->getTotalRecruitmentByProject($projectID) ); } } // Charts $this->tpl_data['total_scans'] = $DB->pselectOne( - "SELECT COUNT(*) FROM files f", array() ); From fdb09902e2a8dddd980b21e0d4e4b28caa71075b Mon Sep 17 00:00:00 2001 From: Dave MacFarlane Date: Mon, 9 Nov 2015 09:17:11 -0500 Subject: [PATCH 2/2] Re-added inexplicably removed SQL statement --- modules/dashboard/php/NDB_Form_dashboard.class.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/dashboard/php/NDB_Form_dashboard.class.inc b/modules/dashboard/php/NDB_Form_dashboard.class.inc index 1187a59b77b..1b6845c2e38 100644 --- a/modules/dashboard/php/NDB_Form_dashboard.class.inc +++ b/modules/dashboard/php/NDB_Form_dashboard.class.inc @@ -103,6 +103,7 @@ class NDB_Form_Dashboard extends NDB_Form // Charts $this->tpl_data['total_scans'] = $DB->pselectOne( + "SELECT COUNT(*) FROM files f", array() );