summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbbs <bbs@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-05-23 22:52:44 +0800
committerbbs <bbs@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-05-23 22:52:44 +0800
commitb832ea1647b29ac449d9b24103c08054b512db1f (patch)
tree536016c1905a93c691d004d3d9dc49c86727557d
parent898a6e2f39ec2ba4dde67ff8af3d8df39af0031b (diff)
downloadpttbbs-b832ea1647b29ac449d9b24103c08054b512db1f.tar
pttbbs-b832ea1647b29ac449d9b24103c08054b512db1f.tar.gz
pttbbs-b832ea1647b29ac449d9b24103c08054b512db1f.tar.bz2
pttbbs-b832ea1647b29ac449d9b24103c08054b512db1f.tar.lz
pttbbs-b832ea1647b29ac449d9b24103c08054b512db1f.tar.xz
pttbbs-b832ea1647b29ac449d9b24103c08054b512db1f.tar.zst
pttbbs-b832ea1647b29ac449d9b24103c08054b512db1f.zip
build short
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk@893 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rwxr-xr-xpttbbs/blog/builddb.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/pttbbs/blog/builddb.pl b/pttbbs/blog/builddb.pl
index 18660e48..66b3ad3b 100755
--- a/pttbbs/blog/builddb.pl
+++ b/pttbbs/blog/builddb.pl
@@ -96,8 +96,14 @@ sub builddata($$$)
else{
$dat{ sprintf('%04d%02d', $y, $m) } = 1;
$dat{"$currid.title"} = $t;
- $dat{"$currid.content"} = $rbh->{"$_.content"};
$dat{"$currid.author"} = $rbh->{"$_.owner"};
+ # $dat{"$currid.content"} = $rbh->{"$_.content"};
+ # ugly code for making short
+ my @c = split("\n",
+ $dat{"$currid.content"} = $rbh->{"$_.content"});
+ $dat{"$currid.short"} = ("$c[0]\n$c[1]\n$c[2]\n".
+ $c[3] ? '....' : '');
+
$dat{"$currid.prev"} = $dat{'last'};
$dat{"$dat{last}.next"} = $currid
if( $dat{'last'} );