Fixed tabs

This commit is contained in:
Niklas Ekman 2013-08-20 21:35:39 +02:00
parent 6f38a21640
commit fa850239f4

View File

@ -1466,18 +1466,18 @@ class Translatable extends DataExtension implements PermissionProvider {
*/
function MetaTags(&$tags) {
$template = '<link rel="alternate" type="text/html" title="%s" hreflang="%s" href="%s" />' . "\n";
$translations = $this->owner->getTranslations();
$translations = $this->owner->getTranslations();
if($translations) {
$translations = $translations->toArray();
$translations[] = $this->owner;
foreach($translations as $translation) {
$tags .= sprintf($template,
Convert::raw2xml($translation->Title),
i18n::convert_rfc1766($translation->Locale),
$translation->AbsoluteLink()
);
}
$translations = $translations->toArray();
$translations[] = $this->owner;
foreach($translations as $translation) {
$tags .= sprintf($template,
Convert::raw2xml($translation->Title),
i18n::convert_rfc1766($translation->Locale),
$translation->AbsoluteLink()
);
}
}
}