Index: taxonews.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/taxonews/taxonews.module,v
retrieving revision 1.10.8.3
diff -u -r1.10.8.3 taxonews.module
--- taxonews.module	18 Aug 2007 19:36:50 -0000	1.10.8.3
+++ taxonews.module	13 Oct 2007 08:13:02 -0000
@@ -101,7 +101,8 @@
       $form[Taxonews::VAR_PONDERATED] += array
         (
         '#default_value'    => 0,
-        '#description'      => t('Sort displayed news by descending creation date. Additional sortings will be available if you enable statistics.module. It is currently disabled.'),
+        '#description'      => t('Sort displayed news by descending creation date. Additional sortings will be available if you !enable. It is currently disabled.',
+          array('!enable' => l(t('enable statistics.module'), 'admin/build/modules'))),
         );
       };
 
@@ -232,7 +233,7 @@
     $blocks = array() ;
     $prefix = variable_get(Taxonews::VAR_SHOW_NAME, TRUE) ? 'taxonews/' : '' ;
     $showEmpty = variable_get(Taxonews::VAR_SHOW_EMPTY, TRUE);
-    $sq = 'SELECT count(tn.nid) cnt '
+    $sq = 'SELECT count(tn.nid) AS cnt '
         . 'FROM {term_node} tn '
         . 'WHERE tn.tid = %d and tn.status = 1 ';
     $terms = Taxonews::getTerms();
@@ -316,7 +317,7 @@
     switch ($ponderation)
       {
       case 1: // by total views
-        $sq = 'SELECT n.nid, n.title, td.name, nc.totalcount views '
+        $sq = 'SELECT n.nid, n.title, td.name, nc.totalcount AS views '
             . 'FROM {node} n '
             . '  INNER JOIN {term_node} tn ON n.nid = tn.nid AND n.vid = tn.vid '
             . '  INNER JOIN {term_data} td ON tn.tid = td.tid '
@@ -328,7 +329,7 @@
         break;
       case 2:  // by daily views since creation. Multiply by 86400 to avoid 0-rounding
         $sq = 'SELECT n.nid, n.title, td.name '
-            . '  nc.totalcount*86400/(unix_timestamp(curdate())-n.created) views '
+            . '  nc.totalcount*86400/(unix_timestamp(curdate())-n.created) AS views '
             . 'FROM {node} n '
             . '  INNER JOIN {term_node} tn ON n.nid = tn.nid AND n.vid = tn.vid '
             . '  INNER JOIN {term_data} td ON tn.tid = td.tid '
@@ -340,7 +341,7 @@
         break;
       case 0: // not ponderated
       default: // ignore invalid values
-        $sq = 'SELECT n.nid, n.title, td.name, n.created views '
+        $sq = 'SELECT n.nid, n.title, td.name, n.created AS views '
             . 'FROM {node} n '
             . '  INNER JOIN {term_node} tn ON n.nid = tn.nid AND n.vid = tn.vid '
             . '  INNER JOIN {term_data} td ON tn.tid = td.tid '
@@ -421,7 +422,7 @@
       $vids = variable_get(Taxonews::VAR_VOCABULARY, array());
       foreach ($vids as $vid)
         {
-        $sq = 'SELECT td.tid, td.name, v.name as vocabulary_name '
+        $sq = 'SELECT td.tid, td.name, v.name AS vocabulary_name '
             . 'FROM {term_data} td '
             . 'INNER JOIN {vocabulary} v ON td.vid = v.vid '
             . 'WHERE td.vid = %s '
