[Cpan-forum-commit] rev 341 - in trunk: . lib/CPAN/Forum/DB lib/CPAN/Forum/RM

svn at pti.co.il svn at pti.co.il
Tue Aug 14 11:34:10 EEST 2007


Author: gabor
Date: 2007-08-14 11:34:09 +0300 (Tue, 14 Aug 2007)
New Revision: 341

Modified:
   trunk/
   trunk/lib/CPAN/Forum/DB/Posts.pm
   trunk/lib/CPAN/Forum/RM/Search.pm
Log:
add logging



Property changes on: trunk
___________________________________________________________________
Name: svk:merge
   - 7bc34947-122d-0410-bc5a-f898d2bb5f81:/local/cpan-forum:4427
8c4c90e1-83eb-0310-96eb-e7cb62807872:/local/cpan-forum:12752
   + 7bc34947-122d-0410-bc5a-f898d2bb5f81:/local/cpan-forum:4428
8c4c90e1-83eb-0310-96eb-e7cb62807872:/local/cpan-forum:12752

Modified: trunk/lib/CPAN/Forum/DB/Posts.pm
===================================================================
--- trunk/lib/CPAN/Forum/DB/Posts.pm	2007-08-14 08:33:54 UTC (rev 340)
+++ trunk/lib/CPAN/Forum/DB/Posts.pm	2007-08-14 08:34:09 UTC (rev 341)
@@ -124,7 +124,8 @@
     my ($self, $params) = @_;
 
     my %where  = %{$params->{where}};
-    %where = (1 => 1) if not %where;
+    #%where = (1 => 1) if not %where;
+    $CPAN::Forum::logger->debug(Data::Dumper->Dump([\%where], ['where']));
 
     my $pager = __PACKAGE__->pager(
         where         => \%where,
@@ -132,6 +133,8 @@
         page          => $params->{page}     || 1,
         order_by      => $params->{order_by} || "id DESC",
     );
+
+    #my $sql = "SELECT COUNT(*) FROM posts";
 }
 
 sub list_counted_posts {

Modified: trunk/lib/CPAN/Forum/RM/Search.pm
===================================================================
--- trunk/lib/CPAN/Forum/RM/Search.pm	2007-08-14 08:33:54 UTC (rev 340)
+++ trunk/lib/CPAN/Forum/RM/Search.pm	2007-08-14 08:34:09 UTC (rev 341)
@@ -3,6 +3,8 @@
 use warnings;
 
 # currently returning the number of results but this might change
+# ->_search_results($t, {where => {}, page => $n});
+# $t is an HTML::Template to be filled
 sub _search_results {
     my ($self, $t, $params) = @_;
     
@@ -10,6 +12,7 @@
 
     my $pager   = CPAN::Forum::DB::Posts->mysearch($params);
     my @results = $pager->search_where();
+    $self->log->debug(Data::Dumper->Dump([\@results], ['results']));
     my $total   = $pager->total_entries;
     $self->log->debug("number of entries: total=$total");
     my $data = $self->build_listing(\@results);



More information about the Cpan-forum-commit mailing list