[Slashdotjp-dev 1493] [1024] revert r1023 change

アーカイブの一覧に戻る

svnno****@sourc***** svnno****@sourc*****
2009年 2月 20日 (金) 20:25:35 JST


Revision: 1024
          http://svn.sourceforge.jp/view?root=slashdotjp&view=rev&rev=1024
Author:   tach
Date:     2009-02-20 20:25:34 +0900 (Fri, 20 Feb 2009)

Log Message:
-----------
revert r1023 change

Modified Paths:
--------------
    slashjp/trunk/Slash/Utility/Comments/Comments.pm


-------------- next part --------------
Modified: slashjp/trunk/Slash/Utility/Comments/Comments.pm
===================================================================
--- slashjp/trunk/Slash/Utility/Comments/Comments.pm	2009-02-20 11:23:20 UTC (rev 1023)
+++ slashjp/trunk/Slash/Utility/Comments/Comments.pm	2009-02-20 11:25:34 UTC (rev 1024)
@@ -2638,37 +2638,19 @@
 	my ($discussion, $options) = @_;
 	my $constants = getCurrentStatic();
 	my $reader = getObject('Slash::DB', { db_type => 'reader' });
-	my $stories = { 'prev' => {}, 'next' => {} };
+	my $stories = {};
 	my $ret = '';
 
 	return $ret if (!$discussion || ref($discussion) ne "HASH");
 
 	my $sid = $reader->getStorySidFromDiscussion($discussion->{id});
-	my $kinds = $reader->getDescriptions('discussion_kinds');
-	my $kind = $kinds->{ $discussion->{dkid} };
-print STDERR "kind = $kind\n";
-
-	if ($kind =~ /story$/ && $sid) {
+	if ($sid) {
 		my $story = $reader->getStory($sid);
-		$stories->{kinds} = "story";
 		if ($constants->{use_prev_next_link}) {
 			$stories->{prev} = $reader->getStoryByTime('<', $story);
 			$stories->{next} = $reader->getStoryByTime('>', $story) unless $story->{is_future};
 		}
-	} elsif ($kind eq "journal") {
-		my $journal_reader = getObject("Slash::Journal");
-		my $journal = $journal_reader->getJournalByDiscussion($discussion->{id});
-		if (my $prev = $journal_reader->getJournalByTime('<', [ $journal->{date} ], { uid => $journal->{uid} })) {
-use Data::Dumper; print STDERR Dumper($prev);
-			$stories->{prev}->{title} = $prev->{desctiption};
-			$stories->{prev}->{url} = $journal_reader->createJournalUrl($prev);
-		}
-		if (my $next = $journal_reader->getJournalByTime('>', [ $journal->{date} ], { uid => $journal->{uid} })) {
-			$stories->{next}->{title} = $next->{desctiption};
-			$stories->{next}->{url} = $journal_reader->createJournalUrl($next);
-		}
 	}
-use Data::Dumper; print STDERR Dumper($stories);
 
 	$ret = slashDisplay('printCommentsSuffix', {
 		stories	=> $stories,



Slashdotjp-dev メーリングリストの案内
アーカイブの一覧に戻る