Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
xmlsitemap
Commits
aeefdd47
Commit
aeefdd47
authored
Feb 16, 2010
by
Dave Reid
Browse files
by Dave Reid: Added output to the xmlsitemap-index drush command.
parent
f6577daf
Changes
1
Hide whitespace changes
Inline
Side-by-side
xmlsitemap.drush.inc
View file @
aeefdd47
...
...
@@ -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
)));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment