File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,18 @@ func (repo *Repository) CanEnableTimetracker() bool {
2121
2222// IsTimetrackerEnabled returns whether or not the timetracker is enabled. It returns the default value from config if an error occurs.
2323func (repo * Repository ) IsTimetrackerEnabled () bool {
24+ return repo .isTimetrackerEnabled (x )
25+ }
26+
27+ // IsTimetrackerEnabled returns whether or not the timetracker is enabled. It returns the default value from config if an error occurs.
28+ func (repo * Repository ) isTimetrackerEnabled (e Engine ) bool {
2429 if ! setting .Service .EnableTimetracking {
2530 return false
2631 }
2732
2833 var u * RepoUnit
2934 var err error
30- if u , err = repo .GetUnit ( UnitTypeIssues ); err != nil {
35+ if u , err = repo .getUnit ( e , UnitTypeIssues ); err != nil {
3136 return setting .Service .DefaultEnableTimetracking
3237 }
3338 return u .IssuesConfig ().EnableTimetracker
You can’t perform that action at this time.
0 commit comments