BUG Fixing correct URL location to pages

This commit is contained in:
Sean Harvey 2012-10-10 13:49:08 +13:00
parent 68bc12d74a
commit d4df26db72
2 changed files with 3 additions and 3 deletions

View File

@ -65,7 +65,7 @@ class RelatedPageLink extends DataObject {
// Use cmsEditlink only when moving between different pages in the same subsite. // Use cmsEditlink only when moving between different pages in the same subsite.
$classClause = ($page->SubsiteID == $otherPage->SubsiteID) ? ' class="cmsEditlink"' : ''; $classClause = ($page->SubsiteID == $otherPage->SubsiteID) ? ' class="cmsEditlink"' : '';
return '<a href="admin/show/' . $page->ID . "\"$classClause>" . Convert::raw2xml($page->Title) . '</a>'; return '<a href="admin/pages/edit/show/' . $page->ID . "\"$classClause>" . Convert::raw2xml($page->Title) . '</a>';
} }
function AbsoluteLink($master = false) { function AbsoluteLink($master = false) {

View File

@ -80,7 +80,7 @@ class SiteTreeSubsitesTest extends SapphireTest {
$this->assertEquals($importantpage->canEdit(), $link->canEdit()); $this->assertEquals($importantpage->canEdit(), $link->canEdit());
$this->assertEquals($importantpage->canDelete(), $link->canDelete()); $this->assertEquals($importantpage->canDelete(), $link->canDelete());
$link->AbsoluteLink(true); $link->AbsoluteLink(true);
$this->assertEquals($link->RelatedPageAdminLink(), '<a href="admin/show/' . $contact->ID . '" class="cmsEditlink">Contact Us</a>'); $this->assertEquals($link->RelatedPageAdminLink(), '<a href="admin/pages/edit/show/' . $contact->ID . '" class="cmsEditlink">Contact Us</a>');
} }
function testCanEditSiteTree() { function testCanEditSiteTree() {