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.129
diff -u -p -r1.19.2.129 xmlsitemap_node.module
--- xmlsitemap_node/xmlsitemap_node.module	31 Jul 2009 14:33:27 -0000	1.19.2.129
+++ xmlsitemap_node/xmlsitemap_node.module	21 Aug 2009 14:23:23 -0000
@@ -69,6 +69,7 @@ function xmlsitemap_node_cron() {
       WHERE xn.nid IS NULL
         AND n.status <> 0";
     $result = db_query_range($sql, 0, $limit);
+    $sitemap_changed = FALSE;
     while ($node = db_fetch_object($result)) {
       if (module_exists('comment')) {
         $maxcomments = (integer) db_result(db_query('SELECT MAX(comment_count) FROM {node_comment_statistics}'));
@@ -88,8 +89,9 @@ function xmlsitemap_node_cron() {
         $row->comment_ratio = $comments / $maxcomments;
       }
       drupal_write_record('xmlsitemap_node', $row);
+      $sitemap_changed = TRUE;
     }
-    if ($result) {
+    if ($sitemap_changed) {
       xmlsitemap_flag_sitemap();
     }
   }
Index: xmlsitemap_taxonomy/xmlsitemap_taxonomy.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/xmlsitemap_taxonomy/Attic/xmlsitemap_taxonomy.module,v
retrieving revision 1.1.2.19
diff -u -p -r1.1.2.19 xmlsitemap_taxonomy.module
--- xmlsitemap_taxonomy/xmlsitemap_taxonomy.module	16 Jul 2009 12:56:04 -0000	1.1.2.19
+++ xmlsitemap_taxonomy/xmlsitemap_taxonomy.module	21 Aug 2009 14:23:23 -0000
@@ -24,14 +24,16 @@ function xmlsitemap_taxonomy_cron() {
       LEFT JOIN {xmlsitemap_taxonomy} xt ON xt.tid = t.tid
       WHERE xt.tid IS NULL";
     $result = db_query_range($sql, 0, $limit);
+    $sitemap_changed = FALSE;
     while ($term = db_fetch_object($result)) {
       $row = new stdClass();
       $row->tid = $term->tid;
       $row->vid = $term->vid;
       $row->changed = REQUEST_TIME;
       drupal_write_record('xmlsitemap_taxonomy', $row);
+      $sitemap_changed = TRUE;
     }
-    if ($result) {
+    if ($sitemap_changed) {
       xmlsitemap_flag_sitemap();
     }
   }
Index: xmlsitemap_user/xmlsitemap_user.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/xmlsitemap_user/xmlsitemap_user.module,v
retrieving revision 1.12.2.106
diff -u -p -r1.12.2.106 xmlsitemap_user.module
--- xmlsitemap_user/xmlsitemap_user.module	16 Jul 2009 12:56:04 -0000	1.12.2.106
+++ xmlsitemap_user/xmlsitemap_user.module	21 Aug 2009 14:23:23 -0000
@@ -26,14 +26,16 @@ function xmlsitemap_user_cron() {
         AND u.uid <> 0
         AND u.status <> 0";
     $result = db_query_range($sql, 0, $limit);
+    $sitemap_changed = FALSE;
     while ($account = db_fetch_object($result)) {
       $row = new stdClass();
       $row->uid = $account->uid;
       $row->changed = !empty($account->access) ? $account->access : REQUEST_TIME;
       $row->previously_changed = $account->created;
       drupal_write_record('xmlsitemap_user', $row);
+      $sitemap_changed = TRUE;
     }
-    if ($result) {
+    if ($sitemap_changed) {
       xmlsitemap_flag_sitemap();
     }
   }
