mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 22:01:44 +02:00
finish attachments when create issue
This commit is contained in:
1 parent
89c2bd4a0d
commit
34f6cbfc2a
16 files changed
+288
-154
No files matched your search
+16
-2
@@ -327,7 +327,22 @@ func runWeb(ctx *cli.Context) {
|
||||
|
||||
m.Group("", func() {
|
||||
m.Get("/:username", user.Profile)
|
||||
m.Post("/attachments", repo.UploadAttachment)
|
||||
m.Get("/attachments/:uuid", func(ctx *middleware.Context) {
|
||||
attach, err := models.GetAttachmentByUUID(ctx.Params(":uuid"))
|
||||
if err != nil {
|
||||
if models.IsErrAttachmentNotExist(err) {
|
||||
ctx.Error(404)
|
||||
} else {
|
||||
ctx.Handle(500, "GetAttachmentByUUID", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Fix #312. Attachments with , in their name are not handled correctly by Google Chrome.
|
||||
// We must put the name in " manually.
|
||||
ctx.ServeFileContent(attach.LocalPath(), "\""+attach.Name+"\"")
|
||||
})
|
||||
m.Post("/issues/attachments", repo.UploadIssueAttachment)
|
||||
}, ignSignIn)
|
||||
|
||||
if macaron.Env == macaron.DEV {
|
||||
@@ -428,7 +443,6 @@ func runWeb(ctx *cli.Context) {
|
||||
m.Post("/:index/label", repo.UpdateIssueLabel)
|
||||
m.Post("/:index/milestone", repo.UpdateIssueMilestone)
|
||||
m.Post("/:index/assignee", repo.UpdateAssignee)
|
||||
m.Get("/:index/attachment/:id", repo.IssueGetAttachment)
|
||||
})
|
||||
m.Group("/labels", func() {
|
||||
m.Post("/new", bindIgnErr(auth.CreateLabelForm{}), repo.NewLabel)
|
||||
|
||||
+1
-1
@@ -212,7 +212,7 @@ ALLOWED_TYPES = image/jpeg|image/png
|
||||
; Max size of each file. Defaults to 32MB
|
||||
MAX_SIZE = 32
|
||||
; Max number of files per upload. Defaults to 10
|
||||
MAX_FILES = 10
|
||||
MAX_FILES = 5
|
||||
|
||||
[time]
|
||||
; Specifies the format for fully outputed dates. Defaults to RFC1123
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
)
|
||||
|
||||
const APP_VER = "0.6.4.0810 Beta"
|
||||
const APP_VER = "0.6.4.0811 Beta"
|
||||
|
||||
func init() {
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
|
||||
@@ -279,3 +279,24 @@ func IsErrMilestoneNotExist(err error) bool {
|
||||
func (err ErrMilestoneNotExist) Error() string {
|
||||
return fmt.Sprintf("milestone does not exist [id: %d, repo_id: %d]", err.ID, err.RepoID)
|
||||
}
|
||||
|
||||
// _____ __ __ .__ __
|
||||
// / _ \_/ |__/ |______ ____ | |__ _____ ____ _____/ |_
|
||||
// / /_\ \ __\ __\__ \ _/ ___\| | \ / \_/ __ \ / \ __\
|
||||
// / | \ | | | / __ \\ \___| Y \ Y Y \ ___/| | \ |
|
||||
// \____|__ /__| |__| (____ /\___ >___| /__|_| /\___ >___| /__|
|
||||
// \/ \/ \/ \/ \/ \/ \/
|
||||
|
||||
type ErrAttachmentNotExist struct {
|
||||
ID int64
|
||||
UUID string
|
||||
}
|
||||
|
||||
func IsErrAttachmentNotExist(err error) bool {
|
||||
_, ok := err.(ErrAttachmentNotExist)
|
||||
return ok
|
||||
}
|
||||
|
||||
func (err ErrAttachmentNotExist) Error() string {
|
||||
return fmt.Sprintf("attachment does not exist [id: %d, uuid: %s]", err.ID, err.UUID)
|
||||
}
|
||||
+77
-29
@@ -9,7 +9,10 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"io"
|
||||
"mime/multipart"
|
||||
"os"
|
||||
"path"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -20,12 +23,12 @@ import (
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/log"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
gouuid "github.com/gogits/gogs/modules/uuid"
|
||||
)
|
||||
|
||||
var (
|
||||
ErrIssueNotExist = errors.New("Issue does not exist")
|
||||
ErrWrongIssueCounter = errors.New("Invalid number of issues for this milestone")
|
||||
ErrAttachmentNotExist = errors.New("Attachment does not exist")
|
||||
ErrAttachmentNotLinked = errors.New("Attachment does not belong to this issue")
|
||||
ErrMissingIssueNumber = errors.New("No issue number specified")
|
||||
)
|
||||
@@ -159,7 +162,20 @@ func (i *Issue) AfterDelete() {
|
||||
}
|
||||
|
||||
// CreateIssue creates new issue with labels for repository.
|
||||
func NewIssue(repo *Repository, issue *Issue, labelIDs []int64) (err error) {
|
||||
func NewIssue(repo *Repository, issue *Issue, labelIDs []int64, uuids []string) (err error) {
|
||||
// Check attachments.
|
||||
attachments := make([]*Attachment, 0, len(uuids))
|
||||
for _, uuid := range uuids {
|
||||
attach, err := GetAttachmentByUUID(uuid)
|
||||
if err != nil {
|
||||
if IsErrAttachmentNotExist(err) {
|
||||
continue
|
||||
}
|
||||
return fmt.Errorf("GetAttachmentByUUID[%s]: %v", uuid, err)
|
||||
}
|
||||
attachments = append(attachments, attach)
|
||||
}
|
||||
|
||||
sess := x.NewSession()
|
||||
defer sessionRelease(sess)
|
||||
if err = sess.Begin(); err != nil {
|
||||
@@ -188,6 +204,14 @@ func NewIssue(repo *Repository, issue *Issue, labelIDs []int64) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
for i := range attachments {
|
||||
attachments[i].IssueID = issue.ID
|
||||
// No assign value could be 0, so ignore AllCols().
|
||||
if _, err = sess.Id(attachments[i].ID).Update(attachments[i]); err != nil {
|
||||
return fmt.Errorf("update attachment[%d]: %v", attachments[i].ID, err)
|
||||
}
|
||||
}
|
||||
|
||||
// Notify watchers.
|
||||
act := &Action{
|
||||
ActUserID: issue.Poster.Id,
|
||||
@@ -1210,49 +1234,73 @@ func (c *Comment) AfterDelete() {
|
||||
}
|
||||
}
|
||||
|
||||
// Attachment represent a attachment of issue/comment/release.
|
||||
type Attachment struct {
|
||||
Id int64
|
||||
IssueId int64
|
||||
CommentId int64
|
||||
ID int64 `xorm:"pk autoincr"`
|
||||
UUID string `xorm:"uuid UNIQUE"`
|
||||
IssueID int64 `xorm:"INDEX"`
|
||||
CommentID int64
|
||||
ReleaseID int64 `xorm:"INDEX"`
|
||||
Name string
|
||||
Path string `xorm:"TEXT"`
|
||||
Created time.Time `xorm:"CREATED"`
|
||||
}
|
||||
|
||||
// CreateAttachment creates a new attachment inside the database and
|
||||
func CreateAttachment(issueId, commentId int64, name, path string) (*Attachment, error) {
|
||||
sess := x.NewSession()
|
||||
defer sess.Close()
|
||||
// AttachmentLocalPath returns where attachment is stored in local file system based on given UUID.
|
||||
func AttachmentLocalPath(uuid string) string {
|
||||
return path.Join(setting.AttachmentPath, uuid[0:1], uuid[1:2], uuid)
|
||||
}
|
||||
|
||||
// LocalPath returns where attachment is stored in local file system.
|
||||
func (attach *Attachment) LocalPath() string {
|
||||
return AttachmentLocalPath(attach.UUID)
|
||||
}
|
||||
|
||||
// NewAttachment creates a new attachment object.
|
||||
func NewAttachment(name string, buf []byte, file multipart.File) (_ *Attachment, err error) {
|
||||
attach := &Attachment{
|
||||
UUID: gouuid.NewV4().String(),
|
||||
Name: name,
|
||||
}
|
||||
|
||||
if err = os.MkdirAll(path.Dir(attach.LocalPath()), os.ModePerm); err != nil {
|
||||
return nil, fmt.Errorf("MkdirAll: %v", err)
|
||||
}
|
||||
|
||||
fw, err := os.Create(attach.LocalPath())
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Create: %v", err)
|
||||
}
|
||||
defer fw.Close()
|
||||
|
||||
if _, err = fw.Write(buf); err != nil {
|
||||
return nil, fmt.Errorf("Write: %v", err)
|
||||
} else if _, err = io.Copy(fw, file); err != nil {
|
||||
return nil, fmt.Errorf("Copy: %v", err)
|
||||
}
|
||||
|
||||
sess := x.NewSession()
|
||||
defer sessionRelease(sess)
|
||||
if err := sess.Begin(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
a := &Attachment{IssueId: issueId, CommentId: commentId, Name: name, Path: path}
|
||||
|
||||
if _, err := sess.Insert(a); err != nil {
|
||||
sess.Rollback()
|
||||
if _, err := sess.Insert(attach); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return a, sess.Commit()
|
||||
return attach, sess.Commit()
|
||||
}
|
||||
|
||||
// Attachment returns the attachment by given ID.
|
||||
func GetAttachmentById(id int64) (*Attachment, error) {
|
||||
m := &Attachment{Id: id}
|
||||
|
||||
has, err := x.Get(m)
|
||||
|
||||
// GetAttachmentByUUID returns attachment by given UUID.
|
||||
func GetAttachmentByUUID(uuid string) (*Attachment, error) {
|
||||
attach := &Attachment{UUID: uuid}
|
||||
has, err := x.Get(attach)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if !has {
|
||||
return nil, ErrAttachmentNotExist{0, uuid}
|
||||
}
|
||||
|
||||
if !has {
|
||||
return nil, ErrAttachmentNotExist
|
||||
}
|
||||
|
||||
return m, nil
|
||||
return attach, nil
|
||||
}
|
||||
|
||||
func GetAttachmentsForIssue(issueId int64) ([]*Attachment, error) {
|
||||
@@ -1285,12 +1333,12 @@ func DeleteAttachment(a *Attachment, remove bool) error {
|
||||
func DeleteAttachments(attachments []*Attachment, remove bool) (int, error) {
|
||||
for i, a := range attachments {
|
||||
if remove {
|
||||
if err := os.Remove(a.Path); err != nil {
|
||||
if err := os.Remove(a.LocalPath()); err != nil {
|
||||
return i, err
|
||||
}
|
||||
}
|
||||
|
||||
if _, err := x.Delete(a.Id); err != nil {
|
||||
if _, err := x.Delete(a.ID); err != nil {
|
||||
return i, err
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,12 @@
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -16,6 +20,7 @@ import (
|
||||
|
||||
"github.com/gogits/gogs/modules/log"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
gouuid "github.com/gogits/gogs/modules/uuid"
|
||||
)
|
||||
|
||||
const _MIN_DB_VER = 0
|
||||
@@ -59,6 +64,7 @@ var migrations = []Migration{
|
||||
NewMigration("fix locale file load panic", fixLocaleFileLoadPanic), // V4 -> V5:v0.6.0
|
||||
NewMigration("trim action compare URL prefix", trimCommitActionAppUrlPrefix), // V5 -> V6:v0.6.3
|
||||
NewMigration("generate issue-label from issue", issueToIssueLabel), // V6 -> V7:v0.6.4
|
||||
NewMigration("refactor attachment table", attachmentRefactor), // V7 -> V8:v0.6.4
|
||||
}
|
||||
|
||||
// Migrate database to current version
|
||||
@@ -97,8 +103,11 @@ func Migrate(x *xorm.Engine) error {
|
||||
}
|
||||
|
||||
v := currentVersion.Version
|
||||
if int(v) > len(migrations) {
|
||||
return nil
|
||||
if int(v-_MIN_DB_VER) > len(migrations) {
|
||||
// User downgraded Gogs.
|
||||
currentVersion.Version = int64(len(migrations) + _MIN_DB_VER)
|
||||
_, err = x.Id(1).Update(currentVersion)
|
||||
return err
|
||||
}
|
||||
for i, m := range migrations[v-_MIN_DB_VER:] {
|
||||
log.Info("Migration: %s", m.Description())
|
||||
@@ -515,3 +524,85 @@ func issueToIssueLabel(x *xorm.Engine) error {
|
||||
|
||||
return sess.Commit()
|
||||
}
|
||||
|
||||
func attachmentRefactor(x *xorm.Engine) error {
|
||||
type Attachment struct {
|
||||
ID int64 `xorm:"pk autoincr"`
|
||||
UUID string `xorm:"uuid INDEX"`
|
||||
|
||||
// For rename purpose.
|
||||
Path string `xorm:"-"`
|
||||
NewPath string `xorm:"-"`
|
||||
}
|
||||
|
||||
results, err := x.Query("SELECT * FROM `attachment`")
|
||||
if err != nil {
|
||||
return fmt.Errorf("select attachments: %v", err)
|
||||
}
|
||||
|
||||
attachments := make([]*Attachment, 0, len(results))
|
||||
for _, attach := range results {
|
||||
if !com.IsExist(string(attach["path"])) {
|
||||
// If the attachment is already missing, there is no point to update it.
|
||||
continue
|
||||
}
|
||||
attachments = append(attachments, &Attachment{
|
||||
ID: com.StrTo(attach["id"]).MustInt64(),
|
||||
UUID: gouuid.NewV4().String(),
|
||||
Path: string(attach["path"]),
|
||||
})
|
||||
}
|
||||
|
||||
sess := x.NewSession()
|
||||
defer sessionRelease(sess)
|
||||
if err = sess.Begin(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = sess.Sync2(new(Attachment)); err != nil {
|
||||
return fmt.Errorf("Sync2: %v", err)
|
||||
}
|
||||
|
||||
// Note: Roll back for rename can be a dead loop,
|
||||
// so produces a backup file.
|
||||
var buf bytes.Buffer
|
||||
buf.WriteString("# old path -> new path\n")
|
||||
|
||||
// Update database first because this is where error happens the most often.
|
||||
for _, attach := range attachments {
|
||||
if _, err = sess.Id(attach.ID).Update(attach); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
attach.NewPath = path.Join(setting.AttachmentPath, attach.UUID[0:1], attach.UUID[1:2], attach.UUID)
|
||||
buf.WriteString(attach.Path)
|
||||
buf.WriteString("\t")
|
||||
buf.WriteString(attach.NewPath)
|
||||
buf.WriteString("\n")
|
||||
}
|
||||
|
||||
// Then rename attachments.
|
||||
isSucceed := true
|
||||
defer func() {
|
||||
if isSucceed {
|
||||
return
|
||||
}
|
||||
|
||||
dumpPath := path.Join(setting.LogRootPath, "attachment_path.dump")
|
||||
ioutil.WriteFile(dumpPath, buf.Bytes(), 0666)
|
||||
fmt.Println("Fail to rename some attachments, old and new paths are saved into:", dumpPath)
|
||||
}()
|
||||
for _, attach := range attachments {
|
||||
if err = os.MkdirAll(path.Dir(attach.NewPath), os.ModePerm); err != nil {
|
||||
isSucceed = false
|
||||
return err
|
||||
}
|
||||
|
||||
if err = os.Rename(attach.Path, attach.NewPath); err != nil {
|
||||
isSucceed = false
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return sess.Commit()
|
||||
}
|
||||
@@ -103,6 +103,7 @@ type CreateIssueForm struct {
|
||||
MilestoneID int64
|
||||
AssigneeID int64
|
||||
Content string
|
||||
Attachments []string
|
||||
}
|
||||
|
||||
func (f *CreateIssueForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
|
||||
|
||||
@@ -112,7 +112,7 @@ func (fi bindataFileInfo) Sys() interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
var _confAppIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb4\x5a\x4b\x8f\xe3\x56\x76\xde\xf3\x57\x5c\x97\xe3\xb8\x3b\x90\x54\x2f\xf7\xc3\x65\x57\x62\x95\x44\xa9\x38\xad\x97\x49\xa9\xcb\xed\x46\x81\xc5\x22\xaf\x24\x76\x51\xa4\x9a\x97\xac\x6a\x19\x59\x8c\x91\x45\x80\x2c\x93\x41\xb2\xc9\x22\x59\x04\x01\x92\x4c\x92\x41\x36\x33\x13\x64\x65\x64\xdf\xfd\x1f\x0c\xcf\xe4\x5f\xe4\x3b\xe7\x92\x12\x55\x5d\xee\xf1\x4c\x32\xb0\x51\x22\xef\xe3\xdc\x7b\xbe\x7b\x1e\xdf\xb9\xec\xf7\xc5\xc0\x7c\x6a\xda\x82\xff\xf4\x87\x6d\xab\xf3\x4c\x8c\x4f\x2d\x47\x74\xac\x9e\x69\xbc\x2f\x46\x3d\xb3\xe9\x98\xa2\xdf\x7c\x62\x8a\xd6\x69\x73\xd0\x35\x1d\x31\x1c\x88\xd6\xd0\xb6\x4d\x67\x34\x1c\xb4\xad\x41\x57\xb4\x26\xce\x78\xd8\x47\xe3\xa0\x63\x75\xf5\x4c\xe3\x13\xd1\x5c\x2e\x45\xec\x2d\xa4\xc8\xe6\x5e\x26\xd4\x3c\xb9\x51\x22\x89\x85\xbc\x96\xe9\x4a\x2c\xbd\x19\x3a\xc2\x2c\x92\x46\x73\x34\x72\x07\xcd\xbe\x29\x8e\x45\x37\x99\xa9\x23\xfc\x15\xdd\x30\x13\x8e\x4c\xaf\x43\x5f\x42\x52\x6b\xee\xc5\x18\x8e\xb6\x70\x2a\x56\x49\x2e\xd2\x3c\x16\x51\xe2\x7b\x51\xb4\x32\xec\xc9\xc0\x9d\x38\xd8\xfd\xb1\x98\x85\x19\x46\x9b\x61\x36\x97\xa9\xd8\x09\xe4\xf5\x4e\x4d\xec\x2c\xd3\x24\xd8\x11\x09\x1a\x32\xa9\x32\xb4\x04\x72\xea\xe5\x11\x64\x29\x3d\x86\x25\x40\x75\xda\x00\xde\x0d\xe3\x79\x2a\x97\x89\x0a\xb3\x24\x5d\x9d\x1b\xf6\x70\x38\x16\xc7\x86\xd3\xb2\xad\xd1\xd8\x1d\x3f\x1b\xd1\xb0\x4b\x4f\xcd\x31\x2e\x0f\xcf\xb1\xde\x20\x5f\x5c\x62\xbd\x64\x0a\x89\x2a\x97\x4a\xeb\xeb\xa5\x92\x75\x96\x81\x08\x63\xe8\x2d\x59\x65\xc3\x72\x9c\x89\xe9\x8e\x9a\x5d\xe0\xe6\x0e\x26\x7d\x08\xdb\xdf\x83\x28\x05\x65\x65\x7a\x6e\x8c\xec\xe1\x78\xd8\x1a\xf6\xd0\x3e\xcf\xb2\xa5\xd1\x1e\xf6\x9b\xd6\x00\x6f\xac\xee\x3c\x51\x19\xef\xc8\x9d\xd8\x34\xe4\x83\x7b\xe5\xf8\xfb\xea\x68\x77\xf7\x83\x7b\x7a\x38\x5e\x3e\xb8\x77\x3a\x1e\x8f\xdc\xd1\xd0\x1e\xdf\x57\xbb\x06\xbf\x34\xdb\x6d\xa0\x64\xac\x3b\x20\xe0\x70\x6f\x6f\x0f\x2a\xb4\x43\xe5\x5d\x46\x52\x38\xce\xa9\x98\x4a\x2f\xcb\xb1\xf9\x9b\xb9\x8c\x45\x9c\x40\x93\x6b\x2f\x8c\xa8\xdb\x68\x5b\x4e\xf3\xa4\x67\xba\x34\xec\x58\x4c\xbd\x48\x49\x03\xcf\xa5\xb0\x83\x83\x8a\xa8\x56\x7b\x40\x47\x1d\x93\xf6\xc5\x19\x2c\x92\x40\x1a\xc3\x4e\xa7\x67\x0d\xcc\x12\x70\x2d\xa4\x14\x6c\x0f\x27\x63\xd3\x76\x7b\xc3\xee\xba\xeb\x13\xd1\x95\xb1\x4c\xbd\x0c\x70\x66\x72\xa9\x8e\xd0\xf2\x07\xc2\x0f\x00\x67\x36\xdf\xcd\x92\xdd\x19\x6c\x66\xd7\xcf\x55\x96\x2c\x76\x09\x32\xc5\x03\x1a\xdc\x2e\x7c\x99\x66\xa2\xee\x7b\xc7\x59\x9a\x4b\x51\x0f\x72\x08\x0a\x93\xf8\xf8\xf1\xa3\x87\x7b\xf3\xbd\xc5\x9e\x12\x75\xc2\xf4\x78\xb1\xa2\x9f\x86\x7c\xe5\x2d\x96\x91\x6c\xf8\xc9\xc2\xf8\x04\x72\x86\xa9\x98\xa6\xc9\x42\x78\xa2\xb1\x9c\xbe\x12\xd3\x10\x8a\xc9\x57\xcb\x24\xcd\x70\xac\xdc\x03\x53\x13\x67\x61\x1c\x90\x71\xd3\x62\xe1\x34\xf4\xf5\x5e\x13\x60\x78\x2f\x48\x20\x85\x40\x9c\x26\xe9\x4c\x66\x22\x4b\x8a\xf9\x3c\x71\x99\x86\xd7\x34\xf8\x4a\xae\xee\x6b\xbd\x92\xa5\x8c\x95\x8a\xc4\xf2\xca\x57\xfb\x07\xa2\x0e\xf0\x48\x2a\xaf\x5e\x4f\xf2\xac\x78\x93\x0b\x51\x8f\x13\x4c\x53\x3f\x6c\x16\x46\x96\x93\xa8\x43\xd1\x43\x20\x95\xd1\x32\xed\xb1\x4b\xfe\x0a\xb8\xab\x10\xee\x96\xcb\x18\x4f\xcc\x67\x77\x0e\x28\x24\x62\xf9\xc9\x72\x09\xeb\x8f\x70\xd6\x11\xf9\x40\x26\x81\x20\x29\xe5\xc5\x01\x50\x00\xdc\xbe\xc6\x8d\xce\x0b\xc3\x2b\xde\xc7\x10\xa0\x95\x4c\x0d\x60\x91\xf3\x53\xb3\x7c\x25\xfd\x1c\x00\x1b\xce\xb8\x39\xb6\x5a\x2e\xdb\xfb\xa8\x39\x86\xcd\xe9\xa8\x12\x11\xc4\x38\xc5\x62\xd1\xee\x97\xd6\x48\xa8\x7c\x49\xb0\x1a\xe6\x80\x0d\x89\xdb\x36\x26\xd4\xc3\x66\xc2\x78\xa6\xa3\x0e\x8e\x02\x47\x12\xd7\xa3\x64\x36\xc3\x31\xe6\x70\x3d\x55\x13\xbe\x17\x8b\x4b\x29\x76\xe6\xc9\x42\xea\x70\x81\x83\x8a\x70\x88\x3b\x46\xaf\xc9\x61\x8e\xbc\x96\x70\xa0\x11\xf0\xd8\xc0\xcb\x3c\xc4\x01\x79\x5e\x09\x39\x8b\x95\x7a\x19\x71\xd0\x81\x35\xcd\x52\xa9\xb4\x24\x34\x86\x99\x3c\x44\x47\x98\x7d\xa8\x28\x82\xa5\xc2\x9f\x27\x14\xdc\xda\x27\x65\x4c\xe1\xb9\xc6\xe9\xd0\x21\x57\xda\x3f\x78\xd4\xd8\xc3\x7f\xfb\x47\x87\x87\x7b\x0f\x8d\x22\x3c\x92\x49\x1b\x45\xac\x4b\x93\x24\x33\x46\x4d\xc7\x39\x6b\x33\x2e\x1d\x5a\xa8\xb2\x6c\x1c\xad\x6a\x42\x96\xa1\x50\x3b\x25\xed\x2c\x95\x2f\xf3\x30\x2d\x54\x44\xc8\x09\xa7\xab\xfa\x34\x8f\xa2\x1d\x78\x72\x6f\x1d\x06\xf5\xf8\x52\x6c\xb9\x7f\x96\x6a\xe8\xa3\x10\xa4\x3f\x3b\x59\x23\xb8\x04\x1c\x5e\xb0\x08\xe3\x73\x8e\x64\x7e\x9e\x86\x19\x42\xa7\x35\xc0\x09\xf6\x7a\x70\xe7\xd6\x93\xca\x61\xbc\xf7\x9e\x4e\x24\x3a\xcf\x8c\x87\xe2\x89\x69\x8e\xc4\xb3\xe1\xc4\x16\xac\x5b\xbb\x39\x6e\x0a\xa7\xd9\x31\xdf\x7b\xcf\x70\xcc\x96\x6d\x8e\x5d\x58\x21\x04\xbc\xf7\xfe\x67\x9d\xb6\x79\x66\xe3\xff\x3f\xfc\xa3\x7b\x64\x0b\x79\x96\xd0\x31\xc2\xde\x53\xb9\x90\x1c\x86\x03\x0f\x4e\x81\x00\x62\x0d\x5c\xdb\xec\x9b\xfd\x13\xc4\x93\x76\xf3\x99\x83\xf9\x8f\x8c\xd6\x70\xf8\xc4\x32\x39\x5d\x54\x20\x75\xbd\x1b\xa9\xe8\x50\x8b\xee\xf5\xbc\xea\x98\x30\xf6\x53\x19\x84\x1a\x15\x9b\x92\x98\x22\x07\x4e\x5e\xad\x84\x97\x03\xe5\x38\x2b\xad\x72\x2e\xbd\x00\x1b\xe1\xd4\x07\x87\x20\xfb\xe2\x17\xc3\xa6\x24\xeb\x20\xfa\xdb\xc3\x2f\x9e\xb9\xcd\xc9\xf8\xd4\x1c\xc0\xc0\x61\xe4\xc3\x75\x0a\xfb\xa2\x7e\x66\x9e\x50\x57\x9d\x1a\x8a\xc4\x00\x43\x39\x37\x9a\Line truncated
|
||||
var _confAppIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb4\x5a\x4b\x8f\xe3\x56\x76\xde\xf3\x57\x5c\x97\xe3\xb8\x3b\x90\x54\x2f\xf7\xc3\x65\x57\x62\x95\x44\xa9\x38\xad\x97\x49\xa9\xcb\xed\x46\x81\xc5\x22\xaf\x24\x76\x51\xa4\x9a\x97\xac\x6a\x19\x59\x8c\x91\x45\x80\x2c\x93\x41\xb2\xc9\x22\x59\x04\x01\x92\x4c\x92\x41\x36\x33\x13\x64\x65\x64\xdf\xfd\x1f\x0c\xcf\xe4\x5f\xe4\x3b\xe7\x92\x12\x55\x5d\xee\xf1\x4c\x32\xb0\x51\x22\xef\xe3\xdc\x7b\xbe\x7b\x1e\xdf\xb9\xec\xf7\xc5\xc0\x7c\x6a\xda\x82\xff\xf4\x87\x6d\xab\xf3\x4c\x8c\x4f\x2d\x47\x74\xac\x9e\x69\xbc\x2f\x46\x3d\xb3\xe9\x98\xa2\xdf\x7c\x62\x8a\xd6\x69\x73\xd0\x35\x1d\x31\x1c\x88\xd6\xd0\xb6\x4d\x67\x34\x1c\xb4\xad\x41\x57\xb4\x26\xce\x78\xd8\x47\xe3\xa0\x63\x75\xf5\x4c\xe3\x13\xd1\x5c\x2e\x45\xec\x2d\xa4\xc8\xe6\x5e\x26\xd4\x3c\xb9\x51\x22\x89\x85\xbc\x96\xe9\x4a\x2c\xbd\x19\x3a\xc2\x2c\x92\x46\x73\x34\x72\x07\xcd\xbe\x29\x8e\x45\x37\x99\xa9\x23\xfc\x15\xdd\x30\x13\x8e\x4c\xaf\x43\x5f\x42\x52\x6b\xee\xc5\x18\x8e\xb6\x70\x2a\x56\x49\x2e\xd2\x3c\x16\x51\xe2\x7b\x51\xb4\x32\xec\xc9\xc0\x9d\x38\xd8\xfd\xb1\x98\x85\x19\x46\x9b\x61\x36\x97\xa9\xd8\x09\xe4\xf5\x4e\x4d\xec\x2c\xd3\x24\xd8\x11\x09\x1a\x32\xa9\x32\xb4\x04\x72\xea\xe5\x11\x64\x29\x3d\x86\x25\x40\x75\xda\x00\xde\x0d\xe3\x79\x2a\x97\x89\x0a\xb3\x24\x5d\x9d\x1b\xf6\x70\x38\x16\xc7\x86\xd3\xb2\xad\xd1\xd8\x1d\x3f\x1b\xd1\xb0\x4b\x4f\xcd\x31\x2e\x0f\xcf\xb1\xde\x20\x5f\x5c\x62\xbd\x64\x0a\x89\x2a\x97\x4a\xeb\xeb\xa5\x92\x75\x96\x81\x08\x63\xe8\x2d\x59\x65\xc3\x72\x9c\x89\xe9\x8e\x9a\x5d\xe0\xe6\x0e\x26\x7d\x08\xdb\xdf\x83\x28\x05\x65\x65\x7a\x6e\x8c\xec\xe1\x78\xd8\x1a\xf6\xd0\x3e\xcf\xb2\xa5\xd1\x1e\xf6\x9b\xd6\x00\x6f\xac\xee\x3c\x51\x19\xef\xc8\x9d\xd8\x34\xe4\x83\x7b\xe5\xf8\xfb\xea\x68\x77\xf7\x83\x7b\x7a\x38\x5e\x3e\xb8\x77\x3a\x1e\x8f\xdc\xd1\xd0\x1e\xdf\x57\xbb\x06\xbf\x34\xdb\x6d\xa0\x64\xac\x3b\x20\xe0\x70\x6f\x6f\x0f\x2a\xb4\x43\xe5\x5d\x46\x52\x38\xce\xa9\x98\x4a\x2f\xcb\xb1\xf9\x9b\xb9\x8c\x45\x9c\x40\x93\x6b\x2f\x8c\xa8\xdb\x68\x5b\x4e\xf3\xa4\x67\xba\x34\xec\x58\x4c\xbd\x48\x49\x03\xcf\xa5\xb0\x83\x83\x8a\xa8\x56\x7b\x40\x47\x1d\x93\xf6\xc5\x19\x2c\x92\x40\x1a\xc3\x4e\xa7\x67\x0d\xcc\x12\x70\x2d\xa4\x14\x6c\x0f\x27\x63\xd3\x76\x7b\xc3\xee\xba\xeb\x13\xd1\x95\xb1\x4c\xbd\x0c\x70\x66\x72\xa9\x8e\xd0\xf2\x07\xc2\x0f\x00\x67\x36\xdf\xcd\x92\xdd\x19\x6c\x66\xd7\xcf\x55\x96\x2c\x76\x09\x32\xc5\x03\x1a\xdc\x2e\x7c\x99\x66\xa2\xee\x7b\xc7\x59\x9a\x4b\x51\x0f\x72\x08\x0a\x93\xf8\xf8\xf1\xa3\x87\x7b\xf3\xbd\xc5\x9e\x12\x75\xc2\xf4\x78\xb1\xa2\x9f\x86\x7c\xe5\x2d\x96\x91\x6c\xf8\xc9\xc2\xf8\x04\x72\x86\xa9\x98\xa6\xc9\x42\x78\xa2\xb1\x9c\xbe\x12\xd3\x10\x8a\xc9\x57\xcb\x24\xcd\x70\xac\xdc\x03\x53\x13\x67\x61\x1c\x90\x71\xd3\x62\xe1\x34\xf4\xf5\x5e\x13\x60\x78\x2f\x48\x20\x85\x40\x9c\x26\xe9\x4c\x66\x22\x4b\x8a\xf9\x3c\x71\x99\x86\xd7\x34\xf8\x4a\xae\xee\x6b\xbd\x92\xa5\x8c\x95\x8a\xc4\xf2\xca\x57\xfb\x07\xa2\x0e\xf0\x48\x2a\xaf\x5e\x4f\xf2\xac\x78\x93\x0b\x51\x8f\x13\x4c\x53\x3f\x6c\x16\x46\x96\x93\xa8\x43\xd1\x43\x20\x95\xd1\x32\xed\xb1\x4b\xfe\x0a\xb8\xab\x10\xee\x96\xcb\x18\x4f\xcc\x67\x77\x0e\x28\x24\x62\xf9\xc9\x72\x09\xeb\x8f\x70\xd6\x11\xf9\x40\x26\x81\x20\x29\xe5\xc5\x01\x50\x00\xdc\xbe\xc6\x8d\xce\x0b\xc3\x2b\xde\xc7\x10\xa0\x95\x4c\x0d\x60\x91\xf3\x53\xb3\x7c\x25\xfd\x1c\x00\x1b\xce\xb8\x39\xb6\x5a\x2e\xdb\xfb\xa8\x39\x86\xcd\xe9\xa8\x12\x11\xc4\x38\xc5\x62\xd1\xee\x97\xd6\x48\xa8\x7c\x49\xb0\x1a\xe6\x80\x0d\x89\xdb\x36\x26\xd4\xc3\x66\xc2\x78\xa6\xa3\x0e\x8e\x02\x47\x12\xd7\xa3\x64\x36\xc3\x31\xe6\x70\x3d\x55\x13\xbe\x17\x8b\x4b\x29\x76\xe6\xc9\x42\xea\x70\x81\x83\x8a\x70\x88\x3b\x46\xaf\xc9\x61\x8e\xbc\x96\x70\xa0\x11\xf0\xd8\xc0\xcb\x3c\xc4\x01\x79\x5e\x09\x39\x8b\x95\x7a\x19\x71\xd0\x81\x35\xcd\x52\xa9\xb4\x24\x34\x86\x99\x3c\x44\x47\x98\x7d\xa8\x28\x82\xa5\xc2\x9f\x27\x14\xdc\xda\x27\x65\x4c\xe1\xb9\xc6\xe9\xd0\x21\x57\xda\x3f\x78\xd4\xd8\xc3\x7f\xfb\x47\x87\x87\x7b\x0f\x8d\x22\x3c\x92\x49\x1b\x45\xac\x4b\x93\x24\x33\x46\x4d\xc7\x39\x6b\x33\x2e\x1d\x5a\xa8\xb2\x6c\x1c\xad\x6a\x42\x96\xa1\x50\x3b\x25\xed\x2c\x95\x2f\xf3\x30\x2d\x54\x44\xc8\x09\xa7\xab\xfa\x34\x8f\xa2\x1d\x78\x72\x6f\x1d\x06\xf5\xf8\x52\x6c\xb9\x7f\x96\x6a\xe8\xa3\x10\xa4\x3f\x3b\x59\x23\xb8\x04\x1c\x5e\xb0\x08\xe3\x73\x8e\x64\x7e\x9e\x86\x19\x42\xa7\x35\xc0\x09\xf6\x7a\x70\xe7\xd6\x93\xca\x61\xbc\xf7\x9e\x4e\x24\x3a\xcf\x8c\x87\xe2\x89\x69\x8e\xc4\xb3\xe1\xc4\x16\xac\x5b\xbb\x39\x6e\x0a\xa7\xd9\x31\xdf\x7b\xcf\x70\xcc\x96\x6d\x8e\x5d\x58\x21\x04\xbc\xf7\xfe\x67\x9d\xb6\x79\x66\xe3\xff\x3f\xfc\xa3\x7b\x64\x0b\x79\x96\xd0\x31\xc2\xde\x53\xb9\x90\x1c\x86\x03\x0f\x4e\x81\x00\x62\x0d\x5c\xdb\xec\x9b\xfd\x13\xc4\x93\x76\xf3\x99\x83\xf9\x8f\x8c\xd6\x70\xf8\xc4\x32\x39\x5d\x54\x20\x75\xbd\x1b\xa9\xe8\x50\x8b\xee\xf5\xbc\xea\x98\x30\xf6\x53\x19\x84\x1a\x15\x9b\x92\x98\x22\x07\x4e\x5e\xad\x84\x97\x03\xe5\x38\x2b\xad\x72\x2e\xbd\x00\x1b\xe1\xd4\x07\x87\x20\xfb\xe2\x17\xc3\xa6\x24\xeb\x20\xfa\xdb\xc3\x2f\x9e\xb9\xcd\xc9\xf8\xd4\x1c\xc0\xc0\x61\xe4\xc3\x75\x0a\xfb\xa2\x7e\x66\x9e\x50\x57\x9d\x1a\x8a\xc4\x00\x43\x39\x37\x9a\Line truncated
|
||||
|
||||
func confAppIniBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
@@ -127,7 +127,7 @@ func confAppIni() (*asset, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "conf/app.ini", size: 9252, mode: os.FileMode(420), modTime: time.Unix(1439229539, 0)}
|
||||
info := bindataFileInfo{name: "conf/app.ini", size: 9251, mode: os.FileMode(420), modTime: time.Unix(1439306314, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
@@ -772,7 +772,7 @@ func confLocaleLocale_deDeIni() (*asset, error) {
|
||||
return a, nil
|
||||
}
|
||||
|
||||
var _confLocaleLocale_enUsIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xc4\x7d\x7b\x93\xdb\x48\x8e\xe7\xff\xfc\x14\x6c\x5f\xf8\xec\x8e\x28\xcb\xd1\x3d\x71\x8f\x98\xb0\xdd\x57\x5d\xd5\x7e\xcc\xba\x1e\xeb\x2a\xf7\xdc\x9c\xc3\xa1\xa1\x44\x96\xc4\x29\x89\x54\xf3\x51\x72\xcd\xc6\x46\xdc\xd7\xb8\xaf\x77\x9f\xe4\x80\x1f\x80\x7c\x90\x54\xd9\x3d\xbb\x71\xfb\x8f\x94\xcc\x44\xbe\x90\x48\x24\x80\x44\x66\x66\xbb\xdd\x3c\x2f\xda\x65\xfa\x32\x3d\x4e\x77\x59\x59\x6d\x8a\xb6\x4d\xdb\x62\x73\xf3\x6c\x5d\xb7\x5d\x91\xa7\x6f\xca\x8e\xbe\x9b\xbb\x72\x59\x24\xc9\xba\xde\x16\x04\xfa\x96\xfe\x92\x3c\x6b\xd7\x8b\x3a\x6b\x72\x8a\x38\xb5\x70\x52\x7c\xd9\x6d\xea\x86\x81\x7e\x91\x50\xb2\x2e\x36\x3b\xce\x43\x7f\x49\x5b\xae\xaa\x79\x59\xd1\xe7\x15\x85\xd2\x77\x55\xd2\xd6\xcb\x32\xdb\xcc\x83\x04\x44\x58\xfa\x1f\xd3\x1f\xab\x3c\xbd\xea\x8a\x5d\xfa\xa2\xdd\x66\x9b\xcd\xab\xac\x45\x96\xae\x48\xb3\xe5\xb2\xee\xab\xee\xc5\x73\x49\x90\xc2\xeb\xbe\xb3\xd2\x2f\xfa\x4e\xe2\xfa\x9d\x45\x7d\xdc\x25\x4d\xb1\x2a\xa9\x63\x0d\x45\x7d\xd0\x60\xb2\x2f\x16\x6d\xd9\x71\xa3\xff\x2c\xa1\xe4\xae\x68\xda\xb2\xe6\xf6\xfc\x2a\xa1\x64\x97\xad\x18\xe0\x92\xfe\x92\xae\xd8\xee\x36\x19\x32\x5c\x6b\x30\xd9\x64\xd5\xaa\x17\x98\xf7\x1a\x4c\x96\x4d\x41\x49\xf3\xaa\xd8\x53\xec\x09\x3e\x52\xfa\x98\xcd\x66\x49\x4f\x38\x9d\xef\x9a\xfa\xa6\xdc\x14\xf3\xac\xca\xe7\x5b\xc1\xda\x47\x8a\x4f\x35\x3e\xa5\xf8\x94\xe3\xd1\x8d\x22\x27\x04\xcd\xb3\x56\xfb\x42\x43\x43\xf8\xca\xda\x04\x45\x55\xd9\xd6\x72\x73\x30\x29\xb6\x59\xb9\xe1\x41\x78\xc6\x01\x6a\x7c\xdb\xee\x6b\x0c\xd5\xa5\x06\x09\x11\xf3\xee\x7e\x57\x00\x0f\xcf\xae\x29\x94\x2c\xb3\x5d\xb7\x5c\x67\xdc\x56\x09\x25\x04\xb4\xab\x09\x21\x75\x73\x0f\x38\xfb\x48\xea\x66\x95\x55\xe5\xdf\xb3\x4e\x90\x74\x11\x7c\x26\xdb\xb2\x69\x6a\xc6\xef\x19\x02\x09\xf5\x78\xce\xe5\x50\xcc\x39\x61\x22\x28\x85\x53\xb6\xe5\xaa\x11\x54\x72\xe2\x19\xbe\xb8\x14\x4e\xbb\xa9\x9b\x5b\x4d\x78\xcd\xc1\x41\x56\x6a\x84\xa6\xc6\xf5\x67\x15\x21\x5f\x53\xcf\xf0\x11\x01\xb4\x49\x96\x6f\x09\x95\xbb\xac\x2a\x18\x47\xc7\xfc\x45\x78\xa1\xaf\x44\x69\x6a\xde\x16\x5d\x57\x56\x2b\x46\xf6\xb1\x44\xa5\x57\x1a\x95\x04\x69\x2e\xee\xbe\xee\xdd\x70\x52\xfc\x5f\xe8\x33\xbd\x94\x4f\x49\x0b\x32\x21\xd1\xe5\xe4\x9e\xb4\xf3\x9b\xa2\xc8\xa5\x2f\x6d\xfa\x9a\xc2\xc9\xae\xdf\x6c\x08\x6b\xbf\xf5\x45\xdb\x71\xa6\x4b\xfa\xa6\xfe\xcb\x77\x52\xb6\x2d\x05\x28\xfa\x1d\x02\x09\x0d\x5d\xb5\x44\x67\x4e\x10\x48\x92\x4f\x6d\x91\x35\xcb\xf5\xe7\x44\xfe\xd1\x56\x0e\x30\xed\x1d\x1a\x54\x26\x24\x25\x22\xa9\xc1\x2a\x48\x96\x75\xce\x1f\x27\xf4\x47\x45\x97\x55\xdb\xd1\x8c\xfb\x9c\x68\x80\xc1\x24\x24\x03\xd0\x95\x1d\xb0\xa0\x91\x98\xbe\x2d\x8f\x60\xfa\xba\x6c\xda\xee\x59\x57\x12\xb1\x7e\xe8\xab\x84\xfb\x47\xb3\x6d\x9e\x2f\x8c\x09\xbd\xa9\x09\x45\x88\x6e\xa8\x7f\x67\xf7\x57\xff\xfc\xfe\x28\xbd\x24\x4e\xb4\x6a\x0a\x0a\xa7\x54\x06\xfd\x51\x9e\x3f\xcc\x12\xca\x65\x35\x9d\x66\x5d\xb6\xc8\xda\xc2\xa3\x95\x13\x85\xba\x5d\x1a\x68\x9c\xb9\x1a\x38\x58\xdb\x45\xfd\x9d\x9a\x21\x54\x86\xce\x2b\x57\xc6\x39\x4f\x2e\x8a\x67\xa6\x86\xcc\x97\x9b\x82\xe3\xa9\xa8\xf4\xdd\xf9\xf9\xc5\xe9\xcf\x69\x51\xad\xca\xaa\x48\xf7\x65\xb7\x4e\xfb\xee\xe6\xbf\xcf\x57\x45\x55\x34\xc4\xe3\x96\x65\x4a\x73\xaa\x21\x4a\x48\x89\xb0\xa5\x73\xb3\xa4\x6d\x37\x34\xf7\x81\xde\xab\xab\xf7\xe9\x19\xa3\x78\x97\x75\x6b\x34\xa4\x5b\x27\xed\x6f\x1b\x46\x91\xab\xf0\x7a\x5d\xa4\xa0\x32\x00\xd5\x37\x86\x8f\x34\xd7\x36\xce\x92\xa2\x69\xe6\xc4\x96\xba\xfb\xb9\x66\xd6\xf2\x86\x90\x52\x04\x91\x4e\x55\x77\xe9\xa2\x48\x91\x67\x96\x24\xd6\x60\xc3\xee\xf1\x6e\xb7\x29\x97\x32\xd7\xdf\x48\x9a\x47\x34\xaf\x20\x8a\xa5\x10\x0e\x88\xb2\xb4\x00\x5d\xc4\x9e\x79\x3e\xa4\x11\x03\x41\xfe\x75\x41\x0c\x70\xdd\xaf\x84\xed\x6d\xea\x3e\xff\x0e\x94\x6a\xad\xf7\x84\x9a\x7e\xa8\xa9\xc1\xc0\x8e\x03\xf0\x55\x1c\x13\xc5\xf1\xa2\xd5\x14\xdb\x9a\xf8\x8a\x23\xf6\x92\x08\x6a\x5f\x52\x22\xf5\xb4\xcd\xee\x68\xbe\x75\x75\xda\xad\xcb\x36\xcd\x89\xd8\x96\x5c\x30\x4d\x8d\x9e\x96\x0b\x21\x0b\x22\x50\x21\x0d\x8b\x8b\xc7\x00\x50\xdb\x9e\xa8\x69\x4d\x85\xf1\x62\xc4\x2b\x27\x15\x39\xd5\x4e\x74\x89\xca\x01\x7d\x13\xe5\xd6\xc4\x95\x99\x6f\x9e\x22\xa0\xdf\x61\xf9\xd4\xaa\xec\xe6\x86\x5a\xd5\x12\x55\xbc\x4d\x97\x9b\x9a\x48\xea\xe3\x87\xf7\x94\x79\xdd\x75\xbb\xf9\xae\x6e\x40\xc6\xd7\xd7\x97\x34\x3d\x9a\xce\xc7\x06\xb8\x66\x98\xaa\xdf\x2e\xe8\x6b\xbf\x2e\x89\x09\x64\xc1\x00\x01\x15\x1b\x5e\xff\xaa\xb4\xae\x66\x18\xab\xbe\xd9\x0c\x86\x91\xaa\xb4\x94\x03\xcd\xe3\x26\x3c\xe7\x9f\x2b\xdf\x4a\x74\xb7\x25\x21\x61\x8f\x41\xa5\xae\x16\x58\x87\x88\xb6\xea\x1d\x97\x1b\x10\xd7\x85\x46\x78\x8a\xc2\xda\xe5\xd2\x65\x05\xa3\x54\x88\x20\x01\x17\xde\x52\x87\x75\x36\x5f\x9d\x11\x1a\x30\xa5\x11\x7b\xd3\xd4\x5b\x8a\x7d\x4d\x7f\x3e\xc2\x37\xff\x8c\xcb\x03\x4c\x96\xe7\xc4\x66\xda\xa3\xf4\xc3\xeb\x93\xf4\xbf\xfc\xe1\xc7\x1f\x67\xe9\xbb\x8e\x27\x04\xd3\xc8\xdf\x78\x6c\x29\x28\x4b\xa9\x03\xa5\x99\xdb\xd1\xf0\x3f\x62\x02\x7f\x94\xbe\x40\xea\xff\x28\xbe\x64\x24\x06\x14\xb3\x65\xbd\x7d\xc5\x93\x7b\x9b\x75\xb3\x84\x53\x88\x6a\x94\x9c\xae\x8a\x2a\xa7\x80\x2e\xc8\x9a\x16\x70\x1d\x4d\x0f\x96\x67\x11\x4e\xe6\xcb\xba\xba\x29\x1b\xee\xd0\x2Line truncated
|
||||
var _confLocaleLocale_enUsIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xc4\x7d\x7b\x93\xdb\x48\x8e\xe7\xff\xfc\x14\x6c\x5f\xf8\xec\x8e\x28\xcb\xd1\x3d\x71\x8f\x98\xb0\xdd\x57\x5d\xd5\x7e\xcc\xba\x1e\xeb\x2a\xf7\xdc\x9c\xc3\xa1\xa1\x44\x96\xc4\x29\x89\x54\xf3\x51\x72\xcd\xc6\x46\xdc\xd7\xb8\xaf\x77\x9f\xe4\x80\x1f\x80\x7c\x90\x54\xd9\x3d\xbb\x71\xfb\x8f\x94\xcc\x44\xbe\x90\x48\x24\x80\x44\x66\x66\xbb\xdd\x3c\x2f\xda\x65\xfa\x32\x3d\x4e\x77\x59\x59\x6d\x8a\xb6\x4d\xdb\x62\x73\xf3\x6c\x5d\xb7\x5d\x91\xa7\x6f\xca\x8e\xbe\x9b\xbb\x72\x59\x24\xc9\xba\xde\x16\x04\xfa\x96\xfe\x92\x3c\x6b\xd7\x8b\x3a\x6b\x72\x8a\x38\xb5\x70\x52\x7c\xd9\x6d\xea\x86\x81\x7e\x91\x50\xb2\x2e\x36\x3b\xce\x43\x7f\x49\x5b\xae\xaa\x79\x59\xd1\xe7\x15\x85\xd2\x77\x55\xd2\xd6\xcb\x32\xdb\xcc\x83\x04\x44\x58\xfa\x1f\xd3\x1f\xab\x3c\xbd\xea\x8a\x5d\xfa\xa2\xdd\x66\x9b\xcd\xab\xac\x45\x96\xae\x48\xb3\xe5\xb2\xee\xab\xee\xc5\x73\x49\x90\xc2\xeb\xbe\xb3\xd2\x2f\xfa\x4e\xe2\xfa\x9d\x45\x7d\xdc\x25\x4d\xb1\x2a\xa9\x63\x0d\x45\x7d\xd0\x60\xb2\x2f\x16\x6d\xd9\x71\xa3\xff\x2c\xa1\xe4\xae\x68\xda\xb2\xe6\xf6\xfc\x2a\xa1\x64\x97\xad\x18\xe0\x92\xfe\x92\xae\xd8\xee\x36\x19\x32\x5c\x6b\x30\xd9\x64\xd5\xaa\x17\x98\xf7\x1a\x4c\x96\x4d\x41\x49\xf3\xaa\xd8\x53\xec\x09\x3e\x52\xfa\x98\xcd\x66\x49\x4f\x38\x9d\xef\x9a\xfa\xa6\xdc\x14\xf3\xac\xca\xe7\x5b\xc1\xda\x47\x8a\x4f\x35\x3e\xa5\xf8\x94\xe3\xd1\x8d\x22\x27\x04\xcd\xb3\x56\xfb\x42\x43\x43\xf8\xca\xda\x04\x45\x55\xd9\xd6\x72\x73\x30\x29\xb6\x59\xb9\xe1\x41\x78\xc6\x01\x6a\x7c\xdb\xee\x6b\x0c\xd5\xa5\x06\x09\x11\xf3\xee\x7e\x57\x00\x0f\xcf\xae\x29\x94\x2c\xb3\x5d\xb7\x5c\x67\xdc\x56\x09\x25\x04\xb4\xab\x09\x21\x75\x73\x0f\x38\xfb\x48\xea\x66\x95\x55\xe5\xdf\xb3\x4e\x90\x74\x11\x7c\x26\xdb\xb2\x69\x6a\xc6\xef\x19\x02\x09\xf5\x78\xce\xe5\x50\xcc\x39\x61\x22\x28\x85\x53\xb6\xe5\xaa\x11\x54\x72\xe2\x19\xbe\xb8\x14\x4e\xbb\xa9\x9b\x5b\x4d\x78\xcd\xc1\x41\x56\x6a\x84\xa6\xc6\xf5\x67\x15\x21\x5f\x53\xcf\xf0\x11\x01\xb4\x49\x96\x6f\x09\x95\xbb\xac\x2a\x18\x47\xc7\xfc\x45\x78\xa1\xaf\x44\x69\x6a\xde\x16\x5d\x57\x56\x2b\x46\xf6\xb1\x44\xa5\x57\x1a\x95\x04\x69\x2e\xee\xbe\xee\xdd\x70\x52\xfc\x5f\xe8\x33\xbd\x94\x4f\x49\x0b\x32\x21\xd1\xe5\xe4\x9e\xb4\xf3\x9b\xa2\xc8\xa5\x2f\x6d\xfa\x9a\xc2\xc9\xae\xdf\x6c\x08\x6b\xbf\xf5\x45\xdb\x71\xa6\x4b\xfa\xa6\xfe\xcb\x77\x52\xb6\x2d\x05\x28\xfa\x1d\x02\x09\x0d\x5d\xb5\x44\x67\x4e\x10\x48\x92\x4f\x6d\x91\x35\xcb\xf5\xe7\x44\xfe\xd1\x56\x0e\x30\xed\x1d\x1a\x54\x26\x24\x25\x22\xa9\xc1\x2a\x48\x96\x75\xce\x1f\x27\xf4\x47\x45\x97\x55\xdb\xd1\x8c\xfb\x9c\x68\x80\xc1\x24\x24\x03\xd0\x95\x1d\xb0\xa0\x91\x98\xbe\x2d\x8f\x60\xfa\xba\x6c\xda\xee\x59\x57\x12\xb1\x7e\xe8\xab\x84\xfb\x47\xb3\x6d\x9e\x2f\x8c\x09\xbd\xa9\x09\x45\x88\x6e\xa8\x7f\x67\xf7\x57\xff\xfc\xfe\x28\xbd\x24\x4e\xb4\x6a\x0a\x0a\xa7\x54\x06\xfd\x51\x9e\x3f\xcc\x12\xca\x65\x35\x9d\x66\x5d\xb6\xc8\xda\xc2\xa3\x95\x13\x85\xba\x5d\x1a\x68\x9c\xb9\x1a\x38\x58\xdb\x45\xfd\x9d\x9a\x21\x54\x86\xce\x2b\x57\xc6\x39\x4f\x2e\x8a\x67\xa6\x86\xcc\x97\x9b\x82\xe3\xa9\xa8\xf4\xdd\xf9\xf9\xc5\xe9\xcf\x69\x51\xad\xca\xaa\x48\xf7\x65\xb7\x4e\xfb\xee\xe6\xbf\xcf\x57\x45\x55\x34\xc4\xe3\x96\x65\x4a\x73\xaa\x21\x4a\x48\x89\xb0\xa5\x73\xb3\xa4\x6d\x37\x34\xf7\x81\xde\xab\xab\xf7\xe9\x19\xa3\x78\x97\x75\x6b\x34\xa4\x5b\x27\xed\x6f\x1b\x46\x91\xab\xf0\x7a\x5d\xa4\xa0\x32\x00\xd5\x37\x86\x8f\x34\xd7\x36\xce\x92\xa2\x69\xe6\xc4\x96\xba\xfb\xb9\x66\xd6\xf2\x86\x90\x52\x04\x91\x4e\x55\x77\xe9\xa2\x48\x91\x67\x96\x24\xd6\x60\xc3\xee\xf1\x6e\xb7\x29\x97\x32\xd7\xdf\x48\x9a\x47\x34\xaf\x20\x8a\xa5\x10\x0e\x88\xb2\xb4\x00\x5d\xc4\x9e\x79\x3e\xa4\x11\x03\x41\xfe\x75\x41\x0c\x70\xdd\xaf\x84\xed\x6d\xea\x3e\xff\x0e\x94\x6a\xad\xf7\x84\x9a\x7e\xa8\xa9\xc1\xc0\x8e\x03\xf0\x55\x1c\x13\xc5\xf1\xa2\xd5\x14\xdb\x9a\xf8\x8a\x23\xf6\x92\x08\x6a\x5f\x52\x22\xf5\xb4\xcd\xee\x68\xbe\x75\x75\xda\xad\xcb\x36\xcd\x89\xd8\x96\x5c\x30\x4d\x8d\x9e\x96\x0b\x21\x0b\x22\x50\x21\x0d\x8b\x8b\xc7\x00\x50\xdb\x9e\xa8\x69\x4d\x85\xf1\x62\xc4\x2b\x27\x15\x39\xd5\x4e\x74\x89\xca\x01\x7d\x13\xe5\xd6\xc4\x95\x99\x6f\x9e\x22\xa0\xdf\x61\xf9\xd4\xaa\xec\xe6\x86\x5a\xd5\x12\x55\xbc\x4d\x97\x9b\x9a\x48\xea\xe3\x87\xf7\x94\x79\xdd\x75\xbb\xf9\xae\x6e\x40\xc6\xd7\xd7\x97\x34\x3d\x9a\xce\xc7\x06\xb8\x66\x98\xaa\xdf\x2e\xe8\x6b\xbf\x2e\x89\x09\x64\xc1\x00\x01\x15\x1b\x5e\xff\xaa\xb4\xae\x66\x18\xab\xbe\xd9\x0c\x86\x91\xaa\xb4\x94\x03\xcd\xe3\x26\x3c\xe7\x9f\x2b\xdf\x4a\x74\xb7\x25\x21\x61\x8f\x41\xa5\xae\x16\x58\x87\x88\xb6\xea\x1d\x97\x1b\x10\xd7\x85\x46\x78\x8a\xc2\xda\xe5\xd2\x65\x05\xa3\x54\x88\x20\x01\x17\xde\x52\x87\x75\x36\x5f\x9d\x11\x1a\x30\xa5\x11\x7b\xd3\xd4\x5b\x8a\x7d\x4d\x7f\x3e\xc2\x37\xff\x8c\xcb\x03\x4c\x96\xe7\xc4\x66\xda\xa3\xf4\xc3\xeb\x93\xf4\xbf\xfc\xe1\xc7\x1f\x67\xe9\xbb\x8e\x27\x04\xd3\xc8\xdf\x78\x6c\x29\x28\x4b\xa9\x03\xa5\x99\xdb\xd1\xf0\x3f\x62\x02\x7f\x94\xbe\x40\xea\xff\x28\xbe\x64\x24\x06\x14\xb3\x65\xbd\x7d\xc5\x93\x7b\x9b\x75\xb3\x84\x53\x88\x6a\x94\x9c\xae\x8a\x2a\xa7\x80\x2e\xc8\x9a\x16\x70\x1d\x4d\x0f\x96\x67\x11\x4e\xe6\xcb\xba\xba\x29\x1b\xee\xd0\x2Line truncated
|
||||
|
||||
func confLocaleLocale_enUsIniBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
@@ -787,7 +787,7 @@ func confLocaleLocale_enUsIni() (*asset, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 37024, mode: os.FileMode(420), modTime: time.Unix(1439282198, 0)}
|
||||
info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 37023, mode: os.FileMode(420), modTime: time.Unix(1439282817, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
@@ -285,9 +285,9 @@ func NewConfigContext() {
|
||||
if !filepath.IsAbs(AttachmentPath) {
|
||||
AttachmentPath = path.Join(workDir, AttachmentPath)
|
||||
}
|
||||
AttachmentAllowedTypes = sec.Key("ALLOWED_TYPES").MustString("image/jpeg|image/png")
|
||||
AttachmentAllowedTypes = strings.Replace(sec.Key("ALLOWED_TYPES").MustString("image/jpeg,image/png"), "|", ",", -1)
|
||||
AttachmentMaxSize = sec.Key("MAX_SIZE").MustInt64(32)
|
||||
AttachmentMaxFiles = sec.Key("MAX_FILES").MustInt(10)
|
||||
AttachmentMaxFiles = sec.Key("MAX_FILES").MustInt(5)
|
||||
AttachmentEnabled = sec.Key("ENABLE").MustBool(true)
|
||||
|
||||
TimeFormat = map[string]string{
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
@font-face{font-family:octicons;src:url(../fonts/octicons.eot?#iefix&v=345f8bad9c5003db196d08f05e7f030fd2a32ff6)format('embedded-opentype'),url(../fonts/octicons.woff?v=345f8bad9c5003db196d08f05e7f030fd2a32ff6)format('woff'),url(../fonts/octicons.ttf?v=345f8bad9c5003db196d08f05e7f030fd2a32ff6)format('truetype'),url(../fonts/octicons.svg?v=345f8bad9c5003db196d08f05e7f030fd2a32ff6#octicons)format('svg');font-weight:400;font-style:normal}.mega-octicon,.octicon{font:normal normal normal 16px/1 octicons;display:inline-block;text-decoration:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mega-octicon{font-size:32px}.octicon-alert:before{content:'\f02d'}.octicon-alignment-align:before{content:'\f08a'}.octicon-alignment-aligned-to:before{content:'\f08e'}.octicon-alignment-unalign:before{content:'\f08b'}.octicon-arrow-down:before{content:'\f03f'}.octicon-arrow-left:before{content:'\f040'}.octicon-arrow-right:before{content:'\f03e'}.octicon-arrow-small-down:before{content:'\f0a0'}.octicon-arrow-small-left:before{content:'\f0a1'}.octicon-arrow-small-right:before{content:'\f071'}.octicon-arrow-small-up:before{content:'\f09f'}.octicon-arrow-up:before{content:'\f03d'}.octicon-beer:before{content:'\f069'}.octicon-book:before{content:'\f007'}.octicon-bookmark:before{content:'\f07b'}.octicon-briefcase:before{content:'\f0d3'}.octicon-broadcast:before{content:'\f048'}.octicon-browser:before{content:'\f0c5'}.octicon-bug:before{content:'\f091'}.octicon-calendar:before{content:'\f068'}.octicon-check:before{content:'\f03a'}.octicon-checklist:before{content:'\f076'}.octicon-chevron-down:before{content:'\f0a3'}.octicon-chevron-left:before{content:'\f0a4'}.octicon-chevron-right:before{content:'\f078'}.octicon-chevron-up:before{content:'\f0a2'}.octicon-circle-slash:before{content:'\f084'}.octicon-circuit-board:before{content:'\f0d6'}.octicon-clippy:before{content:'\f035'}.octicon-clock:before{content:'\f046'}.octicon-cloud-download:before{content:'\f00b'}.octicon-cloud-upload:before{content:'\f00c'}.octicon-code:before{content:'\f05f'}.octicon-color-mode:before{content:'\f065'}.octicon-comment-add:before,.octicon-comment:before{content:'\f02b'}.octicon-comment-discussion:before{content:'\f04f'}.octicon-credit-card:before{content:'\f045'}.octicon-dash:before{content:'\f0ca'}.octicon-dashboard:before{content:'\f07d'}.octicon-database:before{content:'\f096'}.octicon-device-camera:before{content:'\f056'}.octicon-device-camera-video:before{content:'\f057'}.octicon-device-desktop:before{content:'\f27c'}.octicon-device-mobile:before{content:'\f038'}.octicon-diff:before{content:'\f04d'}.octicon-diff-added:before{content:'\f06b'}.octicon-diff-ignored:before{content:'\f099'}.octicon-diff-modified:before{content:'\f06d'}.octicon-diff-removed:before{content:'\f06c'}.octicon-diff-renamed:before{content:'\f06e'}.octicon-ellipsis:before{content:'\f09a'}.octicon-eye-unwatch:before,.octicon-eye-watch:before,.octicon-eye:before{content:'\f04e'}.octicon-file-binary:before{content:'\f094'}.octicon-file-code:before{content:'\f010'}.octicon-file-directory:before{content:'\f016'}.octicon-file-media:before{content:'\f012'}.octicon-file-pdf:before{content:'\f014'}.octicon-file-submodule:before{content:'\f017'}.octicon-file-symlink-directory:before{content:'\f0b1'}.octicon-file-symlink-file:before{content:'\f0b0'}.octicon-file-text:before{content:'\f011'}.octicon-file-zip:before{content:'\f013'}.octicon-flame:before{content:'\f0d2'}.octicon-fold:before{content:'\f0cc'}.octicon-gear:before{content:'\f02f'}.octicon-gift:before{content:'\f042'}.octicon-gist:before{content:'\f00e'}.octicon-gist-secret:before{content:'\f08c'}.octicon-git-branch-create:before,.octicon-git-branch-delete:before,.octicon-git-branch:before{content:'\f020'}.octicon-git-commit:before{content:'\f01f'}.octicon-git-compare:before{content:'\f0ac'}.octicon-git-merge:before{content:'\f023'}.octicon-git-pull-request-abandoned:before,.octicon-git-pull-request:before{content:'\f009'}.octicon-globe:before{content:'\f0b6'}.octicon-graph:before{content:'\f043'}.octicon-heart:before{content:'\2665'}.octicon-history:before{content:'\f07e'}.octicon-home:before{content:'\f08d'}.octicon-horizontal-rule:before{content:'\f070'}.octicon-hourglass:before{content:'\f09e'}.octicon-hubot:before{content:'\f09d'}.octicon-inbox:before{content:'\f0cf'}.octicon-info:before{content:'\f059'}.octicon-issue-closed:before{content:'\f028'}.octicon-issue-opened:before{content:'\f026'}.octicon-issue-reopened:before{content:'\f027'}.octicon-jersey:before{content:'\f019'}.octicon-jump-down:before{content:'\f072'}.octicon-jump-left:before{content:'\f0a5'}.octicon-jump-right:before{content:'\f0a6'}.octicon-jump-up:before{content:'\f073'}.octicon-key:before{content:'\f049'}.octicon-keyboard:before{content:'\f00d'}.octicon-law:before{content:'\f0d8'}.octicon-light-bulb:before{content:'\f000'}.octicoLine truncated
|
||||
@font-face{font-family:octicons;src:url(../fonts/octicons.eot?#iefix&v=345f8bad9c5003db196d08f05e7f030fd2a32ff6)format('embedded-opentype'),url(../fonts/octicons.woff?v=345f8bad9c5003db196d08f05e7f030fd2a32ff6)format('woff'),url(../fonts/octicons.ttf?v=345f8bad9c5003db196d08f05e7f030fd2a32ff6)format('truetype'),url(../fonts/octicons.svg?v=345f8bad9c5003db196d08f05e7f030fd2a32ff6#octicons)format('svg');font-weight:400;font-style:normal}.mega-octicon,.octicon{font:normal normal normal 16px/1 octicons;display:inline-block;text-decoration:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mega-octicon{font-size:32px}.octicon-alert:before{content:'\f02d'}.octicon-alignment-align:before{content:'\f08a'}.octicon-alignment-aligned-to:before{content:'\f08e'}.octicon-alignment-unalign:before{content:'\f08b'}.octicon-arrow-down:before{content:'\f03f'}.octicon-arrow-left:before{content:'\f040'}.octicon-arrow-right:before{content:'\f03e'}.octicon-arrow-small-down:before{content:'\f0a0'}.octicon-arrow-small-left:before{content:'\f0a1'}.octicon-arrow-small-right:before{content:'\f071'}.octicon-arrow-small-up:before{content:'\f09f'}.octicon-arrow-up:before{content:'\f03d'}.octicon-beer:before{content:'\f069'}.octicon-book:before{content:'\f007'}.octicon-bookmark:before{content:'\f07b'}.octicon-briefcase:before{content:'\f0d3'}.octicon-broadcast:before{content:'\f048'}.octicon-browser:before{content:'\f0c5'}.octicon-bug:before{content:'\f091'}.octicon-calendar:before{content:'\f068'}.octicon-check:before{content:'\f03a'}.octicon-checklist:before{content:'\f076'}.octicon-chevron-down:before{content:'\f0a3'}.octicon-chevron-left:before{content:'\f0a4'}.octicon-chevron-right:before{content:'\f078'}.octicon-chevron-up:before{content:'\f0a2'}.octicon-circle-slash:before{content:'\f084'}.octicon-circuit-board:before{content:'\f0d6'}.octicon-clippy:before{content:'\f035'}.octicon-clock:before{content:'\f046'}.octicon-cloud-download:before{content:'\f00b'}.octicon-cloud-upload:before{content:'\f00c'}.octicon-code:before{content:'\f05f'}.octicon-color-mode:before{content:'\f065'}.octicon-comment-add:before,.octicon-comment:before{content:'\f02b'}.octicon-comment-discussion:before{content:'\f04f'}.octicon-credit-card:before{content:'\f045'}.octicon-dash:before{content:'\f0ca'}.octicon-dashboard:before{content:'\f07d'}.octicon-database:before{content:'\f096'}.octicon-device-camera:before{content:'\f056'}.octicon-device-camera-video:before{content:'\f057'}.octicon-device-desktop:before{content:'\f27c'}.octicon-device-mobile:before{content:'\f038'}.octicon-diff:before{content:'\f04d'}.octicon-diff-added:before{content:'\f06b'}.octicon-diff-ignored:before{content:'\f099'}.octicon-diff-modified:before{content:'\f06d'}.octicon-diff-removed:before{content:'\f06c'}.octicon-diff-renamed:before{content:'\f06e'}.octicon-ellipsis:before{content:'\f09a'}.octicon-eye-unwatch:before,.octicon-eye-watch:before,.octicon-eye:before{content:'\f04e'}.octicon-file-binary:before{content:'\f094'}.octicon-file-code:before{content:'\f010'}.octicon-file-directory:before{content:'\f016'}.octicon-file-media:before{content:'\f012'}.octicon-file-pdf:before{content:'\f014'}.octicon-file-submodule:before{content:'\f017'}.octicon-file-symlink-directory:before{content:'\f0b1'}.octicon-file-symlink-file:before{content:'\f0b0'}.octicon-file-text:before{content:'\f011'}.octicon-file-zip:before{content:'\f013'}.octicon-flame:before{content:'\f0d2'}.octicon-fold:before{content:'\f0cc'}.octicon-gear:before{content:'\f02f'}.octicon-gift:before{content:'\f042'}.octicon-gist:before{content:'\f00e'}.octicon-gist-secret:before{content:'\f08c'}.octicon-git-branch-create:before,.octicon-git-branch-delete:before,.octicon-git-branch:before{content:'\f020'}.octicon-git-commit:before{content:'\f01f'}.octicon-git-compare:before{content:'\f0ac'}.octicon-git-merge:before{content:'\f023'}.octicon-git-pull-request-abandoned:before,.octicon-git-pull-request:before{content:'\f009'}.octicon-globe:before{content:'\f0b6'}.octicon-graph:before{content:'\f043'}.octicon-heart:before{content:'\2665'}.octicon-history:before{content:'\f07e'}.octicon-home:before{content:'\f08d'}.octicon-horizontal-rule:before{content:'\f070'}.octicon-hourglass:before{content:'\f09e'}.octicon-hubot:before{content:'\f09d'}.octicon-inbox:before{content:'\f0cf'}.octicon-info:before{content:'\f059'}.octicon-issue-closed:before{content:'\f028'}.octicon-issue-opened:before{content:'\f026'}.octicon-issue-reopened:before{content:'\f027'}.octicon-jersey:before{content:'\f019'}.octicon-jump-down:before{content:'\f072'}.octicon-jump-left:before{content:'\f0a5'}.octicon-jump-right:before{content:'\f0a6'}.octicon-jump-up:before{content:'\f073'}.octicon-key:before{content:'\f049'}.octicon-keyboard:before{content:'\f00d'}.octicon-law:before{content:'\f0d8'}.octicon-light-bulb:before{content:'\f000'}.octicoLine truncated
|
||||
+5
-3
@@ -254,7 +254,7 @@ $(document).ready(function () {
|
||||
$dropz.dropzone({
|
||||
url: $dropz.data('upload-url'),
|
||||
headers: {"X-Csrf-Token": csrf},
|
||||
maxFiles: 5,
|
||||
maxFiles: $dropz.data('max-file'),
|
||||
maxFilesize: $dropz.data('max-size'),
|
||||
acceptedFiles: $dropz.data('accepts'),
|
||||
addRemoveLinks: true,
|
||||
@@ -265,10 +265,12 @@ $(document).ready(function () {
|
||||
init: function () {
|
||||
this.on("success", function (file, data) {
|
||||
filenameDict[file.name] = data.uuid;
|
||||
console.log(data)
|
||||
$('.attachments').append('<input id="' + data.uuid + '" name="attachments" type="hidden" value="' + data.uuid + '">');
|
||||
})
|
||||
this.on("removedfile", function (file) {
|
||||
console.log(filenameDict[file.name]);
|
||||
if (file.name in filenameDict) {
|
||||
$('#' + filenameDict[file.name]).remove();
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
@@ -152,6 +152,9 @@
|
||||
margin-bottom: 10px;
|
||||
border: 2px dashed #0087F7;
|
||||
box-shadow: none;
|
||||
.dz-error-message {
|
||||
top: 140px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+52
-99
@@ -7,11 +7,8 @@ package repo
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -181,6 +178,7 @@ func NewIssue(ctx *middleware.Context) {
|
||||
ctx.Data["RequireDropzone"] = true
|
||||
ctx.Data["IsAttachmentEnabled"] = setting.AttachmentEnabled
|
||||
ctx.Data["AttachmentAllowedTypes"] = setting.AttachmentAllowedTypes
|
||||
ctx.Data["AttachmentMaxFiles"] = setting.AttachmentMaxFiles
|
||||
|
||||
if ctx.User.IsAdmin {
|
||||
var (
|
||||
@@ -215,18 +213,19 @@ func NewIssue(ctx *middleware.Context) {
|
||||
}
|
||||
|
||||
func NewIssuePost(ctx *middleware.Context, form auth.CreateIssueForm) {
|
||||
fmt.Println(ctx.QueryStrings("uuids"))
|
||||
ctx.Data["Title"] = ctx.Tr("repo.issues.new")
|
||||
ctx.Data["PageIsIssueList"] = true
|
||||
ctx.Data["RequireDropzone"] = true
|
||||
ctx.Data["IsAttachmentEnabled"] = setting.AttachmentEnabled
|
||||
ctx.Data["AttachmentAllowedTypes"] = setting.AttachmentAllowedTypes
|
||||
ctx.Data["AttachmentMaxFiles"] = setting.AttachmentMaxFiles
|
||||
|
||||
var (
|
||||
repo = ctx.Repo.Repository
|
||||
labelIDs []int64
|
||||
milestoneID int64
|
||||
assigneeID int64
|
||||
attachments []string
|
||||
)
|
||||
if ctx.User.IsAdmin {
|
||||
// Check labels.
|
||||
@@ -286,6 +285,10 @@ func NewIssuePost(ctx *middleware.Context, form auth.CreateIssueForm) {
|
||||
}
|
||||
}
|
||||
|
||||
if setting.AttachmentEnabled {
|
||||
attachments = ctx.QueryStrings("attachments")
|
||||
}
|
||||
|
||||
if ctx.HasError() {
|
||||
ctx.HTML(200, ISSUE_NEW)
|
||||
return
|
||||
@@ -301,7 +304,7 @@ func NewIssuePost(ctx *middleware.Context, form auth.CreateIssueForm) {
|
||||
AssigneeID: assigneeID,
|
||||
Content: form.Content,
|
||||
}
|
||||
if err := models.NewIssue(repo, issue, labelIDs); err != nil {
|
||||
if err := models.NewIssue(repo, issue, labelIDs, attachments); err != nil {
|
||||
ctx.Handle(500, "NewIssue", err)
|
||||
return
|
||||
}
|
||||
@@ -347,9 +350,50 @@ func NewIssuePost(ctx *middleware.Context, form auth.CreateIssueForm) {
|
||||
ctx.Redirect(ctx.Repo.RepoLink + "/issues/" + com.ToStr(issue.Index))
|
||||
}
|
||||
|
||||
func UploadAttachment(ctx *middleware.Context) {
|
||||
func UploadIssueAttachment(ctx *middleware.Context) {
|
||||
if !setting.AttachmentEnabled {
|
||||
ctx.Error(404, "attachment is not enabled")
|
||||
return
|
||||
}
|
||||
|
||||
allowedTypes := strings.Split(setting.AttachmentAllowedTypes, ",")
|
||||
file, header, err := ctx.Req.FormFile("file")
|
||||
if err != nil {
|
||||
ctx.Error(500, fmt.Sprintf("FormFile: %v", err))
|
||||
return
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
buf := make([]byte, 1024)
|
||||
n, _ := file.Read(buf)
|
||||
if n > 0 {
|
||||
buf = buf[:n]
|
||||
}
|
||||
fileType := http.DetectContentType(buf)
|
||||
|
||||
allowed := false
|
||||
for _, t := range allowedTypes {
|
||||
t := strings.Trim(t, " ")
|
||||
if t == "*/*" || t == fileType {
|
||||
allowed = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if !allowed {
|
||||
ctx.Error(400, ErrFileTypeForbidden.Error())
|
||||
return
|
||||
}
|
||||
|
||||
attach, err := models.NewAttachment(header.Filename, buf, file)
|
||||
if err != nil {
|
||||
ctx.Error(500, fmt.Sprintf("NewAttachment: %v", err))
|
||||
return
|
||||
}
|
||||
|
||||
log.Trace("New attachment uploaded: %s", attach.UUID)
|
||||
ctx.JSON(200, map[string]string{
|
||||
"uuid": "fuck",
|
||||
"uuid": attach.UUID,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -687,78 +731,6 @@ func UpdateAssignee(ctx *middleware.Context) {
|
||||
})
|
||||
}
|
||||
|
||||
func uploadFiles(ctx *middleware.Context, issueId, commentId int64) {
|
||||
if !setting.AttachmentEnabled {
|
||||
return
|
||||
}
|
||||
|
||||
allowedTypes := strings.Split(setting.AttachmentAllowedTypes, "|")
|
||||
attachments := ctx.Req.MultipartForm.File["attachments"]
|
||||
|
||||
if len(attachments) > setting.AttachmentMaxFiles {
|
||||
ctx.Handle(400, "issue.Comment", ErrTooManyFiles)
|
||||
return
|
||||
}
|
||||
|
||||
for _, header := range attachments {
|
||||
file, err := header.Open()
|
||||
|
||||
if err != nil {
|
||||
ctx.Handle(500, "issue.Comment(header.Open)", err)
|
||||
return
|
||||
}
|
||||
|
||||
defer file.Close()
|
||||
|
||||
buf := make([]byte, 1024)
|
||||
n, _ := file.Read(buf)
|
||||
if n > 0 {
|
||||
buf = buf[:n]
|
||||
}
|
||||
fileType := http.DetectContentType(buf)
|
||||
fmt.Println(fileType)
|
||||
|
||||
allowed := false
|
||||
|
||||
for _, t := range allowedTypes {
|
||||
t := strings.Trim(t, " ")
|
||||
|
||||
if t == "*/*" || t == fileType {
|
||||
allowed = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if !allowed {
|
||||
ctx.Handle(400, "issue.Comment", ErrFileTypeForbidden)
|
||||
return
|
||||
}
|
||||
|
||||
os.MkdirAll(setting.AttachmentPath, os.ModePerm)
|
||||
out, err := ioutil.TempFile(setting.AttachmentPath, "attachment_")
|
||||
|
||||
if err != nil {
|
||||
ctx.Handle(500, "ioutil.TempFile", err)
|
||||
return
|
||||
}
|
||||
|
||||
defer out.Close()
|
||||
|
||||
out.Write(buf)
|
||||
_, err = io.Copy(out, file)
|
||||
if err != nil {
|
||||
ctx.Handle(500, "io.Copy", err)
|
||||
return
|
||||
}
|
||||
|
||||
_, err = models.CreateAttachment(issueId, commentId, header.Filename, out.Name())
|
||||
if err != nil {
|
||||
ctx.Handle(500, "CreateAttachment", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func Comment(ctx *middleware.Context) {
|
||||
send := func(status int, data interface{}, err error) {
|
||||
if err != nil {
|
||||
@@ -884,7 +856,7 @@ func Comment(ctx *middleware.Context) {
|
||||
}
|
||||
|
||||
if comment != nil {
|
||||
uploadFiles(ctx, issue.ID, comment.Id)
|
||||
// uploadFiles(ctx, issue.ID, comment.Id)
|
||||
}
|
||||
|
||||
// Notify watchers.
|
||||
@@ -1194,25 +1166,6 @@ func DeleteMilestone(ctx *middleware.Context) {
|
||||
})
|
||||
}
|
||||
|
||||
func IssueGetAttachment(ctx *middleware.Context) {
|
||||
id := com.StrTo(ctx.Params(":id")).MustInt64()
|
||||
if id == 0 {
|
||||
ctx.Error(404)
|
||||
return
|
||||
}
|
||||
|
||||
attachment, err := models.GetAttachmentById(id)
|
||||
|
||||
if err != nil {
|
||||
ctx.Handle(404, "models.GetAttachmentById", err)
|
||||
return
|
||||
}
|
||||
|
||||
// Fix #312. Attachments with , in their name are not handled correctly by Google Chrome.
|
||||
// We must put the name in " manually.
|
||||
ctx.ServeFile(attachment.Path, "\""+attachment.Name+"\"")
|
||||
}
|
||||
|
||||
func PullRequest2(ctx *middleware.Context) {
|
||||
ctx.HTML(200, "repo/pr2/list")
|
||||
}
|
||||
+1
-1
@@ -1 +1 @@
|
||||
0.6.4.0810 Beta
|
||||
0.6.4.0811 Beta
|
||||
@@ -17,18 +17,19 @@
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui top attached tabular menu">
|
||||
<a class="active item" data-tab="write">{{.i18n.Tr "repo.release.write"}}</a>
|
||||
<a class="item" data-tab="preview" data-url="/api/v1/markdown" data-context="{{.RepoLink}}">{{.i18n.Tr "repo.release.preview"}}</a>
|
||||
<a class="active item" data-tab="write">{{.i18n.Tr "repo.release.write"}}</a>
|
||||
<a class="item" data-tab="preview" data-url="/api/v1/markdown" data-context="{{.RepoLink}}">{{.i18n.Tr "repo.release.preview"}}</a>
|
||||
</div>
|
||||
<div class="ui bottom attached active tab segment" data-tab="write">
|
||||
<textarea name="content"></textarea>
|
||||
</div>
|
||||
<div class="ui bottom attached tab segment markdown" data-tab="preview">
|
||||
{{.i18n.Tr "repo.release.loading"}}
|
||||
{{.i18n.Tr "repo.release.loading"}}
|
||||
</div>
|
||||
</div>
|
||||
{{if .IsAttachmentEnabled}}
|
||||
<div class="ui basic button dropzone" id="dropzone" data-upload-url="/attachments" data-accepts="{{.AttachmentAllowedTypes}}" data-max-size="1" data-default-message="{{.i18n.Tr "dropzone.default_message"}}" data-invalid-input-type="{{.i18n.Tr "dropzone.invalid_input_type"}}" data-file-too-big="{{.i18n.Tr "dropzone.file_too_big"}}" data-remove-file="{{.i18n.Tr "dropzone.remove_file"}}"></div>
|
||||
<div class="attachments"></div>
|
||||
<div class="ui basic button dropzone" id="dropzone" data-upload-url="/issues/attachments" data-accepts="{{.AttachmentAllowedTypes}}" data-max-file="{{.AttachmentMaxFiles}}" data-max-size="2" data-default-message="{{.i18n.Tr "dropzone.default_message"}}" data-invalid-input-type="{{.i18n.Tr "dropzone.invalid_input_type"}}" data-file-too-big="{{.i18n.Tr "dropzone.file_too_big"}}" data-remove-file="{{.i18n.Tr "dropzone.remove_file"}}"></div>
|
||||
{{end}}
|
||||
<div class="text right">
|
||||
<button class="ui green button">
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<span class="attachment-label label label-info">Attachments:</span>
|
||||
|
||||
{{range $attachments}}
|
||||
<a class="attachment label label-default" href="{{.IssueId}}/attachment/{{.Id}}">{{.Name}}</a>
|
||||
<a class="attachment label label-default" href="/attachments/{{.UUID}}">{{.Name}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -145,17 +145,17 @@
|
||||
</div>
|
||||
</div>
|
||||
{{if .AttachmentsEnabled}}
|
||||
<div id="attached">
|
||||
<!-- <div id="attached">
|
||||
<div id="attached-list">
|
||||
<b>Attachments:</b>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
{{end}}
|
||||
<div class="text-right">
|
||||
<div class="form-group">
|
||||
{{if .AttachmentsEnabled}}
|
||||
<input type="file" accept="{{.AllowedTypes}}" style="display: none;" id="attachments-input" name="attachments" multiple />
|
||||
<button class="btn-default btn attachment-add" id="attachments-button">Select Attachments...</button>
|
||||
<!-- <input type="file" accept="{{.AllowedTypes}}" style="display: none;" id="attachments-input" name="attachments" multiple />
|
||||
<button class="btn-default btn attachment-add" id="attachments-button">Select Attachments...</button> -->
|
||||
{{end}}
|
||||
{{if .IsIssueOwner}}{{if .Issue.IsClosed}}
|
||||
<input type="submit" class="btn-default btn issue-open" id="issue-open-btn" data-origin="Reopen" data-text="Reopen & Comment" name="change_status" value="Reopen"/>{{else}}
|
||||
|
||||
Reference in new issue
Block a user