Index: xmlsitemap_engines/xmlsitemap_engines.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.install,v
retrieving revision 1.3.2.22
diff -u -p -r1.3.2.22 xmlsitemap_engines.install
--- xmlsitemap_engines/xmlsitemap_engines.install	16 Jun 2009 14:10:43 -0000	1.3.2.22
+++ xmlsitemap_engines/xmlsitemap_engines.install	16 Jul 2009 14:30:56 -0000
@@ -16,6 +16,7 @@
  */
 function xmlsitemap_engines_install() {
   db_query("UPDATE {system} SET weight = 15 WHERE name = 'xmlsitemap_engines'");
+  variable_set('xmlsitemap_engines_cron_timestamp_submit', 0);
 }
 
 /**
@@ -81,6 +82,23 @@ function xmlsitemap_engines_update_6107(
 }
 
 /**
+ * Set last submitted timestamp variable if non existent.
+ */
+function xmlsitemap_engines_update_6108() {
+  $ret = array();
+  $submitted = variable_get('xmlsitemap_engines_cron_timestamp_submit', FALSE);
+  if (!$submitted) {
+    variable_set('xmlsitemap_engines_cron_timestamp_submit', 0);
+    $t = get_t();
+    $ret[] = array(
+      'success' => TRUE,
+      'query' => $t('Variable "xmlsitemap_engines_cron_timestamp_submit" has been created.'),
+    );
+  }
+  return $ret;
+}
+
+/**
  * Implementation of hook_uninstall().
  */
 function xmlsitemap_engines_uninstall() {
Index: xmlsitemap_engines/xmlsitemap_engines.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/xmlsitemap_engines/xmlsitemap_engines.module,v
retrieving revision 1.5.2.48
diff -u -p -r1.5.2.48 xmlsitemap_engines.module
--- xmlsitemap_engines/xmlsitemap_engines.module	19 Jun 2009 14:35:05 -0000	1.5.2.48
+++ xmlsitemap_engines/xmlsitemap_engines.module	16 Jul 2009 14:30:57 -0000
@@ -19,7 +19,7 @@
  * Implementation of hook_cron().
  */
 function xmlsitemap_engines_cron() {
-  if (!variable_get('site_offline', 0) && variable_get('xmlsitemap_engines_cron_submit_frequency', 3600) > 0 && variable_get('xmlsitemap_sitemap_is_changed', FALSE)) {
+  if (!variable_get('site_offline', 0) && (variable_get('xmlsitemap_engines_cron_submit_frequency', 3600) > 0 || variable_get('xmlsitemap_sitemap_is_changed', FALSE))) {
     if ((REQUEST_TIME - variable_get('xmlsitemap_engines_cron_timestamp_submit', REQUEST_TIME)) >= variable_get('xmlsitemap_engines_cron_submit_frequency', 3600)) {
       xmlsitemap_engines_ping_sitemap();
       variable_set('xmlsitemap_sitemap_is_changed', FALSE);
