--- ./news_page.module	2005-06-07 22:18:30.000000000 +0200
+++ ./news_page_ec_pager.module	2005-06-13 14:35:05.202485305 +0200
@@ -1,7 +1,8 @@
 <?php
 
 /* $Id: news_page.module,v 1.9 2005/06/07 16:41:39 MegaGrunt Exp $ */
-
+// **ec shows mod(s) by ec
+// **ec add a pager feature in the page (still doesn't work properly !!!)
 
 // Implementation of hook_help().
 function news_page_help($section) {
@@ -250,7 +251,7 @@
     $filter_query = implode(" OR ", $title_filter) . ' OR ' . implode(" OR ", $content_filter);
   }
 
-  $result = db_query_range("
+  /* $result = db_query_range("
     SELECT i.*, f.link AS flink, f.title AS ftitle
     FROM {aggregator_item} i
     LEFT JOIN {aggregator_feed} f
@@ -258,7 +259,21 @@
     LEFT JOIN {aggregator_category_feed} c
     ON c.fid = f.fid
     WHERE c.cid = '" . $node->cid . "' AND (". $filter_query . ")
-    ORDER BY timestamp DESC", 0, $node->max_items);
+    ORDER BY timestamp DESC", 0, $node->max_items); */
+
+  // **ec try to add a pager feature
+  $sql = "
+    SELECT i.*, f.link AS flink, f.title AS ftitle
+    FROM {aggregator_item} i   
+    LEFT JOIN {aggregator_feed} f
+    ON i.fid = f.fid
+    LEFT JOIN {aggregator_category_feed} c
+    ON c.fid = f.fid
+    WHERE c.cid = '" . $node->cid . "' AND (". $filter_query . ")
+    ORDER BY timestamp DESC";
+
+  //$result = db_query_range($sql, 0, $node->max_items);
+  $result = pager_query($sql,5);
 
   return $result;
 }
@@ -277,6 +292,9 @@
 	  $items .= theme('news_page_item', $item, $blog_support);
   }
 
+  // **ec add a pager feature
+  $items .= theme('pager', NULL, 5);
+
   $order_info = theme('news_page_feed', $items);
 
   // Add RSS feed link if user has correct permission
@@ -327,4 +345,4 @@
 
   return $output;
 }
-?>
\ Pas de fin de ligne à la fin du fichier.
+?>
