Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion controllers/admin/account.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package admin

import (
"github.com/lisijie/goblog/models"
"github.com/lionel0806/goblog/models"
"strconv"
"strings"
)
Expand Down
14 changes: 7 additions & 7 deletions controllers/admin/article.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package admin
import (
"fmt"
"github.com/astaxie/beego/orm"
"github.com/lisijie/goblog/models"
"github.com/lionel0806/goblog/models"
"os"
"strconv"
"strings"
Expand All @@ -28,8 +28,8 @@ func (this *ArticleController) List() {
)
searchtype = this.GetString("searchtype")
keyword = this.GetString("keyword")
status, _ = this.GetInt("status")
if page, _ = this.GetInt("page"); page < 1 {
status, _ = this.GetInt64("status")
if page, _ = this.GetInt64("page"); page < 1 {
page = 1
}
offset = (page - 1) * pagesize
Expand Down Expand Up @@ -70,7 +70,7 @@ func (this *ArticleController) Add() {

//编辑
func (this *ArticleController) Edit() {
id, _ := this.GetInt("id")
id, _ := this.GetInt64("id")
post := models.Post{Id: id}
if post.Read() != nil {
this.Abort("404")
Expand Down Expand Up @@ -101,8 +101,8 @@ func (this *ArticleController) Save() {
this.showmsg("标题不能为空!")
}

id, _ = this.GetInt("id")
status, _ = this.GetInt("status")
id, _ = this.GetInt64("id")
status, _ = this.GetInt64("status")

if this.GetString("istop") == "1" {
istop = 1
Expand Down Expand Up @@ -192,7 +192,7 @@ RD:

//删除
func (this *ArticleController) Delete() {
id, _ := this.GetInt("id")
id, _ := this.GetInt64("id")
post := models.Post{Id: id}
if post.Read() == nil {
post.Delete()
Expand Down
2 changes: 1 addition & 1 deletion controllers/admin/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package admin

import (
"github.com/astaxie/beego"
"github.com/lisijie/goblog/models"
"github.com/lionel0806/goblog/models"
"strconv"
"strings"
"time"
Expand Down
2 changes: 1 addition & 1 deletion controllers/admin/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package admin

import (
"github.com/astaxie/beego"
"github.com/lisijie/goblog/models"
"github.com/lionel0806/goblog/models"
"os"
"runtime"
)
Expand Down
2 changes: 1 addition & 1 deletion controllers/admin/system.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package admin

import (
"github.com/lisijie/goblog/models"
"github.com/lionel0806/goblog/models"
)

type SystemController struct {
Expand Down
4 changes: 2 additions & 2 deletions controllers/admin/tag.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package admin

import (
"github.com/lisijie/goblog/models"
"github.com/lionel0806/goblog/models"
"strconv"
"strings"
)
Expand All @@ -27,7 +27,7 @@ func (this *TagController) list() {
var list []*models.Tag
var tag models.Tag

if page, _ = this.GetInt("page"); page < 1 {
if page, _ = this.GetInt64("page"); page < 1 {
page = 1
}
offset := (page - 1) * pagesize
Expand Down
8 changes: 4 additions & 4 deletions controllers/admin/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package admin

import (
"github.com/astaxie/beego/validation"
"github.com/lisijie/goblog/models"
"github.com/lionel0806/goblog/models"
"strings"
)

Expand All @@ -17,7 +17,7 @@ func (this *UserController) List() {
var list []*models.User
var user models.User

if page, _ = this.GetInt("page"); page < 1 {
if page, _ = this.GetInt64("page"); page < 1 {
page = 1
}
offset := (page - 1) * pagesize
Expand Down Expand Up @@ -100,7 +100,7 @@ func (this *UserController) Add() {

//编辑用户
func (this *UserController) Edit() {
id, _ := this.GetInt("id")
id, _ := this.GetInt64("id")
user := models.User{Id: id}
if err := user.Read(); err != nil {
this.showmsg("用户不存在")
Expand Down Expand Up @@ -150,7 +150,7 @@ func (this *UserController) Edit() {

//删除用户
func (this *UserController) Delete() {
id, _ := this.GetInt("id")
id, _ := this.GetInt64("id")
if id == 1 {
this.showmsg("不能删除ID为1的用户")
}
Expand Down
2 changes: 1 addition & 1 deletion controllers/blog/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package blog

import (
"github.com/astaxie/beego"
"github.com/lisijie/goblog/models"
"github.com/lionel0806/goblog/models"
"os"
"strings"
)
Expand Down
2 changes: 1 addition & 1 deletion controllers/blog/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package blog

import (
"github.com/lisijie/goblog/models"
"github.com/lionel0806/goblog/models"
"strconv"
"strings"
)
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"flag"
"github.com/astaxie/beego"
"github.com/astaxie/beego/orm"
"github.com/lisijie/goblog/controllers/admin"
"github.com/lisijie/goblog/controllers/blog"
"github.com/lisijie/goblog/models"
"github.com/lionel0806/goblog/controllers/admin"
"github.com/lionel0806/goblog/controllers/blog"
"github.com/lionel0806/goblog/models"
"os"
"path/filepath"
)
Expand Down