Index: modules/taxonews/taxonews.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/taxonews/taxonews.module,v
retrieving revision 1.10.6.1
diff -u -r1.10.6.1 taxonews.module
--- modules/taxonews/taxonews.module	12 Jun 2007 21:08:33 -0000	1.10.6.1
+++ modules/taxonews/taxonews.module	13 Jun 2007 19:17:52 -0000
@@ -26,7 +26,7 @@
  *
  * @copyright  2005-2007 Ouest Systèmes Informatiques (OSI)
  * @license    http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
- * @version    CVS: $Id: taxonews.module,v 1.10.6.1 2007/06/12 21:08:33 fgm Exp $
+ * @version    CVS: $Id:$
  * @link       http://drupal.org/project/taxonews
  * @since      Version 1.1
 */
@@ -35,7 +35,7 @@
 
 class Taxonews
   {
-  const VERSION             = '$Id: taxonews.module,v 1.10.6.1 2007/06/12 21:08:33 fgm Exp $ 2007-06-12';
+  const VERSION             = '$Id$ 2007-06-12';
 
   /**
    * Names of persistent variables
@@ -75,11 +75,13 @@
     $form[Taxonews::VAR_VOCABULARY] = array
       (
       '#type'             => 'select',
-      '#title'            => t('Vocabulary'),
-      '#default_value'    => variable_get('Taxonews::VAR_VOCABULARY', 0),
+      '#title'            => t('Vocabularies'),
+      '#default_value'    => variable_get(Taxonews::VAR_VOCABULARY, 0),
       '#options'          => $vocabularies,
-      '#description'      => t('Vocabulary to be used for the generation of blocks. A block will be defined for each term in the vocabulary'),
-      '#required'         => True,
+      '#description'      => t('Vocabularies to be used for the generation of blocks. A block will be defined for each term in each vocabulary selected here.'),
+      '#required'         => TRUE,
+      '#multiple'         => TRUE,
+      '#size'             => 5,
       );
     $form[Taxonews::VAR_LIFETIME] = array
       (
@@ -228,7 +230,7 @@
           }
         }
       $blocks[$i] = array() ;
-      $blocks[$i]['info'] = "$prefix$term->name" ;
+      $blocks[$i]['info'] = "$prefix$term->vocabulary_name/$term->name" ;
       $i++ ;
       }
 
@@ -325,7 +327,7 @@
     }
 
   /**
-   * Query for terms in selected vocabulary
+   * Query for terms in selected vocabularies
    *
    * @return array [tid, name]
    */
@@ -339,11 +341,20 @@
          . 'FROM {term_data} td '
          . 'WHERE td.vid = %s '
          . 'ORDER BY 2, 1 ';
-
-      $q = db_query($sq, variable_get(Taxonews::VAR_VOCABULARY, 0)) ;
-      while ($o = db_fetch_object($q))
+      $vids = variable_get(Taxonews::VAR_VOCABULARY, 0);
+      foreach ($vids as $vid)
         {
-        $terms[] = $o;
+        $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 '
+           . 'AND td.vid = v.vid '
+           . 'ORDER BY 2, 1 ';
+        $q = db_query($sq, $vid) ;
+        while ($o = db_fetch_object($q))
+          {
+          $terms[] = $o;
+          }
         }
       }
     return $terms ;
