Commit f55df410 authored by Dave Reid's avatar Dave Reid

by Dave Reid: Changed the options for lastmod date format to short, medium and long.

parent 528b71da
......@@ -96,10 +96,11 @@ function xmlsitemap_settings_form() {
'#type' => 'select',
'#title' => t('Last modification date format'),
'#options' => array(
'Y-m-d' => t('Short'),
DATE_W3C => t('Long'),
'Y-m-d' => t('Short'),
'Y-m-d\TH:i\Z' => t('Medium'),
'c' => t('Long'),
),
'#default_value' => DATE_W3C,
'#default_value' => 'Y-m-d\TH:i\Z',
);
foreach ($form['advanced']['xmlsitemap_lastmod_format']['#options'] as $key => &$label) {
$label .= ' (' . gmdate($key, REQUEST_TIME) . ')';
......@@ -356,7 +357,7 @@ function xmlsitemap_add_form_entity_summary(&$form, $entity, array $entity_info)
* Caller is responsible for ensuring xmlsitemap_link_bundle_settings_save()
* is called during submission.
*/
function xmlsitemap_add_link_bundle_settings(array &$form, array $form_state, $entity, $bundle) {
function xmlsitemap_add_link_bundle_settings(array &$form, array &$form_state, $entity, $bundle) {
xmlsitemap_link_bundle_settings_form($form, $form_state, $entity, $bundle, FALSE);
// Manually call drupal_alter() on the $options form since it was not called
......
......@@ -259,7 +259,7 @@ function xmlsitemap_generate_chunk_header($type, $handle, &$status, $language) {
function xmlsitemap_generate_chunk($handle, &$status, $chunk, $language) {
$last_url = '';
$url_options = xmlsitemap_get_url_options(array('alias' => TRUE));
$lastmod_format = variable_get('xmlsitemap_lastmod_format', DATE_W3C);
$lastmod_format = variable_get('xmlsitemap_lastmod_format', 'Y-m-d\TH:i\Z');
$query = db_select('xmlsitemap', 'x');
$query->fields('x', array('loc', 'lastmod', 'changefreq', 'changecount', 'priority', 'language', 'access', 'status'));
......@@ -334,7 +334,7 @@ function xmlsitemap_generate_chunk($handle, &$status, $chunk, $language) {
function xmlsitemap_generate_index($handle, &$status, $language) {
$url_options = xmlsitemap_get_url_options(array('language' => $language, 'alias' => TRUE));
$chunk_count = xmlsitemap_get_chunk_count(TRUE);
$lastmod_format = variable_get('xmlsitemap_lastmod_format', DATE_W3C);
$lastmod_format = variable_get('xmlsitemap_lastmod_format', 'Y-m-d\TH:i\Z');
// Add the XML header and XSL if desired.
xmlsitemap_generate_chunk_header('sitemapindex', $handle, $status, $language);
......
......@@ -614,10 +614,11 @@ function xmlsitemap_variables() {
'xmlsitemap_path' => 'xmlsitemap',
'xmlsitemap_base_url' => $GLOBALS['base_url'],
'xmlsitemap_developer_mode' => FALSE,
'xmlsitemap_frontpage_priority' => '1.0',
'xmlsitemap_frontpage_priority' => 1.0,
'xmlsitemap_frontpage_changefreq' => XMLSITEMAP_FREQUENCY_DAILY,
'xmlsitemap_max_chunks' => 0,
'xmlsitemap_max_filesize' => 0,
'xmlsitemap_lastmod_format' => 'Y-m-d\TH:i\Z',
// Removed variables are set to NULL so they can still be deleted.
'xmlsitemap_gz' => FALSE,
'xmlsitemap_regenerate_last' => NULL,
......
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