mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 22:01:44 +02:00
1 parent
528682a294
commit
4b25bdfbc4
9 files changed
+55
-32
No files matched your search
@@ -3,7 +3,7 @@ Gogs - Go Git Service [
|

|
||||||
|
|
||||||
##### Current tip version: 0.9.35 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions)
|
##### Current tip version: 0.9.36 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions)
|
||||||
|
|
||||||
| Web | UI | Preview |
|
| Web | UI | Preview |
|
||||||
|:-------------:|:-------:|:-------:|
|
|:-------------:|:-------:|:-------:|
|
||||||
|
|||||||
@@ -345,6 +345,10 @@ MIRROR = 300
|
|||||||
CLONE = 300
|
CLONE = 300
|
||||||
PULL = 300
|
PULL = 300
|
||||||
|
|
||||||
|
[api]
|
||||||
|
; Max number of items will response in a page
|
||||||
|
MAX_RESPONSE_ITEMS = 50
|
||||||
|
|
||||||
[i18n]
|
[i18n]
|
||||||
LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,ja-JP,es-ES,pt-BR,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ
|
LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,ja-JP,es-ES,pt-BR,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ
|
||||||
NAMES = English,简体中文,繁體中文(香港),繁體中文(台湾),Deutsch,Français,Nederlands,Latviešu,Русский,日本語,Español,Português do Brasil,Polski,български,Italiano,Suomalainen,Türk,čeština
|
NAMES = English,简体中文,繁體中文(香港),繁體中文(台湾),Deutsch,Français,Nederlands,Latviešu,Русский,日本語,Español,Português do Brasil,Polski,български,Italiano,Suomalainen,Türk,čeština
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import (
|
|||||||
"github.com/gogits/gogs/modules/setting"
|
"github.com/gogits/gogs/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APP_VER = "0.9.35.0702"
|
const APP_VER = "0.9.36.0704"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
|
|||||||
@@ -1521,9 +1521,6 @@ func SearchRepositoryByName(opts *SearchRepoOptions) (repos []*Repository, _ int
|
|||||||
}
|
}
|
||||||
opts.Keyword = strings.ToLower(opts.Keyword)
|
opts.Keyword = strings.ToLower(opts.Keyword)
|
||||||
|
|
||||||
if opts.PageSize <= 0 || opts.PageSize > setting.ExplorePagingNum {
|
|
||||||
opts.PageSize = setting.ExplorePagingNum
|
|
||||||
}
|
|
||||||
if opts.Page <= 0 {
|
if opts.Page <= 0 {
|
||||||
opts.Page = 1
|
opts.Page = 1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ func (fi bindataFileInfo) Sys() interface{} {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var _confAppIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb4\x5a\x5b\x6f\x23\x47\x76\x7e\xef\x5f\x51\x96\xe3\xcc\x4c\xd0\x24\x75\x19\xcd\x8c\x65\x6b\x63\x8a\x6c\x4a\xdc\xe1\xcd\xdd\xe4\x8c\xc7\x03\xa1\xd5\x62\x17\xc9\xb6\x9a\xdd\x74\x57\x53\x1a\x19\x41\xb0\x46\x1e\x72\x01\x82\x3c\x24\x48\x10\x20\x08\x92\x87\x24\xc0\xe6\xb6\x8b\xbc\xd8\x89\x93\x17\x27\xef\xe3\xff\xb0\xf1\x66\x9f\xf6\x2f\xe4\x3b\xa7\xaa\xc9\xa6\x46\xd6\x66\x81\xac\x2f\x62\x75\x75\xd5\xa9\xaa\x73\xfd\xce\xa9\x7e\x5b\xf4\x9c\x67\x8e\x2b\xf8\x4f\xb7\xdf\x6c\xb7\x5e\x88\xe1\x49\xdb\x13\xad\x76\xc7\xb1\xde\x16\x83\x8e\x53\xf7\x1c\xd1\xad\x3f\x75\x44\xe3\xa4\xde\x3b\x76\x3c\xd1\xef\x89\x46\xdf\x75\x1d\x6f\xd0\xef\x35\xdb\xbd\x63\xd1\x18\x79\xc3\x7e\x17\x9d\xbd\x56\xfb\x58\xcf\xb4\xde\x13\xf5\xc5\x42\x24\xc1\x5c\x8a\x7c\x16\xe4\x42\xcd\xd2\x2b\x25\xd2\x44\xc8\x4b\x99\x5d\x8b\x45\x30\xc5\x8b\x28\x8f\xa5\x55\x1f\x0c\xfc\x5e\xbd\xeb\x88\x43\x71\x9c\x4e\xd5\x01\xfe\x8a\xe3\x28\x17\x9e\xcc\x2e\xa3\xb1\x04\xa5\xc6\x2c\x48\x30\x1c\x7d\xd1\x44\x5c\xa7\x4b\x91\x2d\x13\x11\xa7\xe3\x20\x8e\xaf\x2d\x77\xd4\xf3\x47\x1e\x76\x7f\x28\xa6\x51\x8e\xd1\x4e\x94\xcf\x64\x26\xb6\x42\x79\xb9\x65\x8b\xad\x45\x96\x86\x5b\x22\x45\x47\x2e\x55\x8e\x9e\x50\x4e\x82\x65\x0c\x5a\x4a\x8f\x61\x0a\x38\x3a\x6d\x00\xcf\x96\xf5\x32\x93\x8b\x54\x45\x79\x9a\x5d\x9f\x5a\x6e\xbf\x3f\x14\x87\x96\xd7\x70\xdb\x83\xa1\x3f\x7c\x31\xa0\x61\xe7\x81\x9a\x61\xa5\xa6\xa1\x54\xef\x79\x6d\x31\x9e\x05\x99\x92\xb9\x45\x0f\x3e\x58\xe5\x7a\x0e\x4d\x7c\x4f\xb4\xd2\x6c\x2c\xcd\xb1\x13\x79\x25\xd6\xd4\x45\x9e\x8a\x73\x29\x16\x59\x74\x19\xe4\xd2\x6a\xf5\xdd\x86\xe3\x0f\xdc\xf6\xb3\xfa\x90\x56\x99\x04\xb1\xa2\xe3\x1f\xc7\xe9\x79\x10\x8b\x79\xf0\x2a\x9a\x2f\xe7\x62\x9c\xc9\x20\x8f\xc0\xc9\x38\x9a\x83\x25\xe9\xa4\x4c\x71\x81\x93\x2f\x95\xcc\x6c\x51\xd9\x11\x73\x19\x24\x4a\x24\xa9\x1e\x69\x75\xeb\x1f\xf9\x0d\xd7\xa9\x0f\xdb\xfd\x9e\xdf\x69\x77\xdb\xd8\x1f\x86\x61\x85\x41\x90\x8f\x67\x82\xf8\x23\x3e\x5d\xca\xa5\x14\xb1\x4c\xa6\xf9\xcc\xc6\x9a\x17\xcc\xf7\x40\x89\x38\xc8\x20\x03\x34\xb0\x96\x8a\xce\x21\xb8\xc1\xa8\xd3\xf1\x5d\xe7\xc3\x91\xe3\x0d\x7d\xfc\x1d\x39\x7e\xc7\xe9\x1d\x0f\x4f\x40\x76\x67\x1b\xff\x80\x95\xcb\xe8\x14\xf4\x7b\xcb\xf9\x39\x36\x56\xde\x6a\x24\x95\x56\x8c\x20\x93\xac\x1c\x32\x14\x51\x02\x05\x01\xab\x5e\x2d\xe2\x14\xbd\xa4\x23\x96\xf3\xd1\xa0\xd3\x77\xc1\x96\xfa\x31\x54\xcd\xef\x8d\xba\xa0\xbe\xbb\xbd\x41\x34\x52\x6a\xf9\xdd\xe4\x98\x4c\xdb\xf3\x46\x37\x88\xec\x6c\x12\x59\xb1\x37\x9d\x83\x59\xea\x06\x91\x60\x9c\x47\x97\x51\x7e\x2d\x26\x52\x86\x56\xcb\x71\x9a\x3e\xb3\xb3\xdf\x05\x1b\x0d\xc1\x7d\xd0\x7b\x16\xc4\x60\x1f\xc8\x9d\x41\x09\xe7\xb2\x32\x4e\x71\x94\x33\x48\x22\x0f\x44\x1e\x4c\x6d\x12\x4e\x28\xce\xaf\x45\x3d\x09\xb3\x34\x0a\xc5\xf7\x30\xaf\x4a\x3b\xa9\x27\x58\xeb\x32\x88\xd1\xc7\x93\x20\x34\xf0\x7e\x2b\xc1\xea\x5a\x7d\xc3\x48\x05\x60\xfb\x96\xb8\x8a\xe2\x58\xcc\x82\x4b\xb2\x2c\xb9\x52\x67\x95\x5f\xc7\xa4\x2d\x5d\x62\x5d\x94\x4c\xd2\x03\x31\xcb\xf3\x85\x3a\xa8\xd5\xa0\xd5\x32\x4e\xa1\x1a\xaa\x3a\x4d\xd3\x69\x2c\xab\x38\x64\xed\x4a\x9e\xd7\x96\x8b\x10\x9a\xa7\x6a\xbb\xdb\x3b\x0f\x6b\x3b\x3b\x35\x6f\xb9\x58\xa4\x59\x5e\x99\xa4\x59\xa5\x74\x80\x4a\x94\x54\x1a\xb3\x2c\xc5\xf3\xde\xbb\xfc\xd2\x6c\xdf\x1a\x9e\x38\x5d\x07\x6c\x80\x8c\xfc\xae\x33\xac\xfb\xc3\xfa\x31\x58\x71\xf6\xf6\x64\xb2\xbf\xf7\x70\xef\x8c\x55\xa0\x1a\x84\xf3\x28\xd9\x54\x04\x52\xd2\xbb\x45\x46\x46\xbd\x29\xb1\xfd\xed\x37\x75\xe9\x4e\x12\xae\x33\xe8\xdf\x49\x22\x49\x73\xb8\x98\xbb\x89\xf4\xfa\xc3\x76\xe3\xa6\x02\xee\x6f\x90\x49\xb3\x69\x90\x44\x9f\x69\xb3\xbc\x8b\x56\xdf\x3d\x7e\x63\x3f\xd6\xcb\x79\x90\x5d\x84\xe9\x15\x73\xc8\x49\x48\xc8\x10\x6f\x16\x42\x03\x30\xef\x1c\xe6\x7e\x01\x9b\xc8\x65\xa2\x40\xde\x72\x7a\xf5\xa3\x8e\xe3\xc3\xc1\x34\x61\xc4\x3d\xc7\x3f\x82\x49\x3f\x2d\xb9\x8b\x4e\xa4\xd8\x2b\x8c\x97\x2a\x4f\xe7\x62\xe4\x76\x2a\xde\x98\x64\x59\x3a\x26\x3c\x27\xef\x8d\xec\x3a\x4a\x2e\x94\xb8\x9a\xc9\x04\x0c\x4d\x42\x99\x45\xc9\x54\x74\xcd\x8e\x40\x0e\xd2\xc6\xea\xc1\x7c\x81\x5d\xc1\xc1\xda\xf3\x60\x9a\xc0\xcd\x69\x9f\xef\x83\xba\xef\x35\x48\x09\x3c\x38\x3b\xeb\x25\xa4\x0a\x47\x77\x6a\x0d\xdc\xfe\xb0\x0f\xb5\xc0\xbe\x48\x0b\xad\x66\xbf\x5b\x6f\xf7\xf0\xc4\x6e\x7b\x96\xaa\x9c\x3d\x2b\xcd\x47\xe7\x3b\xf7\x8b\xf1\x0f\x48\x5f\xdf\xb9\xaf\x87\xe3\xe1\x9d\xfb\x27\xc3\xe1\xc0\x1f\xf4\xdd\xe1\x03\x55\xb3\xf8\xa1\xde\x6c\x92\xb7\xdf\xae\xf2\xbf\xd6\x6a\x00\xfa\xf6\xc8\xeb\x80\x05\xb4\x88\xb8\xdf\xec\x7e\xfc\x80\xce\xcf\x67\xa0\xd8\x22\xae\xd2\xec\x82\xf4\xee\xbe\x5a\xc2\xe1\xe1\xf4\x9e\x77\x22\xb4\x11\x3c\x80\x8d\x43\x15\x14\x1d\x1f\xa6\x21\x94\x0e\x3f\x55\x90\x6b\x27\x62\x8e\x1d\x8b\x71\xa0\xc0\x44\x0a\x40\x61\x4a\xaa\x03\x77\x0e\x1e\xc2\x89\x8f\x75\x80\x2a\x9b\xe3\x25\x39\x02\x9a\x5c\x8f\x73\x28\x09\x39\xea\x24\xbe\x36\x01\x2c\xe3\x75\x35\xaf\x40\x28\x94\x14\x8c\x88\x20\x51\x50\x14\x33\xb1\x35\x3a\x17\xbf\xac\x5a\x9d\x7e\xa3\x0e\x57\x7b\x07\xc3\x56\x8c\x79\x93\x67\x88\x53\xda\x73\xf0\xa2\x13\x04\x8f\x25\x34\x80\x05\x4e\x4b\x06\x97\x41\x14\xd3\x6b\xab\xd9\xf6\x58\xb5\x68\xd8\x5a\x9d\x9e\xcf\x24\xc7\x53\x18\xac\x38\x5f\x46\Line truncated
|
var _confAppIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb4\x5a\x5b\x6f\x23\x47\x76\x7e\xef\x5f\x51\x96\xe3\xcc\x4c\xd0\x24\x75\x19\xcd\x8c\x65\x6b\x63\x8a\x6c\x4a\xdc\xe1\xcd\xdd\xe4\x8c\xc7\x03\xa1\xd5\x62\x17\xc9\xb6\x9a\xdd\x74\x57\x53\x1a\x19\x41\xb0\x46\x1e\x72\x01\x82\x3c\x24\x48\x10\x20\x08\x92\x87\x24\xc0\xe6\xb6\x8b\xbc\xd8\x89\x93\x17\x27\xef\xe3\xff\xb0\xf1\x66\x9f\xf6\x2f\xe4\x3b\xa7\xaa\xc9\xa6\x46\xd6\x66\x81\xac\x2f\x62\x75\x75\xd5\xa9\xaa\x73\xfd\xce\xa9\x7e\x5b\xf4\x9c\x67\x8e\x2b\xf8\x4f\xb7\xdf\x6c\xb7\x5e\x88\xe1\x49\xdb\x13\xad\x76\xc7\xb1\xde\x16\x83\x8e\x53\xf7\x1c\xd1\xad\x3f\x75\x44\xe3\xa4\xde\x3b\x76\x3c\xd1\xef\x89\x46\xdf\x75\x1d\x6f\xd0\xef\x35\xdb\xbd\x63\xd1\x18\x79\xc3\x7e\x17\x9d\xbd\x56\xfb\x58\xcf\xb4\xde\x13\xf5\xc5\x42\x24\xc1\x5c\x8a\x7c\x16\xe4\x42\xcd\xd2\x2b\x25\xd2\x44\xc8\x4b\x99\x5d\x8b\x45\x30\xc5\x8b\x28\x8f\xa5\x55\x1f\x0c\xfc\x5e\xbd\xeb\x88\x43\x71\x9c\x4e\xd5\x01\xfe\x8a\xe3\x28\x17\x9e\xcc\x2e\xa3\xb1\x04\xa5\xc6\x2c\x48\x30\x1c\x7d\xd1\x44\x5c\xa7\x4b\x91\x2d\x13\x11\xa7\xe3\x20\x8e\xaf\x2d\x77\xd4\xf3\x47\x1e\x76\x7f\x28\xa6\x51\x8e\xd1\x4e\x94\xcf\x64\x26\xb6\x42\x79\xb9\x65\x8b\xad\x45\x96\x86\x5b\x22\x45\x47\x2e\x55\x8e\x9e\x50\x4e\x82\x65\x0c\x5a\x4a\x8f\x61\x0a\x38\x3a\x6d\x00\xcf\x96\xf5\x32\x93\x8b\x54\x45\x79\x9a\x5d\x9f\x5a\x6e\xbf\x3f\x14\x87\x96\xd7\x70\xdb\x83\xa1\x3f\x7c\x31\xa0\x61\xe7\x81\x9a\x61\xa5\xa6\xa1\x54\xef\x79\x6d\x31\x9e\x05\x99\x92\xb9\x45\x0f\x3e\x58\xe5\x7a\x0e\x4d\x7c\x4f\xb4\xd2\x6c\x2c\xcd\xb1\x13\x79\x25\xd6\xd4\x45\x9e\x8a\x73\x29\x16\x59\x74\x19\xe4\xd2\x6a\xf5\xdd\x86\xe3\x0f\xdc\xf6\xb3\xfa\x90\x56\x99\x04\xb1\xa2\xe3\x1f\xc7\xe9\x79\x10\x8b\x79\xf0\x2a\x9a\x2f\xe7\x62\x9c\xc9\x20\x8f\xc0\xc9\x38\x9a\x83\x25\xe9\xa4\x4c\x71\x81\x93\x2f\x95\xcc\x6c\x51\xd9\x11\x73\x19\x24\x4a\x24\xa9\x1e\x69\x75\xeb\x1f\xf9\x0d\xd7\xa9\x0f\xdb\xfd\x9e\xdf\x69\x77\xdb\xd8\x1f\x86\x61\x85\x41\x90\x8f\x67\x82\xf8\x23\x3e\x5d\xca\xa5\x14\xb1\x4c\xa6\xf9\xcc\xc6\x9a\x17\xcc\xf7\x40\x89\x38\xc8\x20\x03\x34\xb0\x96\x8a\xce\x21\xb8\xc1\xa8\xd3\xf1\x5d\xe7\xc3\x91\xe3\x0d\x7d\xfc\x1d\x39\x7e\xc7\xe9\x1d\x0f\x4f\x40\x76\x67\x1b\xff\x80\x95\xcb\xe8\x14\xf4\x7b\xcb\xf9\x39\x36\x56\xde\x6a\x24\x95\x56\x8c\x20\x93\xac\x1c\x32\x14\x51\x02\x05\x01\xab\x5e\x2d\xe2\x14\xbd\xa4\x23\x96\xf3\xd1\xa0\xd3\x77\xc1\x96\xfa\x31\x54\xcd\xef\x8d\xba\xa0\xbe\xbb\xbd\x41\x34\x52\x6a\xf9\xdd\xe4\x98\x4c\xdb\xf3\x46\x37\x88\xec\x6c\x12\x59\xb1\x37\x9d\x83\x59\xea\x06\x91\x60\x9c\x47\x97\x51\x7e\x2d\x26\x52\x86\x56\xcb\x71\x9a\x3e\xb3\xb3\xdf\x05\x1b\x0d\xc1\x7d\xd0\x7b\x16\xc4\x60\x1f\xc8\x9d\x41\x09\xe7\xb2\x32\x4e\x71\x94\x33\x48\x22\x0f\x44\x1e\x4c\x6d\x12\x4e\x28\xce\xaf\x45\x3d\x09\xb3\x34\x0a\xc5\xf7\x30\xaf\x4a\x3b\xa9\x27\x58\xeb\x32\x88\xd1\xc7\x93\x20\x34\xf0\x7e\x2b\xc1\xea\x5a\x7d\xc3\x48\x05\x60\xfb\x96\xb8\x8a\xe2\x58\xcc\x82\x4b\xb2\x2c\xb9\x52\x67\x95\x5f\xc7\xa4\x2d\x5d\x62\x5d\x94\x4c\xd2\x03\x31\xcb\xf3\x85\x3a\xa8\xd5\xa0\xd5\x32\x4e\xa1\x1a\xaa\x3a\x4d\xd3\x69\x2c\xab\x38\x64\xed\x4a\x9e\xd7\x96\x8b\x10\x9a\xa7\x6a\xbb\xdb\x3b\x0f\x6b\x3b\x3b\x35\x6f\xb9\x58\xa4\x59\x5e\x99\xa4\x59\xa5\x74\x80\x4a\x94\x54\x1a\xb3\x2c\xc5\xf3\xde\xbb\xfc\xd2\x6c\xdf\x1a\x9e\x38\x5d\x07\x6c\x80\x8c\xfc\xae\x33\xac\xfb\xc3\xfa\x31\x58\x71\xf6\xf6\x64\xb2\xbf\xf7\x70\xef\x8c\x55\xa0\x1a\x84\xf3\x28\xd9\x54\x04\x52\xd2\xbb\x45\x46\x46\xbd\x29\xb1\xfd\xed\x37\x75\xe9\x4e\x12\xae\x33\xe8\xdf\x49\x22\x49\x73\xb8\x98\xbb\x89\xf4\xfa\xc3\x76\xe3\xa6\x02\xee\x6f\x90\x49\xb3\x69\x90\x44\x9f\x69\xb3\xbc\x8b\x56\xdf\x3d\x7e\x63\x3f\xd6\xcb\x79\x90\x5d\x84\xe9\x15\x73\xc8\x49\x48\xc8\x10\x6f\x16\x42\x03\x30\xef\x1c\xe6\x7e\x01\x9b\xc8\x65\xa2\x40\xde\x72\x7a\xf5\xa3\x8e\xe3\xc3\xc1\x34\x61\xc4\x3d\xc7\x3f\x82\x49\x3f\x2d\xb9\x8b\x4e\xa4\xd8\x2b\x8c\x97\x2a\x4f\xe7\x62\xe4\x76\x2a\xde\x98\x64\x59\x3a\x26\x3c\x27\xef\x8d\xec\x3a\x4a\x2e\x94\xb8\x9a\xc9\x04\x0c\x4d\x42\x99\x45\xc9\x54\x74\xcd\x8e\x40\x0e\xd2\xc6\xea\xc1\x7c\x81\x5d\xc1\xc1\xda\xf3\x60\x9a\xc0\xcd\x69\x9f\xef\x83\xba\xef\x35\x48\x09\x3c\x38\x3b\xeb\x25\xa4\x0a\x47\x77\x6a\x0d\xdc\xfe\xb0\x0f\xb5\xc0\xbe\x48\x0b\xad\x66\xbf\x5b\x6f\xf7\xf0\xc4\x6e\x7b\x96\xaa\x9c\x3d\x2b\xcd\x47\xe7\x3b\xf7\x8b\xf1\x0f\x48\x5f\xdf\xb9\xaf\x87\xe3\xe1\x9d\xfb\x27\xc3\xe1\xc0\x1f\xf4\xdd\xe1\x03\x55\xb3\xf8\xa1\xde\x6c\x92\xb7\xdf\xae\xf2\xbf\xd6\x6a\x00\xfa\xf6\xc8\xeb\x80\x05\xb4\x88\xb8\xdf\xec\x7e\xfc\x80\xce\xcf\x67\xa0\xd8\x22\xae\xd2\xec\x82\xf4\xee\xbe\x5a\xc2\xe1\xe1\xf4\x9e\x77\x22\xb4\x11\x3c\x80\x8d\x43\x15\x14\x1d\x1f\xa6\x21\x94\x0e\x3f\x55\x90\x6b\x27\x62\x8e\x1d\x8b\x71\xa0\xc0\x44\x0a\x40\x61\x4a\xaa\x03\x77\x0e\x1e\xc2\x89\x8f\x75\x80\x2a\x9b\xe3\x25\x39\x02\x9a\x5c\x8f\x73\x28\x09\x39\xea\x24\xbe\x36\x01\x2c\xe3\x75\x35\xaf\x40\x28\x94\x14\x8c\x88\x20\x51\x50\x14\x33\xb1\x35\x3a\x17\xbf\xac\x5a\x9d\x7e\xa3\x0e\x57\x7b\x07\xc3\x56\x8c\x79\x93\x67\x88\x53\xda\x73\xf0\xa2\x13\x04\x8f\x25\x34\x80\x05\x4e\x4b\x06\x97\x41\x14\xd3\x6b\xab\xd9\xf6\x58\xb5\x68\xd8\x5a\x9d\x9e\xcf\x24\xc7\x53\x18\xac\x38\x5f\x46\Line truncated
|
||||||
|
|
||||||
func confAppIniBytes() ([]byte, error) {
|
func confAppIniBytes() ([]byte, error) {
|
||||||
return bindataRead(
|
return bindataRead(
|
||||||
@@ -301,7 +301,7 @@ func confAppIni() (*asset, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
info := bindataFileInfo{name: "conf/app.ini", size: 11589, mode: os.FileMode(420), modTime: time.Unix(1467456724, 0)}
|
info := bindataFileInfo{name: "conf/app.ini", size: 11666, mode: os.FileMode(420), modTime: time.Unix(1467623266, 0)}
|
||||||
a := &asset{bytes: bytes, info: info}
|
a := &asset{bytes: bytes, info: info}
|
||||||
return a, nil
|
return a, nil
|
||||||
}
|
}
|
||||||
|
|||||||
+23
-16
@@ -159,20 +159,6 @@ var (
|
|||||||
SessionConfig session.Options
|
SessionConfig session.Options
|
||||||
CSRFCookieName = "_csrf"
|
CSRFCookieName = "_csrf"
|
||||||
|
|
||||||
// Git settings
|
|
||||||
Git struct {
|
|
||||||
MaxGitDiffLines int
|
|
||||||
MaxGitDiffLineCharacters int
|
|
||||||
MaxGitDiffFiles int
|
|
||||||
GcArgs []string `delim:" "`
|
|
||||||
Timeout struct {
|
|
||||||
Migrate int
|
|
||||||
Mirror int
|
|
||||||
Clone int
|
|
||||||
Pull int
|
|
||||||
} `ini:"git.timeout"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Cron tasks
|
// Cron tasks
|
||||||
Cron struct {
|
Cron struct {
|
||||||
UpdateMirror struct {
|
UpdateMirror struct {
|
||||||
@@ -194,6 +180,25 @@ var (
|
|||||||
} `ini:"cron.check_repo_stats"`
|
} `ini:"cron.check_repo_stats"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Git settings
|
||||||
|
Git struct {
|
||||||
|
MaxGitDiffLines int
|
||||||
|
MaxGitDiffLineCharacters int
|
||||||
|
MaxGitDiffFiles int
|
||||||
|
GcArgs []string `delim:" "`
|
||||||
|
Timeout struct {
|
||||||
|
Migrate int
|
||||||
|
Mirror int
|
||||||
|
Clone int
|
||||||
|
Pull int
|
||||||
|
} `ini:"git.timeout"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// API settings
|
||||||
|
API struct {
|
||||||
|
MaxResponseItems int
|
||||||
|
}
|
||||||
|
|
||||||
// I18n settings
|
// I18n settings
|
||||||
Langs, Names []string
|
Langs, Names []string
|
||||||
dateLangs map[string]string
|
dateLangs map[string]string
|
||||||
@@ -465,10 +470,12 @@ func NewContext() {
|
|||||||
|
|
||||||
if err = Cfg.Section("markdown").MapTo(&Markdown); err != nil {
|
if err = Cfg.Section("markdown").MapTo(&Markdown); err != nil {
|
||||||
log.Fatal(4, "Fail to map Markdown settings: %v", err)
|
log.Fatal(4, "Fail to map Markdown settings: %v", err)
|
||||||
} else if err = Cfg.Section("git").MapTo(&Git); err != nil {
|
|
||||||
log.Fatal(4, "Fail to map Git settings: %v", err)
|
|
||||||
} else if err = Cfg.Section("cron").MapTo(&Cron); err != nil {
|
} else if err = Cfg.Section("cron").MapTo(&Cron); err != nil {
|
||||||
log.Fatal(4, "Fail to map Cron settings: %v", err)
|
log.Fatal(4, "Fail to map Cron settings: %v", err)
|
||||||
|
} else if err = Cfg.Section("git").MapTo(&Git); err != nil {
|
||||||
|
log.Fatal(4, "Fail to map Git settings: %v", err)
|
||||||
|
} else if err = Cfg.Section("api").MapTo(&API); err != nil {
|
||||||
|
log.Fatal(4, "Fail to map API settings: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
Langs = Cfg.Section("i18n").Key("LANGS").Strings(",")
|
Langs = Cfg.Section("i18n").Key("LANGS").Strings(",")
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
// Copyright 2016 The Gogs Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a MIT-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
package convert
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/gogits/gogs/modules/setting"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ToCorrectPageSize makes sure page size is in allowed range.
|
||||||
|
func ToCorrectPageSize(size int) int {
|
||||||
|
if size <= 0 {
|
||||||
|
size = 10
|
||||||
|
} else if size > setting.API.MaxResponseItems {
|
||||||
|
size = setting.API.MaxResponseItems
|
||||||
|
}
|
||||||
|
return size
|
||||||
|
}
|
||||||
@@ -7,8 +7,6 @@ package repo
|
|||||||
import (
|
import (
|
||||||
"path"
|
"path"
|
||||||
|
|
||||||
"github.com/Unknwon/com"
|
|
||||||
|
|
||||||
api "github.com/gogits/go-gogs-client"
|
api "github.com/gogits/go-gogs-client"
|
||||||
|
|
||||||
"github.com/gogits/gogs/models"
|
"github.com/gogits/gogs/models"
|
||||||
@@ -23,11 +21,8 @@ import (
|
|||||||
func Search(ctx *context.APIContext) {
|
func Search(ctx *context.APIContext) {
|
||||||
opts := &models.SearchRepoOptions{
|
opts := &models.SearchRepoOptions{
|
||||||
Keyword: path.Base(ctx.Query("q")),
|
Keyword: path.Base(ctx.Query("q")),
|
||||||
OwnerID: com.StrTo(ctx.Query("uid")).MustInt64(),
|
OwnerID: ctx.QueryInt64("uid"),
|
||||||
PageSize: com.StrTo(ctx.Query("limit")).MustInt(),
|
PageSize: convert.ToCorrectPageSize(ctx.QueryInt("limit")),
|
||||||
}
|
|
||||||
if opts.PageSize == 0 {
|
|
||||||
opts.PageSize = 10
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check visibility.
|
// Check visibility.
|
||||||
@@ -50,7 +45,7 @@ func Search(ctx *context.APIContext) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repos, _, err := models.SearchRepositoryByName(opts)
|
repos, count, err := models.SearchRepositoryByName(opts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.JSON(500, map[string]interface{}{
|
ctx.JSON(500, map[string]interface{}{
|
||||||
"ok": false,
|
"ok": false,
|
||||||
@@ -74,6 +69,7 @@ func Search(ctx *context.APIContext) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ctx.SetLinkHeader(int(count), setting.API.MaxResponseItems)
|
||||||
ctx.JSON(200, map[string]interface{}{
|
ctx.JSON(200, map[string]interface{}{
|
||||||
"ok": true,
|
"ok": true,
|
||||||
"data": results,
|
"data": results,
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
0.9.35.0702
|
0.9.36.0704
|
||||||
Reference in new issue
Block a user