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/IISMainHandler/handlers/request/CreateThreadHandler.cs

33 lines
857 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, false),
newPost.exportToXml(context, false)
};
}
}
}