Tatsuki SUGIURA
sugi****@users*****
2006年 7月 24日 (月) 17:48:13 JST
Index: slashjp/plugins/Journal/journal.pl diff -u slashjp/plugins/Journal/journal.pl:1.13 slashjp/plugins/Journal/journal.pl:1.14 --- slashjp/plugins/Journal/journal.pl:1.13 Thu Jul 13 10:12:27 2006 +++ slashjp/plugins/Journal/journal.pl Mon Jul 24 17:48:13 2006 @@ -2,7 +2,7 @@ # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: journal.pl,v 1.13 2006/07/13 01:12:27 sugi Exp $ +# $Id: journal.pl,v 1.14 2006/07/24 08:48:13 sugi Exp $ use strict; use Slash 2.003; # require Slash 2.3.x @@ -13,7 +13,7 @@ use Slash::XML; use vars qw($VERSION); -($VERSION) = ' $Revision: 1.13 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.14 $ ' =~ /\$Revision:\s+([^\s]+)/; sub main { my $journal = getObject('Slash::Journal'); @@ -442,8 +442,6 @@ return displayFriends(@_); } - _printHead('userhead', $head_data, 1) or return; - # clean it up my $start = fixint($form->{start}) || 0; my $articles = $journal_reader->getsByUid($uid, $start, @@ -459,6 +457,11 @@ return; } + if (@$articles == 1) { + $head_data->{html_title} = $articles->[0]->[2]; + } + _printHead('userhead', $head_data, 1) or return; + # check for extra articles ... we request one more than we need # and if we get the extra one, we know we have extra ones, and # we pop it off @@ -920,10 +923,11 @@ sub _printHead { my($head, $data, $edit_the_uid) = @_; my $title = getData($head, $data); + my $html_title = (defined($data->{html_title}) ? $data->{html_title}." - " : '') . $title; my $options = { last_modified => $data->{last_modified} }; my $links = { - title => $title, + title => $html_title, 'link' => { uid => $data->{uid}, nickname => $data->{nickname}