فهرست منبع

Minor fix for PR #3667

Unknwon 8 سال پیش
والد
کامیت
16d3e7085e
9فایلهای تغییر یافته به همراه8 افزوده شده و 20 حذف شده
  1. 1 1
      README.md
  2. 1 1
      gogs.go
  3. 0 0
      modules/bindata/bindata.go
  4. 1 2
      modules/setting/setting.go
  5. 1 0
      routers/repo/http.go
  6. 1 1
      templates/.VERSION
  7. 1 5
      templates/repo/bare.tmpl
  8. 1 5
      templates/repo/home.tmpl
  9. 1 5
      templates/repo/wiki/view.tmpl

+ 1 - 1
README.md

@@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra
 
 ![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true)
 
-##### Current tip version: 0.9.106 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions ~~or submit a task on [alpha stage automated binary building system](https://build.gogs.io/)~~)
+##### Current tip version: 0.9.107 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions ~~or submit a task on [alpha stage automated binary building system](https://build.gogs.io/)~~)
 
 | Web | UI  | Preview  |
 |:-------------:|:-------:|:-------:|

+ 1 - 1
gogs.go

@@ -17,7 +17,7 @@ import (
 	"github.com/gogits/gogs/modules/setting"
 )
 
-const APP_VER = "0.9.106.1222"
+const APP_VER = "0.9.107.1222"
 
 func init() {
 	runtime.GOMAXPROCS(runtime.NumCPU())

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
modules/bindata/bindata.go


+ 1 - 2
modules/setting/setting.go

@@ -118,7 +118,7 @@ var (
 		MirrorQueueLength      int
 		PullRequestQueueLength int
 		PreferredLicenses      []string
-		DisableHTTPGit         bool
+		DisableHTTPGit         bool `ini:"DISABLE_HTTP_GIT"`
 
 		// Repository editor settings
 		Editor struct {
@@ -495,7 +495,6 @@ func NewContext() {
 
 	// Determine and create root git repository path.
 	sec = Cfg.Section("repository")
-	Repository.DisableHTTPGit = sec.Key("DISABLE_HTTP_GIT").MustBool()
 	RepoRootPath = sec.Key("ROOT").MustString(path.Join(homeDir, "gogs-repositories"))
 	forcePathSeparator(RepoRootPath)
 	if !filepath.IsAbs(RepoRootPath) {

+ 1 - 0
routers/repo/http.go

@@ -484,6 +484,7 @@ func HTTPBackend(ctx *context.Context, cfg *serviceConfig) http.HandlerFunc {
 					w.Write([]byte("Interacting with repositories by HTTP protocol is not allowed"))
 					return
 				}
+
 				if route.method != r.Method {
 					if r.Proto == "HTTP/1.1" {
 						w.WriteHeader(http.StatusMethodNotAllowed)

+ 1 - 1
templates/.VERSION

@@ -1 +1 @@
-0.9.106.1222
+0.9.107.1222

+ 1 - 5
templates/repo/bare.tmpl

@@ -26,11 +26,7 @@
 										SSH
 									</button>
 								{{end}}
-								{{if not $.DisableHTTP}}
-									<input id="repo-clone-url" value="{{$.CloneLink.HTTPS}}" readonly>
-								{{else}}
-									<input id="repo-clone-url" value="{{$.CloneLink.SSH}}" readonly>
-								{{end}}
+								<input id="repo-clone-url" value="{{if not $.DisableHTTP}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
 								<button class="ui basic button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
 									<i class="octicon octicon-clippy"></i>
 								</button>

+ 1 - 5
templates/repo/home.tmpl

@@ -61,11 +61,7 @@
 								SSH
 							</button>
 						{{end}}
-						{{if not $.DisableHTTP}}
-							<input id="repo-clone-url" value="{{$.CloneLink.HTTPS}}" readonly>
-						{{else}}
-							<input id="repo-clone-url" value="{{$.CloneLink.SSH}}" readonly>
-						{{end}}
+						<input id="repo-clone-url" value="{{if not $.DisableHTTP}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
 						<button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
 							<i class="octicon octicon-clippy"></i>
 						</button>

+ 1 - 5
templates/repo/wiki/view.tmpl

@@ -39,11 +39,7 @@
 							SSH
 						</button>
 					{{end}}
-					{{if not $.DisableHTTP}}
-						<input id="repo-clone-url" value="{{$.WikiCloneLink.HTTPS}}" readonly>
-					{{else}}
-						<input id="repo-clone-url" value="{{$.WikiCloneLink.SSH}}" readonly>
-					{{end}}
+					<input id="repo-clone-url" value="{{if not $.DisableHTTP}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
 					<button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
 						<i class="octicon octicon-clippy"></i>
 					</button>

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است