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.
 
 
 
 

36 lines
1.1 KiB

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 ReplyHandler : AbstractNewMessageHandler {
protected override string templateName {
get {
return "result/MessageCreated.xslt";
}
}
protected override XElement[] Do(WebContext context) {
// Post post = Post.LoadById(int.Parse(context.httprequest.Form["parent"]));
//int desiredLayerId = Math.Min(context.session.account.user.getMinAllowedLayer(post.thread.board), int.Parse(context.httprequest.Form["layer"]));
Post newPost = Post.LoadById(
int.Parse(context.httprequest.Form["parent"])
).Reply(
context.session.account.user,
this.getTitle(context),
this.getBody(context),
int.Parse(context.httprequest.Form["layerId"])
);
newPost.thread.markAsRead(context.session.account, newPost, newPost);
return new XElement[] { newPost.exportToXmlWithoutThread(context, false) };
}
}
}