mirror of
https://github.com/go-gitea/gitea
synced 2025-07-09 20:17:21 +00:00
Wiki: UI for page new
This commit is contained in:
@ -264,6 +264,14 @@ func (repo *Repository) RepoPath() (string, error) {
|
||||
return repo.repoPath(x)
|
||||
}
|
||||
|
||||
func (repo *Repository) WikiPath() (string, error) {
|
||||
if err := repo.GetOwner(); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return WikiPath(repo.Owner.Name, repo.Name), nil
|
||||
}
|
||||
|
||||
func (repo *Repository) RepoLink() (string, error) {
|
||||
if err := repo.GetOwner(); err != nil {
|
||||
return "", err
|
||||
@ -877,6 +885,11 @@ func RepoPath(userName, repoName string) string {
|
||||
return filepath.Join(UserPath(userName), strings.ToLower(repoName)+".git")
|
||||
}
|
||||
|
||||
// WikiPath returns wiki data path by given user and repository name.
|
||||
func WikiPath(userName, repoName string) string {
|
||||
return filepath.Join(UserPath(userName), strings.ToLower(repoName)+".wiki.git")
|
||||
}
|
||||
|
||||
// TransferOwnership transfers all corresponding setting from old user to new one.
|
||||
func TransferOwnership(u *User, newOwnerName string, repo *Repository) error {
|
||||
newOwner, err := GetUserByName(newOwnerName)
|
||||
|
Reference in New Issue
Block a user