@@ -46,6 +46,7 @@ func UncycloPath(userName, repoName string) string {
46
46
return filepath .Join (UserPath (userName ), strings .ToLower (repoName )+ ".wiki.git" )
47
47
}
48
48
49
+ // UncycloPath returns wiki data path for given repository.
49
50
func (repo * Repository ) UncycloPath () string {
50
51
return UncycloPath (repo .MustOwner ().Name , repo .Name )
51
52
}
@@ -70,6 +71,7 @@ func (repo *Repository) InitUncyclo() error {
70
71
return nil
71
72
}
72
73
74
+ // LocalUncycloPath returns the path to the local wiki repository (?).
73
75
func (repo * Repository ) LocalUncycloPath () string {
74
76
return path .Join (setting .AppDataPath , "tmp/local-wiki" , com .ToStr (repo .ID ))
75
77
}
@@ -141,14 +143,18 @@ func (repo *Repository) updateUncycloPage(doer *User, oldTitle, title, content, mes
141
143
return nil
142
144
}
143
145
146
+ // AddUncycloPage adds a new wiki page with a given title.
144
147
func (repo * Repository ) AddUncycloPage (doer * User , title , content , message string ) error {
145
148
return repo .updateUncycloPage (doer , "" , title , content , message , true )
146
149
}
147
150
151
+ // EditUncycloPage updates a wiki page identified by its title,
152
+ // optionally also changing title.
148
153
func (repo * Repository ) EditUncycloPage (doer * User , oldTitle , title , content , message string ) error {
149
154
return repo .updateUncycloPage (doer , oldTitle , title , content , message , false )
150
155
}
151
156
157
+ // DeleteUncycloPage deletes a wiki page identified by its title.
152
158
func (repo * Repository ) DeleteUncycloPage (doer * User , title string ) (err error ) {
153
159
wikiWorkingPool .CheckIn (com .ToStr (repo .ID ))
154
160
defer wikiWorkingPool .CheckOut (com .ToStr (repo .ID ))
0 commit comments