The default topic should now be posted in the right forum.

Fixed install-gosora-linux
Fixed the staff mark-up on the opening posts.
Fixed the lack of group tags on the opening posts.
This commit is contained in:
Azareal 2017-03-15 09:34:07 +00:00
parent 3662a298d4
commit 049131ef34
3 changed files with 11 additions and 5 deletions

View File

@ -223,7 +223,7 @@ INSERT INTO forums_permissions(`gid`,`fid`,`permissions`) VALUES (4,1,'{}');
INSERT INTO forums_permissions(`gid`,`fid`,`permissions`) VALUES (5,1,'{}'); INSERT INTO forums_permissions(`gid`,`fid`,`permissions`) VALUES (5,1,'{}');
INSERT INTO forums_permissions(`gid`,`fid`,`permissions`) VALUES (6,1,'{}'); INSERT INTO forums_permissions(`gid`,`fid`,`permissions`) VALUES (6,1,'{}');
INSERT INTO topics(`title`,`content`,`createdAt`,`lastReplyAt`,`createdBy`,`parentID`) INSERT INTO topics(`title`,`content`,`createdAt`,`lastReplyAt`,`createdBy`,`parentID`)
VALUES ('Test Topic','A topic automatically generated by the software.',NOW(),NOW(),1,1); VALUES ('Test Topic','A topic automatically generated by the software.',NOW(),NOW(),1,2);
INSERT INTO replies(`tid`,`content`,`createdAt`,`createdBy`,`lastEdit`,`lastEditBy`) INSERT INTO replies(`tid`,`content`,`createdAt`,`createdBy`,`lastEdit`,`lastEditBy`)
VALUES (1,'Reply 1',NOW(),1,0,0); VALUES (1,'Reply 1',NOW(),1,0,0);

View File

@ -6,5 +6,10 @@ go get -u golang.org/x/crypto/bcrypt
echo "Preparing the installer" echo "Preparing the installer"
go generate go generate
go build -o Gosora go build -o Gosora
go build ./install cd ./install
go build -o Install
mv ./Install ..
cd ..
echo "Running the installer"
./Install ./Install

View File

@ -330,9 +330,9 @@ func route_topic_id(w http.ResponseWriter, r *http.Request){
user.Perms.CreateReply = false user.Perms.CreateReply = false
} }
if groups[topic.Group].Is_Mod { topic.Tag = groups[topic.Group].Tag
if groups[topic.Group].Is_Mod || groups[topic.Group].Is_Admin {
topic.Css = staff_css_tmpl topic.Css = staff_css_tmpl
topic.Level = -1
} }
/*if settings["url_tags"] == false { /*if settings["url_tags"] == false {
@ -378,12 +378,13 @@ func route_topic_id(w http.ResponseWriter, r *http.Request){
replyItem.ParentID = topic.ID replyItem.ParentID = topic.ID
replyItem.ContentHtml = parse_message(replyItem.Content) replyItem.ContentHtml = parse_message(replyItem.Content)
replyItem.ContentLines = strings.Count(replyItem.Content,"\n") replyItem.ContentLines = strings.Count(replyItem.Content,"\n")
if groups[replyItem.Group].Is_Mod || groups[replyItem.Group].Is_Admin { if groups[replyItem.Group].Is_Mod || groups[replyItem.Group].Is_Admin {
replyItem.Css = staff_css_tmpl replyItem.Css = staff_css_tmpl
replyItem.Level = -1
} else { } else {
replyItem.Css = no_css_tmpl replyItem.Css = no_css_tmpl
} }
if replyItem.Avatar != "" { if replyItem.Avatar != "" {
if replyItem.Avatar[0] == '.' { if replyItem.Avatar[0] == '.' {
replyItem.Avatar = "/uploads/avatar_" + strconv.Itoa(replyItem.CreatedBy) + replyItem.Avatar replyItem.Avatar = "/uploads/avatar_" + strconv.Itoa(replyItem.CreatedBy) + replyItem.Avatar