Index: taxonews/taxonews.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/taxonews/taxonews.module,v
retrieving revision 1.10.6.3
diff -u -r1.10.6.3 taxonews.module
--- taxonews/taxonews.module	17 Jun 2007 12:27:58 -0000	1.10.6.3
+++ taxonews/taxonews.module	14 Aug 2007 07:09:53 -0000
@@ -36,6 +36,7 @@
 class Taxonews
   {
   const VERSION             = '$Id: taxonews.module,v 1.10.6.3 2007/06/17 12:27:58 fgm Exp $ 2007-06-12';
+  const PATH_SETTINGS       = 'admin/settings/taxonews';
 
   /**
    * Names of persistent variables
@@ -249,6 +250,21 @@
         . 'WHERE tn.tid = %d and tn.status = 1 ';
 
     $terms = Taxonews::getTerms();
+    if (count($terms) == 0)
+      {
+      $module_path = db_result(db_query("SELECT filename FROM {system} WHERE name = 'taxonews' AND type = 'module'"));
+      $module_path = dirname($module_path);
+      drupal_set_message(
+        t('WARNING: You will not be able to configure taxonews blocks until you !configure and !define in the taxonews vocabularies. You might want to refer to !install.',
+          array(
+            '!configure' => l(t('configure taxonews'), Taxonews::PATH_SETTINGS),
+            '!define'    => l(t('define terms'), 'admin/content/taxonomy'),
+            '!install'   => l('INSTALL.txt', "$module_path/INSTALL.txt")
+            )
+          ),
+        'error');
+      unset($module_path);
+      }
     foreach ($terms as $term)
       {
       /**
@@ -422,7 +438,7 @@
          . 'FROM {term_data} td '
          . 'WHERE td.vid = %s '
          . 'ORDER BY 2, 1 ';
-      $vids = variable_get(Taxonews::VAR_VOCABULARY, 0);
+      $vids = variable_get(Taxonews::VAR_VOCABULARY, array());
       foreach ($vids as $vid)
         {
         $sq = 'SELECT td.tid, td.name, v.name as vocabulary_name '
@@ -523,7 +539,7 @@
     {
     $items[] = array
       (
-      'path'        => 'admin/settings/taxonews',
+      'path'        => Taxonews::PATH_SETTINGS,
       'title'       => t('Taxonews settings'),
       'description' => t('Configure Taxonews block generation by vocabulary.'),
       'callback'    => 'drupal_get_form',
