|
|
@ -12,7 +12,7 @@ using FLocal.Core.DB.conditions; |
|
|
|
|
|
|
|
|
|
|
|
namespace FLocal.IISHandler.handlers.response { |
|
|
|
namespace FLocal.IISHandler.handlers.response { |
|
|
|
|
|
|
|
|
|
|
|
class UserRepliesHandler : AbstractGetHandler { |
|
|
|
class UserRepliesHandler : AbstractUserGetHandler { |
|
|
|
|
|
|
|
|
|
|
|
override protected string templateName { |
|
|
|
override protected string templateName { |
|
|
|
get { |
|
|
|
get { |
|
|
@ -20,8 +20,7 @@ namespace FLocal.IISHandler.handlers.response { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override protected IEnumerable<XElement> getSpecificData(WebContext context) { |
|
|
|
override protected IEnumerable<XElement> getUserSpecificData(WebContext context, User user) { |
|
|
|
User user = User.LoadById(int.Parse(context.requestParts[2])); |
|
|
|
|
|
|
|
PageOuter pageOuter = PageOuter.createFromGet( |
|
|
|
PageOuter pageOuter = PageOuter.createFromGet( |
|
|
|
context.requestParts, |
|
|
|
context.requestParts, |
|
|
|
context.userSettings.postsPerPage, |
|
|
|
context.userSettings.postsPerPage, |
|
|
@ -29,15 +28,13 @@ namespace FLocal.IISHandler.handlers.response { |
|
|
|
); |
|
|
|
); |
|
|
|
IEnumerable<Post> posts = user.getReplies(pageOuter); |
|
|
|
IEnumerable<Post> posts = user.getReplies(pageOuter); |
|
|
|
|
|
|
|
|
|
|
|
XElement[] result = new XElement[] { |
|
|
|
return new XElement[] { |
|
|
|
user.exportToXmlForViewing(context), |
|
|
|
user.exportToXmlForViewing(context), |
|
|
|
new XElement("posts", |
|
|
|
new XElement("posts", |
|
|
|
from post in posts select post.exportToXml(context), |
|
|
|
from post in posts select post.exportToXml(context), |
|
|
|
pageOuter.exportToXml(2, 5, 2) |
|
|
|
pageOuter.exportToXml(2, 5, 2) |
|
|
|
) |
|
|
|
) |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|