Commit 59d2997c authored by Earnie Boyd's avatar Earnie Boyd

#510076 The sitemap is not being submitted.

parent d6b77bb8
......@@ -3,6 +3,7 @@ $Id$
XML sitemap 6.x-1, 2009-07-16
-----------------------------------
#516876 Deleted items not removed from sitemap.
#510076 The sitemap is not being submitted.
XML sitemap 6.x-1, 2009-07-01
-----------------------------------
......
......@@ -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);
}
/**
......@@ -80,6 +81,23 @@ function xmlsitemap_engines_update_6107() {
return array();
}
/**
* 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().
*/
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment