Skip to content

Commit

Permalink
Fix for news sitemap when site is not setup for multiple languages
Browse files Browse the repository at this point in the history
For feature #901
  • Loading branch information
eSilverStrike committed Dec 2, 2018
1 parent 299623d commit d7d7eea
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions plugins/xmlsitemap/xmlsitemap.class.php
Expand Up @@ -465,7 +465,7 @@ protected function write($filename, $sitemap)
*/
public function create()
{
global $_XMLSMAP_CONF, $_CONF;
global $_XMLSMAP_CONF, $_CONF, $LANG_ISO639_1;

// Get file names
list ($filename, $mobile_filename, $news_filename) = $this->getFileNames();
Expand Down Expand Up @@ -612,7 +612,14 @@ public function create()

// Figure out language id
$multi_lang = COM_isMultiLanguageEnabled();
$site_lang_id = COM_getLanguageId();
if ($multi_lang) {
// default language for multi language site
$site_lang_id = COM_getLanguageId();
} else {
// Just one default language
$site_lang_id = $LANG_ISO639_1;
}

// See if timezone is set
$timezone = $this->getTimezoneStr();

Expand Down

0 comments on commit d7d7eea

Please sign in to comment.