Fix issue pages URL params

This commit is contained in:
Unknown 2014-03-27 19:42:10 -04:00
parent 34f4af9ebf
commit eb6021f73f
7 changed files with 49 additions and 30 deletions

View file

@ -21,7 +21,8 @@ type Issue struct {
Id int64
Index int64 // Index in one repository.
Name string
RepoId int64 `xorm:"index"`
RepoId int64 `xorm:"index"`
Repo *Repository `xorm:"-"`
PosterId int64
Poster *User `xorm:"-"`
MilestoneId int64

View file

@ -436,7 +436,8 @@ func GetRepositoryByName(userId int64, repoName string) (*Repository, error) {
}
// GetRepositoryById returns the repository by given id if exists.
func GetRepositoryById(id int64) (repo *Repository, err error) {
func GetRepositoryById(id int64) (*Repository, error) {
repo := &Repository{}
has, err := orm.Id(id).Get(repo)
if err != nil {
return nil, err