mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Remove Unused Functions (#10516)
* remove ReplaceLeft * remove GetRepositoryByOwnerAndName chainload to models.GetRepositoryByOwnerAndName * remove CheckUnitUser chainload to models.CheckUnitUser * remove MakeAssigneeList * remove DownloadDiff & DownloadPatch -> DownloadDiffOrPatch * remove GetRandomBytesAsBase64 * remove PushUpdateDeleteTags * remove GetUserByKeyID (you still can resolve user by "k, err := GetPublicKeyByID; userID := k.OwnerID") * remove BasicAuthEncode from struct package -> same function in modules/base/tools ! * remove UserID from api.utils * remove unused func from structs package
This commit is contained in:
		@@ -81,23 +81,6 @@ func isUserAssignedToIssue(e Engine, issue *Issue, user *User) (isAssigned bool,
 | 
			
		||||
	return e.Get(&IssueAssignees{IssueID: issue.ID, AssigneeID: user.ID})
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// MakeAssigneeList concats a string with all names of the assignees. Useful for logs.
 | 
			
		||||
func MakeAssigneeList(issue *Issue) (assigneeList string, err error) {
 | 
			
		||||
	err = issue.loadAssignees(x)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return "", err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	for in, assignee := range issue.Assignees {
 | 
			
		||||
		assigneeList += assignee.Name
 | 
			
		||||
 | 
			
		||||
		if len(issue.Assignees) > (in + 1) {
 | 
			
		||||
			assigneeList += ", "
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ClearAssigneeByUserID deletes all assignments of an user
 | 
			
		||||
func clearAssigneeByUserID(sess *xorm.Session, userID int64) (err error) {
 | 
			
		||||
	_, err = sess.Delete(&IssueAssignees{AssigneeID: userID})
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user