Skip to content

Commit

Permalink
Fix format add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sanctusmob authored Mar 6, 2024
1 parent 6664fc8 commit 99d632b
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions gsitemap.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public function getContent()
$this->emptySitemap();
$this->createSitemap();

/* If no posted form and the variable [continue] is found in the HTTP request variable keep creating sitemap */
/* If no posted form and the variable [continue] is found in the HTTP request variable keep creating sitemap */
} elseif (Tools::getValue('continue')) {
$this->createSitemap();
}
Expand All @@ -221,10 +221,8 @@ public function getContent()

/* Get Meta pages and remove index page it's managed elsewhere (@see $this->getHomeLink()) */
/* We also remove all pages that are blocked in core robots.txt file */
$store_metas = array_filter(
Meta::getMetasByIdLang(
(int) $this->context->cookie->id_lang
),
$store_metas = array_filter(Meta::getMetasByIdLang(
(int) $this->context->cookie->id_lang),
function ($meta) {
return $meta['page'] != 'index' && !in_array($meta['page'], $this->disallow_controllers);
}
Expand Down Expand Up @@ -592,8 +590,7 @@ protected function getManufacturerLink(&$link_sitemap, $lang, &$index, &$i, $id_
}

// Get manufacturers IDs
$manufacturers_id = Db::getInstance()->ExecuteS(
'SELECT m.`id_manufacturer` FROM `' . _DB_PREFIX_ . 'manufacturer` m
$manufacturers_id = Db::getInstance()->ExecuteS('SELECT m.`id_manufacturer` FROM `' . _DB_PREFIX_ . 'manufacturer` m
INNER JOIN `' . _DB_PREFIX_ . 'manufacturer_lang` ml on m.`id_manufacturer` = ml.`id_manufacturer`' .
' INNER JOIN `' . _DB_PREFIX_ . 'manufacturer_shop` ms ON m.`id_manufacturer` = ms.`id_manufacturer`' .
' WHERE m.`active` = 1 AND m.`id_manufacturer` >= ' . (int) $id_manufacturer .
Expand Down Expand Up @@ -637,7 +634,18 @@ protected function getManufacturerLink(&$link_sitemap, $lang, &$index, &$i, $id_

return true;
}


/**
* return the link elements for the supplier object
*
* @param array $link_sitemap contain all the links for the Google Sitemap file to be generated
* @param array $lang language of link to add
* @param int $index index of the current Google Sitemap file
* @param int $i count of elements added to sitemap main array
* @param int $id_supplier supplier object identifier
*
* @return bool
*/
protected function getSupplierLink(&$link_sitemap, $lang, &$index, &$i, $id_supplier = 0)
{
$link = new Link();
Expand Down

0 comments on commit 99d632b

Please sign in to comment.