Commit 7c8fb5fe authored by gbyte.co's avatar gbyte.co

Changing variable name from 'cron' to 'backend'.

parent cea2d27c
......@@ -80,7 +80,7 @@ function simple_sitemap_schema() {
*/
function simple_sitemap_install() {
$sitemap = \Drupal::service('simple_sitemap.generator');
$sitemap->generate_sitemap('cron');
$sitemap->generate_sitemap('backend');
$base_url = $GLOBALS['base_url'];
drupal_set_message(t("You can now include content into the <a href='@sitemap_url' target='_blank'>XML sitemap</a> by visiting the corresponding entity type edit pages (e.g. <a href='@content_type_url' target='_blank'>content type</a>, <a href='@taxonomy_vocabulary_url' target='_blank'>taxonomy vocabulary</a>, <a href='@menu_url' target='_blank'>menu</a> and <a href='@user_url' target='_blank'>user</a> pages.)<br/>Custom links can be added on <a href='@config_url' target='_blank'>this configuration page</a>.", array('@sitemap_url' => "$base_url/sitemap.xml", '@content_type_url' => "$base_url/admin/structure/types", '@taxonomy_vocabulary_url' => "$base_url/admin/structure/taxonomy", '@menu_url' => "$base_url/admin/structure/menu", '@user_url' => "$base_url/admin/config/people/accounts", '@config_url' => "$base_url/admin/config/search/simplesitemap/custom")));
}
......@@ -121,7 +121,7 @@ function simple_sitemap_cron() {
$sitemap = \Drupal::service('simple_sitemap.generator');
if ($sitemap->get_setting('cron_generate')) {
// Regenerate sitemap for all languages.
$sitemap->generate_sitemap('cron');
$sitemap->generate_sitemap('backend');
}
}
......
......@@ -57,7 +57,7 @@ class Batch {
drush_log($this->batch['init_message'], 'status');
drush_backend_batch_process();
break;
case 'cron':
case 'backend':
$this->batch =& batch_get();
$this->batch['progressive'] = FALSE;
batch_process(); //todo: Does not take advantage of batch API and eventually runs out of memory on very large sites.
......
......@@ -44,7 +44,7 @@ class SimplesitemapTest extends WebTestBase {
*/
public function testSimplesitemap() {
$sitemap = \Drupal::service('simple_sitemap.generator');
$sitemap->generate_sitemap();
$sitemap->generate_sitemap('backend');
// Verify sitemap.xml can be cached.
$this->drupalGet('sitemap.xml');
......
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