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

Adjust variable names

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