Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
xmlsitemap
Commits
aeefdd47
Commit
aeefdd47
authored
Feb 16, 2010
by
Dave Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
by Dave Reid: Added output to the xmlsitemap-index drush command.
parent
f6577daf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
xmlsitemap.drush.inc
xmlsitemap.drush.inc
+10
-0
No files found.
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