Index: modules/hof/hof.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hof/hof.module,v
retrieving revision 1.1.2.4
diff -u -F^f -r1.1.2.4 hof.module
--- modules/hof/hof.module	29 Apr 2005 00:24:44 -0000	1.1.2.4
+++ modules/hof/hof.module	1 May 2005 14:38:41 -0000
@@ -301,12 +301,12 @@ function _hof_page_section_site() {
   $first_tstmp = db_result(db_query($sql));
   $founded = format_date($first_tstmp, "long");
   $duration = format_interval(time()-$first_tstmp, 3);
-  $sql="select count(*) from node where type in ('story','webstory') and status=1";
+  $sql="select count(*) from {node} where type in ('story','webstory') and status=1";
   $count = db_result(db_query($sql));
   $html = "<p><ul>\n";
   $html .= "<li>" . t("This site's first publication was ") . $founded . ".\n";
   $html .= "<li>" . t("We have been online for ") . $duration . ".\n";
-  $sql="select count(*) from users where status=1 and changed>created";
+  $sql="select count(*) from {users} where status=1 and changed>created";
   $count = db_result(db_query($sql));
   $html .= "<li>" . t("Active registered user accounts: ") . $count . "\n";
   // Do the interval calculations
@@ -316,7 +316,7 @@ function _hof_page_section_site() {
   $friendly_promoted_nodes = t(variable_get('hof_promoted_label','Promoted Nodes'));
   $friendly_nodes = t(variable_get('hof_node_label','nodes'));
   while (list($interval,$tstmp) = each($intervals)) {
-    $sql = "select count(*) from node where promote=1 and status=1 and created>=" . $intervals[$interval];
+    $sql = "select count(*) from {node} where promote=1 and status=1 and created>=" . $intervals[$interval];
     $count = db_result(db_query($sql));
     if ($interval == t('epoch')) {
       $items[$interval] = $friendly_promoted_nodes . ' ' .t("published since this site was founded: ") . $count;
@@ -329,7 +329,7 @@ function _hof_page_section_site() {
   }
   reset ($intervals);
   while (list($interval,$tstmp) = each($intervals)) {
-    $sql = "select count(*) from node where status=1 and created>=" . $intervals[$interval];
+    $sql = "select count(*) from {node} where status=1 and created>=" . $intervals[$interval];
     $count = db_result(db_query($sql));
     if ($interval == "epoch") {
       $items[$interval] = t("Total") . ' ' . $friendly_nodes . ' ' . t("published since this site was founded: ") . $count;
@@ -341,19 +341,19 @@ function _hof_page_section_site() {
     $html .= "<li>" . $line . "\n";
   }
   if (module_exist('weblink')) {
-    $sql="select count(*) from node where type = 'weblink' and status=1";
+    $sql="select count(*) from {node} where type = 'weblink' and status=1";
     $count = db_result(db_query($sql));
     $html .= "<li>" . t("Web links in directory: ") . $count . "\n";
   }
   if (module_exist('scheduler')) {
-    $sql="select count(*) from node n left join scheduler s on n.nid=s.nid where n.status=0 and s.nid is null";
+    $sql="select count(*) from {node} n left join {scheduler} s on n.nid=s.nid where n.status=0 and s.nid is null";
   } else {
-    $sql="select count(*) from node n where n.status=0";
+    $sql="select count(*) from {node} n where n.status=0";
   }
   $count = db_result(db_query($sql));
   $html .= "<li>" . t("Items in editorial queue, awaiting approval: ") . $count . "\n";
   if (module_exist('scheduler')) {
-    $sql="select count(*) from scheduler";
+    $sql="select count(*) from {scheduler}";
     $count = db_result(db_query($sql));
     $html .= "<li>" . t("Items approved for automatic publication in the future: ") . $count . "\n";
   }
@@ -365,7 +365,7 @@ function _hof_page_section_site() {
  * Contributor statistics (most active)
  */
 function _hof_page_section_contrib() {
-  $sql = "select count(*) contribs, name, n.uid from node n left join users u on n.uid=u.uid where n.uid>0 and n.status=1 and n.created>=%d";
+  $sql = "select count(*) contribs, name, n.uid from {node} n left join {users} u on n.uid=u.uid where n.uid>0 and n.status=1 and n.created>=%d";
   return _hof_most_active($sql);
 }
 
@@ -373,7 +373,7 @@ function _hof_page_section_contrib() {
  * Comment statistics (most active)
  */
 function _hof_page_section_comment() {
-  $sql = "select count(*) contribs, u.name, u.uid from comments c left join users u on c.uid=u.uid where u.uid is not null and c.uid>0 and c.timestamp>=%d";
+  $sql = "select count(*) contribs, u.name, u.uid from {comments} c left join {users} u on c.uid=u.uid where u.uid is not null and c.uid>0 and c.timestamp>=%d";
   return _hof_most_active($sql);
 }
 
@@ -437,7 +437,7 @@ function _hof_page_section_node() {
   reset ($intervals);
   while (list($interval,$tstmp) = each($intervals)) {
     $pops[$interval] = array();
-    $sql = "select n.nid,n.title,c.totalcount from node n left join node_counter c on n.nid=c.nid where n.status=1 and n.created>=" . $intervals[$interval] . " and c.totalcount>1 and title not like '%page not found%' order by c.totalcount desc, n.created desc limit " . $popular_limit;
+    $sql = "select n.nid,n.title,c.totalcount from {node} n left join {node_counter} c on n.nid=c.nid where n.status=1 and n.created>=" . $intervals[$interval] . " and c.totalcount>1 and title not like '%page not found%' order by c.totalcount desc, n.created desc limit " . $popular_limit;
     $result = db_query($sql);
     while ($row = db_fetch_array($result)) {
       $pops[$interval][] = $row;
