mirror of
https://github.com/go-gitea/gitea
synced 2025-07-15 23:17:19 +00:00
Fix implementation of repo Home func (#2601)
* Fix implementation of repo Home func * Make fixture changes for testing
This commit is contained in:
@@ -60,6 +60,14 @@ func (u *Unit) CanDisable() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsLessThan compares order of two units
|
||||
func (u Unit) IsLessThan(unit Unit) bool {
|
||||
if (u.Type == UnitTypeExternalTracker || u.Type == UnitTypeExternalWiki) && unit.Type != UnitTypeExternalTracker && unit.Type != UnitTypeExternalWiki {
|
||||
return false
|
||||
}
|
||||
return u.Idx < unit.Idx
|
||||
}
|
||||
|
||||
// Enumerate all the units
|
||||
var (
|
||||
UnitCode = Unit{
|
||||
|
Reference in New Issue
Block a user