changed the site view to hide top projects/committers when the max_top_projects and max_top_commiters are set to 0 in the configuration file
This commit is contained in:
parent
5100985eaf
commit
fb87b8489c
@ -153,12 +153,12 @@ max_upload_size = "10000"
|
|||||||
max_latest_projects = "10"
|
max_latest_projects = "10"
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; Maximum number of projects to show in the top projects graph
|
; Maximum number of projects to show in the top projects graph (0 to hide)
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
max_top_projects = "10"
|
max_top_projects = "10"
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; Maximum number of committers to show in the top committers graph
|
; Maximum number of committers to show in the top committers graph (0 to hide)
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
max_top_committers = "10"
|
max_top_committers = "10"
|
||||||
|
|
||||||
|
@ -104,8 +104,15 @@ class Site extends Controller
|
|||||||
$login['id'], $this->issuehelper->_get_open_status_array($this->lang), 0);
|
$login['id'], $this->issuehelper->_get_open_status_array($this->lang), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
$commit_counts_per_project = $this->logs->countCodeCommitsPerProject ('', 0, CODEPOT_MAX_TOP_PROJECTS);
|
if (CODEPOT_MAX_TOP_PROJECTS > 0)
|
||||||
$commit_counts_per_user = $this->logs->countCodeCommitsPerUser ('', 0, CODEPOT_MAX_TOP_COMMITTERS);
|
$commit_counts_per_project = $this->logs->countCodeCommitsPerProject ('', 0, CODEPOT_MAX_TOP_PROJECTS);
|
||||||
|
else
|
||||||
|
$commit_counts_per_project = array();
|
||||||
|
|
||||||
|
if (CODEPOT_MAX_TOP_COMMITTERS > 0)
|
||||||
|
$commit_counts_per_user = $this->logs->countCodeCommitsPerUser ('', 0, CODEPOT_MAX_TOP_COMMITTERS);
|
||||||
|
else
|
||||||
|
$commit_counts_per_user = array();
|
||||||
|
|
||||||
if (/*$issues === FALSE || $recently_resolved_issues === FALSE ||*/
|
if (/*$issues === FALSE || $recently_resolved_issues === FALSE ||*/
|
||||||
$open_issue_counts_per_project === FALSE ||
|
$open_issue_counts_per_project === FALSE ||
|
||||||
|
Loading…
Reference in New Issue
Block a user