mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-06-28 17:51:28 +00:00
Fix editing reviews
This commit is contained in:
parent
2cf2e6622a
commit
110d81f117
2 changed files with 3 additions and 3 deletions
|
@ -337,7 +337,7 @@ public class Slot
|
||||||
LbpSerializer.StringElement("firstPublished", this.FirstUploaded) +
|
LbpSerializer.StringElement("firstPublished", this.FirstUploaded) +
|
||||||
LbpSerializer.StringElement("lastUpdated", this.LastUpdated) +
|
LbpSerializer.StringElement("lastUpdated", this.LastUpdated) +
|
||||||
(fullSerialization ?
|
(fullSerialization ?
|
||||||
yourReview?.Serialize() +
|
yourReview?.Serialize(null, "yourReview") +
|
||||||
LbpSerializer.StringElement("reviewsEnabled", ServerConfiguration.Instance.UserGeneratedContentLimits.LevelReviewsEnabled) +
|
LbpSerializer.StringElement("reviewsEnabled", ServerConfiguration.Instance.UserGeneratedContentLimits.LevelReviewsEnabled) +
|
||||||
LbpSerializer.StringElement("commentsEnabled", ServerConfiguration.Instance.UserGeneratedContentLimits.LevelCommentsEnabled && this.CommentsEnabled)
|
LbpSerializer.StringElement("commentsEnabled", ServerConfiguration.Instance.UserGeneratedContentLimits.LevelCommentsEnabled && this.CommentsEnabled)
|
||||||
: "") +
|
: "") +
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class Review
|
||||||
[XmlElement("thumbsdown")]
|
[XmlElement("thumbsdown")]
|
||||||
public int ThumbsDown { get; set; }
|
public int ThumbsDown { get; set; }
|
||||||
|
|
||||||
public string Serialize(RatedReview? yourRatingStats = null)
|
public string Serialize(RatedReview? yourRatingStats = null, string rootElement = "review")
|
||||||
{
|
{
|
||||||
string deletedBy = this.DeletedBy switch
|
string deletedBy = this.DeletedBy switch
|
||||||
{
|
{
|
||||||
|
@ -82,6 +82,6 @@ public class Review
|
||||||
LbpSerializer.StringElement("thumbsdown", this.ThumbsDown) +
|
LbpSerializer.StringElement("thumbsdown", this.ThumbsDown) +
|
||||||
LbpSerializer.StringElement("yourthumb", yourRatingStats?.Thumb ?? 0);
|
LbpSerializer.StringElement("yourthumb", yourRatingStats?.Thumb ?? 0);
|
||||||
|
|
||||||
return LbpSerializer.TaggedStringElement("review", reviewData, "id", this.SlotId + "." + this.Reviewer?.Username);
|
return LbpSerializer.TaggedStringElement(rootElement, reviewData, "id", this.SlotId + "." + this.Reviewer?.Username);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue