diff options
author | Pheng Heong TAN <phtan90@gmail.com> | 2016-07-09 13:13:57 +0800 |
---|---|---|
committer | 无闻 <u@gogs.io> | 2016-07-09 13:13:57 +0800 |
commit | 467d7dacb68da78c1ec8dbe45d1dc745ecdf7f8d (patch) | |
tree | 7bb31e4d1d94ff3bd6e304134c258c9f43c53019 /models | |
parent | d62ab499784386935fa20152c1c163d0ef62d31a (diff) | |
download | gitea-467d7dacb68da78c1ec8dbe45d1dc745ecdf7f8d.tar.gz gitea-467d7dacb68da78c1ec8dbe45d1dc745ecdf7f8d.zip |
Modify behaviour of repo-delete. (#3232)
Re: issues gogits/gogs#2863 and gogits/gogs#3231
As a result of modifications to the contents of the conf folder, `make bindata`
was run, causing an update to bindata.go.
Meta
-----
This commit will be rebased onto the 'develop' branch.
Diffstat (limited to 'models')
-rw-r--r-- | models/repo.go | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/models/repo.go b/models/repo.go index 870e63b207..56e5e00eea 100644 --- a/models/repo.go +++ b/models/repo.go @@ -1409,21 +1409,9 @@ func DeleteRepository(uid, repoID int64) error { } if repo.NumForks > 0 { - if repo.IsPrivate { - forkRepos, err := GetRepositoriesByForkID(repo.ID) - if err != nil { - return fmt.Errorf("getRepositoriesByForkID: %v", err) - } - for i := range forkRepos { - if err = DeleteRepository(forkRepos[i].OwnerID, forkRepos[i].ID); err != nil { - log.Error(4, "DeleteRepository [%d]: %v", forkRepos[i].ID, err) - } - } - } else { if _, err = x.Exec("UPDATE `repository` SET fork_id=0,is_fork=? WHERE fork_id=?", false, repo.ID); err != nil { log.Error(4, "reset 'fork_id' and 'is_fork': %v", err) } - } } return nil |