Index: xmlsitemap_node/xmlsitemap_node.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.install,v
retrieving revision 1.9.2.26
diff -u -p -r1.9.2.26 xmlsitemap_node.install
--- xmlsitemap_node/xmlsitemap_node.install	19 Feb 2009 23:13:39 -0000	1.9.2.26
+++ xmlsitemap_node/xmlsitemap_node.install	21 Feb 2009 04:04:12 -0000
@@ -38,12 +38,6 @@ function xmlsitemap_node_schema() {
         'not null' => TRUE,
         'default' => 0,
       ),
-      'comment_ratio' => array(
-        'description' => 'The ratio between the node comments and the maximum number of comments added to a node.',
-        'type' => 'float',
-        'not null' => TRUE,
-        'default' => 0.0,
-      ),
       'priority_override' => array(
         'description' => 'The priority of the node in the site map.',
         'type' => 'float',
@@ -359,6 +353,17 @@ function xmlsitemap_node_update_6112() {
 }
 
 /**
+ * Remove the comment_ratio field.
+ */
+function xmlsitemap_node_update_6113() {
+  $ret = array();
+  db_drop_field($ret, 'xmlsitemap_node', 'comment_ratio');
+  variable_del('xmlsitemap_node_promote_priority');
+  variable_del('xmlsitemap_node_comment_priority');
+  return $ret;
+}
+
+/**
  * Implementation of hook_uninstall().
  */
 function xmlsitemap_node_uninstall() {
Index: xmlsitemap_node/xmlsitemap_node.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module,v
retrieving revision 1.19.2.57
diff -u -p -r1.19.2.57 xmlsitemap_node.module
--- xmlsitemap_node/xmlsitemap_node.module	20 Feb 2009 13:48:44 -0000	1.19.2.57
+++ xmlsitemap_node/xmlsitemap_node.module	21 Feb 2009 04:04:12 -0000
@@ -217,14 +217,14 @@ function xmlsitemap_node_perm() {
  */
 function xmlsitemap_node_xmlsitemap_description() {
   return '<dt>'. t('XML Sitemap: Node') .'</dt>'.
-    '<dd>'. t('<em>XML Sitemap: Node</em> adds nodes (content) to the site map. The default priority of a node is determined by a combination of its <a href="@content">content type</a> priority, whether it appears on the front page of your site, and the number of comments it has received. You can override the default priority for individual nodes when you add or edit a node.', array('@content' => url('admin/content/types'))) .'</dd>';
+    '<dd>'. t('<em>XML Sitemap: Node</em> adds nodes (content) to the site map. The default priority of a node is determined by its <a href="@content">content type</a> priority. You can override the default priority for individual nodes when you add or edit a node.', array('@content' => url('admin/content/types'))) .'</dd>';
 }
 
 /**
  * Implementation of hook_xmlsitemap_links().
  */
 function xmlsitemap_node_xmlsitemap_links() {
-  $query = "SELECT n.nid, n.vid, n.type, n.promote, xn.changed, xn.previously_changed, xn.priority_override, xn.comment_ratio
+  $query = "SELECT n.nid, n.vid, n.type, n.promote, xn.changed, xn.previously_changed, xn.priority_override
     FROM {node} n
     INNER JOIN {xmlsitemap_node} xn ON n.nid = xn.nid
     WHERE n.status > 0
@@ -243,10 +243,8 @@ function xmlsitemap_node_xmlsitemap_link
       $priority = $node->priority_override;
     }
     elseif (($priority = variable_get('xmlsitemap_node_type_priority_'. $node->type, 0.5)) != -1.0) {
-      if ($node->promote) {
-        $priority += variable_get('xmlsitemap_node_promote_priority', 0.3);
-      }
-      $priority += $node->comment_ratio * variable_get('xmlsitemap_node_comment_priority', 0.2);
+      // Allow other modules to alter the priority.
+      drupal_alter('xmlsitemap_priority', $priority, $row->type, $row->id);
     }
     $row->priority = min(round($priority, 1), 1);
     if (db_result(db_query("SELECT loc FROM {xmlsitemap} WHERE loc = '%s'", $row->loc)) != $row->loc) {
@@ -255,30 +253,6 @@ function xmlsitemap_node_xmlsitemap_link
   }
 }
 
-/**
- * Implementation of hook_xmlsitemap_sitemap_settings_alter().
- */
-function xmlsitemap_node_xmlsitemap_sitemap_settings_alter(&$form) {
-  $options = xmlsitemap_priority_options();
-  $warning = t("This setting doesn't apply for the nodes for which has been set a priority value that overrides the content type priority.");
-  $form['general']['priority']['xmlsitemap_node_promote_priority'] = array(
-    '#type' => 'select',
-    '#title' => t('Promotion adjustment'),
-    '#description' => t('This number will be added to the priority of each post that is promoted to the front page.') .' '.
-      $warning,
-    '#default_value' => variable_get('xmlsitemap_node_promote_priority', 0.3),
-    '#options' => $options,
-  );
-  $form['general']['priority']['xmlsitemap_node_comment_priority'] = array(
-    '#type' => 'select',
-    '#title' => t('Comment ratio weight'),
-    '#description' => t("This number will be added to the priority of the post with the highest number of comments; this doesn't apply if the maximum number of comments is one.") .' '.
-      $warning,
-    '#default_value' => variable_get('xmlsitemap_node_comment_priority', 0.2),
-    '#options' => $options,
-  );
-}
-
 /*****************************************************************************
  * Menu callbacks / form builders, submit/validate functions.
  ****************************************************************************/
@@ -330,9 +304,6 @@ function _xmlsitemap_node_batch_process(
     $context['sandbox']['progress'] = 0;
     $context['sandbox']['max'] = count($nodes);
     $context['sandbox']['nodes'] = $nodes;
-    if (module_exists('comment')) {
-      $context['sandbox']['maxcomments'] = (integer) db_result(db_query('SELECT MAX(comment_count) FROM {node_comment_statistics}'));
-    }
   }
   $nid = array_shift($context['sandbox']['nodes']);
   if ($node = node_load($nid)) {
