mirror of
https://github.com/silverstripe/silverstripe-translatable
synced 2024-10-22 11:05:59 +02:00
FIX 63366327
breaking "Existing Translations" links
CMSEditLink() was changed to always add a locale, but the link creation for "Existing Translations" in Translatable#updateCMSFields assumed there was no query string on the end of CMSEditLink()s return value Note that youll still end up with duplicate locale parameters after this patch, but it will work as PHP always takes the last parameter for preference. A seperate patch for Controller::join_links will fix the duplicate parameters
This commit is contained in:
parent
a0fab3b7c2
commit
3acb8b9fba
@ -1075,10 +1075,9 @@ class Translatable extends DataExtension implements PermissionProvider {
|
||||
if($existingTranslation && $existingTranslation->hasMethod('CMSEditLink')) {
|
||||
$existingTransHTML .= sprintf(
|
||||
'<li><a href="%s">%s</a></li>',
|
||||
sprintf(
|
||||
'%s/?locale=%s',
|
||||
$existingTranslation->CMSEditLink(),
|
||||
$existingTranslation->Locale
|
||||
Controller::join_links(
|
||||
$existingTranslation->CMSEditLink(),
|
||||
'?locale='.$existingTranslation->Locale
|
||||
),
|
||||
i18n::get_locale_name($existingTranslation->Locale)
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user