--- forward.module	Mon Oct 15 00:06:40 2007
+++ forward.new.module	Sat Feb 16 04:32:04 2008
@@ -621,16 +621,19 @@ function forward_tracking() {
   );
 
   $result = pager_query('SELECT f.*, n.title FROM {forward_log} f LEFT JOIN {node} n ON f.nid = n.nid'. tablesort_sql($header), 30, 0, null);
-  if (db_num_rows($result)) {
-    while ($log = db_fetch_object($result)) {
-      $_path = drupal_get_path_alias('node/'. $log->nid);
-      $rows[] = array(
-        array('data' => format_date($log->timestamp, 'small'), 'nowrap' => 'nowrap'),
-        $log->type,
-        l($_path, $_path),
-        l(_forward_column_width($log->title), $_path)
-      );
-    }
+
+  $num_rows = FALSE;
+  while ($log = db_fetch_object($result)) {
+    $num_rows = TRUE;
+    $_path = drupal_get_path_alias('node/'. $log->nid);
+    $rows[] = array(
+      array('data' => format_date($log->timestamp, 'small'), 'nowrap' => 'nowrap'),
+      $log->type,
+      l($_path, $_path),
+      l(_forward_column_width($log->title), $_path)
+    );
+  }
+  if($num_rows) {
     if ($pager = theme('pager', null, 30, 0)) {
       $rows[] = array(array('data' => $pager, 'colspan' => '4'));
     }
@@ -730,4 +733,4 @@ function forward_top5_list($query, $base
 
 function _forward_column_width($column, $width = 35) {
   return (strlen($column) > $width ? substr($column, 0, $width) .'...' : $column);
-}
\ No newline at end of file
+}
