use Controller::join_links() for listview links

This fixes incorrect adding of the locale parameter when using translatable :

http://site.com/admin/pages/edit/show?locale=nl_NL/11
This commit is contained in:
Martijn 2013-12-06 11:18:47 +01:00 committed by Ingo Schommer
parent 78b9ef2df3
commit dec2be38fa

View File

@ -766,9 +766,11 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
},
'getTreeTitle' => function($value, &$item) use($controller) {
return sprintf(
'<a class="action-detail" href="%s/%d">%s</a>',
'<a class="action-detail" href="%s">%s</a>',
Controller::join_links(
singleton('CMSPageEditController')->Link('show'),
(int)$item->ID,
(int)$item->ID
),
$item->TreeTitle // returns HTML, does its own escaping
);
}