security update for uuid xmlsitemap file_field_path
This commit is contained in:
@@ -7,10 +7,16 @@
|
||||
* @ingroup xmlsitemap
|
||||
*/
|
||||
|
||||
/**
|
||||
* The default batch limit.
|
||||
*/
|
||||
define('XMLSITEMAP_BATCH_LIMIT', 100);
|
||||
|
||||
/**
|
||||
* Implements hook_drush_command().
|
||||
*/
|
||||
function xmlsitemap_drush_command() {
|
||||
|
||||
$items['xmlsitemap-regenerate'] = array(
|
||||
'description' => 'Regenerate the XML sitemap files.',
|
||||
'callback' => 'drush_xmlsitemap_regenerate',
|
||||
@@ -29,7 +35,7 @@ function xmlsitemap_drush_command() {
|
||||
'callback' => 'drush_xmlsitemap_index',
|
||||
'drupal dependencies' => array('xmlsitemap'),
|
||||
'options' => array(
|
||||
'limit' => 'The limit of links of each type to process. Default value: ' . variable_get('xmlsitemap_batch_limit', 100),
|
||||
'limit' => 'The limit of links of each type to process. Default value: ' . variable_get('xmlsitemap_batch_limit', XMLSITEMAP_BATCH_LIMIT),
|
||||
),
|
||||
);
|
||||
$items['xmlsitemap-queue-rebuild'] = array(
|
||||
@@ -93,7 +99,7 @@ function drush_xmlsitemap_rebuild() {
|
||||
* Process un-indexed XML sitemap links.
|
||||
*/
|
||||
function drush_xmlsitemap_index() {
|
||||
$limit = (int) drush_get_option('limit', variable_get('xmlsitemap_batch_limit', 100));
|
||||
$limit = (int) drush_get_option('limit', variable_get('xmlsitemap_batch_limit', XMLSITEMAP_BATCH_LIMIT));
|
||||
$count_before = db_query("SELECT COUNT(id) FROM {xmlsitemap}")->fetchField();
|
||||
|
||||
module_invoke_all('xmlsitemap_index_links', $limit);
|
||||
@@ -129,7 +135,7 @@ function drush_xmlsitemap_queue_rebuild() {
|
||||
|
||||
$link_count = 0;
|
||||
$chunk_count = 0;
|
||||
$chunk_size = (int) drush_get_option('limit', variable_get('xmlsitemap_batch_limit', 100));
|
||||
$chunk_size = (int) drush_get_option('limit', variable_get('xmlsitemap_batch_limit', XMLSITEMAP_BATCH_LIMIT));
|
||||
|
||||
// @todo Figure out how to re-use this code with xmlsitemap_rebuild_batch_fetch()
|
||||
foreach ($types as $type) {
|
||||
@@ -162,7 +168,11 @@ function drush_xmlsitemap_queue_rebuild() {
|
||||
}
|
||||
|
||||
if ($link_count) {
|
||||
drush_log(dt('Queued @link_count links for rebuild processing in the xmlsitemap_link_process (in @chunk_count chunks of up to @chunk_size links each).', array('@link_count' => $link_count, '@chunk_count' => $chunk_count, '@chunk_size' => $chunk_size)), 'success');
|
||||
drush_log(dt('Queued @link_count links for rebuild processing in the xmlsitemap_link_process (in @chunk_count chunks of up to @chunk_size links each).', array(
|
||||
'@link_count' => $link_count,
|
||||
'@chunk_count' => $chunk_count,
|
||||
'@chunk_size' => $chunk_size,
|
||||
)), 'success');
|
||||
}
|
||||
else {
|
||||
drush_log(dt('No links to queue for rebuild processing.'), 'ok');
|
||||
|
||||
Reference in New Issue
Block a user