Index: nodewords.module
=========================================================
--- nodewords.module	(revision 1.57.2.20)
+++ nodewords.module	Mon May 04 12:10:37 EDT 2009
@@ -1,5 +1,5 @@
 <?php
-/* $Id: nodewords.module,v 1.57.2.20 2009/02/09 08:29:20 robrechtj Exp $ */
+/* $Id: nodewords.module,v 1.57.2.18 2009/02/07 08:09:09 robrechtj Exp $ */
 
 /**
  * @file
@@ -21,6 +21,10 @@
       switch ($delta) {
         case 0:
           $tags = nodewords_get();
+          if (isset($tags['keywords'])) {
+            $tags['keywords'] = str_replace(',', ', ', $tags['keywords']);
+          }
+
           $block['subject'] = t('Meta tags');
           $block['content'] = theme('nodewords_content', $tags);
           break;
@@ -71,16 +75,16 @@
 }
 
 /**
- * Implementation of hook_init()
+ * Implementation of hook_preprocess_page()
  * (code executed on non-cached page)
  */
-function nodewords_init() {
+function nodewords_preprocess_page(&$variables) {
   $tags = nodewords_get();
   foreach ($tags as $name => $content) {
     if (!empty($content)) {
-      drupal_set_html_head('<meta name="'. $name .'" content="'. $content .'" />');
+      $variables['head'] .= '<meta name="'. $name .'" content="'. $content .'" />'."\n";
     }
-  }  
+  }
 }
 
 /**
@@ -163,7 +167,7 @@
     return;
   }
 
-  if (isset($form['type']) && isset($form['type']['#value']) && $form_id == $form['type']['#value'] .'_node_form') {
+  if (isset($form['type']) && $form_id == $form['type']['#value'] .'_node_form') {
     if (variable_get('nodewords_'. $form['type']['#value'], 1)) {
       $type = 'node';
       $id = $form['nid']['#value'];
@@ -684,7 +688,7 @@
     }
     unset($tags['geourl']);
   }
-  
+
   // Check 'content' of each tag.
   $tags = array_map('_nodewords_check_content', $tags);
 
