An alternative to UBB.threads
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
FLocal/FLocal.IISHandler/handlers/request/CreateThreadHandler.cs

32 lines
872 B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using FLocal.Common.dataobjects;
namespace FLocal.IISHandler.handlers.request {
class CreateThreadHandler : AbstractNewMessageHandler {
protected override XElement[] Do(WebContext context) {
Thread newThread = Board.LoadById(
int.Parse(context.httprequest.Form["board"])
).CreateThread(
context.session.account.user,
this.getTitle(context),
this.getBody(context),
PostLayer.LoadById(int.Parse(context.httprequest.Form["layerId"]))
);
Post newPost = newThread.firstPost;
newThread.markAsRead(context.session.account, newPost, newPost);
return new XElement[] {
newThread.board.exportToXml(context, Board.SubboardsOptions.None),
newPost.exportToXml(context)
};
}
}
}