FIXED: Issue where links within the CMS page list view would not be correctly generated. E.g. when the translatable module is used, page links for the "show children" action would come up as admin/pages/?locale=en_NZ?ParentID=21&view=list when they should be shows as admin/pages/?locale=en_NZ&ParentID=21&view=list. Uses Controller::join_links to perform the necessary sanity check on urls.

This commit is contained in:
Damian Mooyman 2012-08-08 17:04:17 +12:00
parent 342ecd999d
commit a6087f1d4e

View File

@ -710,9 +710,8 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
$num = $item ? $item->numChildren() : null;
if($num) {
return sprintf(
'<a class="cms-panel-link list-children-link" data-pjax-target="ListViewForm,Breadcrumbs" href="%s?ParentID=%d&view=list">%s</a>',
$controller->Link(),
$item->ID,
'<a class="cms-panel-link list-children-link" data-pjax-target="ListViewForm,Breadcrumbs" href="%s">%s</a>',
Controller::join_links($controller->Link(), "?ParentID={$item->ID}&view=list"),
$num
);
}