From 33dadc3752d34a123fc18d82a15dce2216959cd3 Mon Sep 17 00:00:00 2001
From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com>
Date: Sun, 5 Sep 2010 14:14:55 +0000
Subject: [PATCH] Post.bodyShort now returns UBBCode instead of HTML for new
posts
---
Builder/IISMainHandler/build.txt | 2 +-
Common/dataobjects/Post.cs | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/Builder/IISMainHandler/build.txt b/Builder/IISMainHandler/build.txt
index f0acb59..2fefc46 100644
--- a/Builder/IISMainHandler/build.txt
+++ b/Builder/IISMainHandler/build.txt
@@ -1 +1 @@
-1071
\ No newline at end of file
+1073
\ No newline at end of file
diff --git a/Common/dataobjects/Post.cs b/Common/dataobjects/Post.cs
index a60b0d3..5166546 100644
--- a/Common/dataobjects/Post.cs
+++ b/Common/dataobjects/Post.cs
@@ -126,6 +126,9 @@ namespace FLocal.Common.dataobjects {
}
public string bodyShort {
get {
+ if(this.revision.HasValue) {
+ return this.latestRevision.body.PHPSubstring(0, 300);
+ }
return this.body.Replace("
", Util.EOL).Replace("
", Util.EOL).PHPSubstring(0, 1000);
}
}