'http://submissions.ask.com/ping?sitemap=[sitemap]', 'google_url' => 'http://www.google.com/webmasters/tools/ping?sitemap=[sitemap]', 'moreover_url' => 'http://api.moreover.com/ping?u=[sitemap]', 'live_url' => 'http://webmaster.live.com/ping.aspx?siteMap=[sitemap]', 'yahoo_url' => 'http://search.yahooapis.com/SiteExplorerService/V1/ping?sitemap=[sitemap]', ); foreach ($variables as $variable => $value) { variable_set('xmlsitemap_engines_'. $variable, $value); } variable_set('xmlsitemap_engines_cron_submit_frequency', 3600); $ret[] = array( 'success' => TRUE, 'query' => 'Updated the module settings successfully.', ); return $ret; } /** * Implementation of hook_update_N(). */ function xmlsitemap_engines_update_6106() { $variables = array( 'submit', 'log_access', 'cron_submit_frequency', 'cron_submit_delay', ); foreach ($variables as $variable) { $oldname = "xmlsitemap_${variable}"; $newname = "xmlsitemap_engines_{$variable}"; $value = variable_get($oldname, FALSE); if ($value !== FALSE) { variable_set($newname, $value); variable_del($oldname); $ret[] = array( 'success' => TRUE, 'query' => "Variable name changed from ${oldname} to ${newname}.", ); } } $ret[] = update_sql("UPDATE {system} SET weight = 15 WHERE name = 'xmlsitemap_engines'"); return $ret; } /** * Update variables from Live Search to Bing. */ function xmlsitemap_engines_update_6107() { $variables = array( 'submit' => FALSE, 'url' => 'http://webmaster.live.com/ping.aspx?siteMap=[sitemap]', 'verify' => '', 'verify_string' => '', ); foreach ($variables as $variable => $default) { $value = variable_get('xmlsitemap_engines_live_' . $variable, $default); if ($variable == 'url' && $value == $default) { $value = 'http://www.bing.com/webmaster/ping.aspx?siteMap=[sitemap]'; } variable_set('xmlsitemap_engines_bing_' . $variable, $value); variable_del('xmlsitemap_engines_live_' . $variable); } 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; } /** * Delete wrongly named variable xmlsitemap_engines_morover_url. */ function xmlsitemap_engines_update_6109() { $ret = array(); variable_del('xmlsitemap_engines_morover_url'); variable_set('xmlsitemap_engines_moreover_url', 'http://api.moreover.com/ping?u=[sitemap]'); return $ret; } function xmlsitemap_engines_update_6110() { $variables = array( 'ask_url' => 'http://submissions.ask.com/ping?sitemap=[sitemap]', 'google_url' => 'http://www.google.com/webmasters/tools/ping?sitemap=[sitemap]', 'moreover_url' => 'http://api.moreover.com/ping?u=[sitemap]', 'bing_url' => 'http://www.bing.com/webmaster/ping.aspx?siteMap=[sitemap]', 'yahoo_url' => 'http://search.yahooapis.com/SiteExplorerService/V1/ping?sitemap=[sitemap]', ); foreach ($variables as $variable => $value) { variable_set('xmlsitemap_engines_'. $variable, $value); } $ret[] = array( 'success' => TRUE, 'query' => 'Updated the module settings successfully.', ); return $ret; } /** * Implementation of hook_uninstall(). */ function xmlsitemap_engines_uninstall() { db_query("DELETE FROM {variable} WHERE name LIKE 'xmlsitemap\_engines\_'"); }