Skip to content
Permalink
Browse files

Add padded 0 on day and month of Event URLs in Sitemap XML

  • Loading branch information
oliveratgithub committed Dec 29, 2019
1 parent c2b7c39 commit 0cb654db04857b6293483939aa72e046ab08e132
Showing with 1 addition and 5 deletions.
  1. +1 −5 www/controller/sitemap.controller.php
@@ -268,7 +268,7 @@ private function process_bugs($dataArray)

/**
* Events
* @link /event/2001/9/5/236
* @link /event/2001/09/05/236
*
* @version 1.0
* @since 1.0 <inex> 15.12.2019 method added
@@ -280,22 +280,18 @@ private function process_events($dataArray)
{
foreach ($dataArray as $element)
{
error_log('Year: '.$element['year'].' | month: '.$element['month'].' | day: '.$element['day']);
$url = sprintf('%s/event/%s/%s/%s/%d',
SITE_URL
,$this->string_encode($element['year'])
,$this->string_encode($element['month'])
,$this->string_encode($element['day'])
,$this->string_encode($element['id'])
);
error_log($url);
//$lastmod = date('d.m.Y', ...);
//$changefreq = ...
$urlElements[] = $this->sitemap_element($url);
}
error_log(print_r($urlElements, true));
$tplOutput = $this->cache($urlElements, __FUNCTION__); // Pass through Smarty for Caching

return $tplOutput;
}

0 comments on commit 0cb654d

Please sign in to comment.
You can’t perform that action at this time.