[Cpan-forum-commit] rev 336 - in trunk: . lib/CPAN
svn at pti.co.il
svn at pti.co.il
Tue Aug 14 11:32:47 EEST 2007
Author: gabor
Date: 2007-08-14 11:32:47 +0300 (Tue, 14 Aug 2007)
New Revision: 336
Modified:
trunk/
trunk/lib/CPAN/Forum.pm
Log:
fetch reposnses before calling _post()
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 7bc34947-122d-0410-bc5a-f898d2bb5f81:/local/cpan-forum:4422
8c4c90e1-83eb-0310-96eb-e7cb62807872:/local/cpan-forum:12752
+ 7bc34947-122d-0410-bc5a-f898d2bb5f81:/local/cpan-forum:4423
8c4c90e1-83eb-0310-96eb-e7cb62807872:/local/cpan-forum:12752
Modified: trunk/lib/CPAN/Forum.pm
===================================================================
--- trunk/lib/CPAN/Forum.pm 2007-08-14 08:32:35 UTC (rev 335)
+++ trunk/lib/CPAN/Forum.pm 2007-08-14 08:32:47 UTC (rev 336)
@@ -1102,6 +1102,7 @@
$t->param(thread_id => $post->{thread});
$t->param(thread_count => $thread_count);
}
+ $post->{responses} = CPAN::Forum::DB::Posts->list_posts_by(parent => $post->{id}); # SQL
my %post = %{$self->_post($post)};
$t->param(%post);
@@ -1271,15 +1272,13 @@
sub _post {
my ($self, $post) = @_;
- my $responses = $post->{responses} || CPAN::Forum::DB::Posts->list_posts_by(parent => $post->{id}); # SQL
- $self->log->debug(Data::Dumper->Dump([$responses], ['responses']));
-
+ $self->log->debug(Data::Dumper->Dump([$post], ['post']));
my %post = (
postername => $post->{username},
date => _post_date($post->{date}),
parentid => $post->{parent},
- responses => $responses,
+ responses => $post->{responses},
text => $self->_text_escape($post->{text}),
id => $post->{id},
subject => _subject_escape($post->{subject}),
More information about the Cpan-forum-commit
mailing list