diff --git a/Builder/IISMainHandler/build.txt b/Builder/IISMainHandler/build.txt index 46be098..5f798c1 100644 --- a/Builder/IISMainHandler/build.txt +++ b/Builder/IISMainHandler/build.txt @@ -1 +1 @@ -1128 \ No newline at end of file +1136 \ No newline at end of file diff --git a/Common/dataobjects/User.cs b/Common/dataobjects/User.cs index b01ed4f..28eb356 100644 --- a/Common/dataobjects/User.cs +++ b/Common/dataobjects/User.cs @@ -255,5 +255,26 @@ namespace FLocal.Common.dataobjects { ); } + public IEnumerable getThreads(Diapasone diapasone) { + return Thread.LoadByIds( + from stringId in Config.instance.mainConnection.LoadIdsByConditions( + Thread.TableSpec.instance, + new ComparisonCondition( + Thread.TableSpec.instance.getColumnSpec(Thread.TableSpec.FIELD_TOPICSTARTERID), + ComparisonType.EQUAL, + this.id.ToString() + ), + diapasone, + new JoinSpec[0], + new SortSpec[] { + new SortSpec( + Thread.TableSpec.instance.getColumnSpec(Thread.TableSpec.FIELD_LASTPOSTID), + false + ), + } + ) select int.Parse(stringId) + ); + } + } } diff --git a/IISMainHandler/HandlersFactory.cs b/IISMainHandler/HandlersFactory.cs index 0b2bbaa..cdee7ac 100644 --- a/IISMainHandler/HandlersFactory.cs +++ b/IISMainHandler/HandlersFactory.cs @@ -139,6 +139,8 @@ namespace FLocal.IISHandler { switch(context.requestParts[3].ToLower()) { case "info": return new handlers.response.UserInfoHandler(); + case "threads": + return new handlers.response.UserThreadsHandler(); case "posts": return new handlers.response.UserPostsHandler(); case "replies": diff --git a/IISMainHandler/IISMainHandler.csproj b/IISMainHandler/IISMainHandler.csproj index 662b9c9..41a908a 100644 --- a/IISMainHandler/IISMainHandler.csproj +++ b/IISMainHandler/IISMainHandler.csproj @@ -143,6 +143,9 @@ Importer + + +