Commit 97c92cbd authored by gbyte.co's avatar gbyte.co

Adjust variable names

parent 4785ed69
......@@ -205,16 +205,16 @@ class Simplesitemap {
/**
* Generates and returns the sitemap index as string.
*
* @param array $chunks
* Sitemap chunks which to generate the index from.
* @param array $chunk_info
* Array containing chunk creation timestamps keyed by chunk ID.
*
* @return string
* The sitemap index.
*/
protected function getSitemapIndex($chunks) {
protected function getSitemapIndex($chunk_info) {
return $this->sitemapGenerator
->setGenerator($this)
->generateSitemapIndex($chunks);
->generateSitemapIndex($chunk_info);
}
/**
......
......@@ -216,12 +216,12 @@ class SitemapGenerator {
/**
* Generates and returns the sitemap index for all sitemap chunks.
*
* @param array $chunks
* All sitemap chunks keyed by the chunk ID.
* @param array $chunk_info
* Array containing chunk creation timestamps keyed by chunk ID.
*
* @return string sitemap index
*/
public function generateSitemapIndex(array $chunks) {
public function generateSitemapIndex(array $chunk_info) {
$writer = new XMLWriter();
$writer->openMemory();
$writer->setIndent(TRUE);
......@@ -230,7 +230,7 @@ class SitemapGenerator {
$writer->startElement('sitemapindex');
$writer->writeAttribute('xmlns', self::XMLNS);
foreach ($chunks as $chunk_id => $chunk_data) {
foreach ($chunk_info as $chunk_id => $chunk_data) {
$writer->startElement('sitemap');
$writer->writeElement('loc', $this->getCustomBaseUrl() . '/sitemaps/' . $chunk_id . '/' . 'sitemap.xml');
$writer->writeElement('lastmod', date_iso8601($chunk_data->sitemap_created));
......
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