From aeefdd47b94f241c6405fdba3dd19e8747533ff5 Mon Sep 17 00:00:00 2001 From: Dave Reid Date: Tue, 16 Feb 2010 19:59:52 +0000 Subject: [PATCH] by Dave Reid: Added output to the xmlsitemap-index drush command. --- xmlsitemap.drush.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xmlsitemap.drush.inc b/xmlsitemap.drush.inc index 7329dcc3..00036385 100644 --- a/xmlsitemap.drush.inc +++ b/xmlsitemap.drush.inc @@ -102,5 +102,15 @@ function drush_xmlsitemap_rebuild() { */ function drush_xmlsitemap_index() { $limit = (int) drush_get_option('limit', variable_get('xmlsitemap_batch_limit', 100)); + $count_before = db_query("SELECT COUNT(id) FROM {xmlsitemap}")->fetchField(); + module_invoke_all('xmlsitemap_index_links', $limit); + $count_after = db_query("SELECT COUNT(id) FROM {xmlsitemap}")->fetchField(); + + if ($count_after == $count_before) { + drush_print(dt('No new XML sitemap links to index.')); + } + else { + drush_print(dt('Indexed @count new XML sitemap links.', array('@count' => $count_after - $count_before))); + } } -- GitLab