Skip to content

Commit

Permalink
Update LanguageSwitcher.php
Browse files Browse the repository at this point in the history
Updated LanguageSwutcher to use the LanguageRealtion class from hoff
  • Loading branch information
davidmaack authored Aug 4, 2016
1 parent 3195349 commit 65ea9bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions system/modules/backend-language-switcher/LanguageSwitcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace BackendLanguageSwitcher;

use ContaoCommunityAlliance\Contao\LanguageRelations\LanguageRelations;
use Hofff\Contao\LanguageRelations\LanguageRelations;
use PageModel;

/**
Expand Down Expand Up @@ -313,7 +313,7 @@ protected function collectArticlesFromPages($arrPages)
//store pageDetails in cache
LanguageSwitcher::$arrArticleCache[$value] = $objArticle->getModels();
//add sorting value of the root page
$objPage = \Database::getInstance()->prepare('SELECT * FROM tl_page WHERE id = (SELECT cca_rr_root FROM tl_page WHERE id = ?)')->execute($value);
$objPage = \Database::getInstance()->prepare('SELECT * FROM tl_page WHERE id = (SELECT hofff_root_page_id FROM tl_page WHERE id = ?)')->execute($value);
LanguageSwitcher::$arrArticleCache[$value]['rootIdSorting'] = $objPage->sorting;
LanguageSwitcher::$arrArticleCache[$value]['rootIdLanguage'] = $objPage->language;
}
Expand All @@ -336,4 +336,4 @@ protected function getArticlePosition($objArticle)
}
return $intArticlePosition;
}
}
}

0 comments on commit 65ea9bf

Please sign in to comment.