mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUGFIX: Fixed viewing of deleted pages. (from r89833)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@96795 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b7181a832f
commit
27f3dfc6ed
@ -79,7 +79,7 @@ class CMSSiteTreeFilter_DeletedPages extends CMSSiteTreeFilter {
|
||||
}
|
||||
|
||||
function getTree() {
|
||||
$leftAndMain = new LeftAndMain();
|
||||
$leftAndMain = new CMSMain();
|
||||
$tree = $leftAndMain->getSiteTreeFor('SiteTree', isset($_REQUEST['ID']) ? $_REQUEST['ID'] : 0, "AllHistoricalChildren");
|
||||
|
||||
// Trim off the outer tag
|
||||
|
@ -36,7 +36,7 @@ class CMSMainTest extends FunctionalTest {
|
||||
$response = Director::test("admin/cms/publishall", array('confirm' => 1), $this->session());
|
||||
|
||||
$this->assertContains(
|
||||
sprintf(_t('CMSMain.PUBPAGES',"Done: Published %d pages"), 5),
|
||||
sprintf(_t('CMSMain.PUBPAGES',"Done: Published %d pages"), 7),
|
||||
$response->getBody()
|
||||
);
|
||||
|
||||
@ -156,4 +156,11 @@ class CMSMainTest extends FunctionalTest {
|
||||
$this->assertEquals('5', $newPage->ParentID);
|
||||
|
||||
}
|
||||
|
||||
function testDeletedPagesSiteTreeFilter() {
|
||||
$id = $this->idFromFixture('Page', 'page3');
|
||||
$this->logInWithPermssion('ADMIN');
|
||||
$result = $this->get('admin/getfilteredsubtree?filter=CMSSiteTreeFilter_DeletedPages&ajax=1&ID=' . $id);
|
||||
$this->assertEquals(200, $result->getStatusCode());
|
||||
}
|
||||
}
|
||||
|
@ -4,9 +4,15 @@ Page:
|
||||
page2:
|
||||
Title: Page 2
|
||||
page3:
|
||||
Title: Page 2
|
||||
Title: Page 3
|
||||
page31:
|
||||
Title: Page 3.1
|
||||
Parent: =>Page.page3
|
||||
page32:
|
||||
Title: Page 3.2
|
||||
Parent: =>Page.page3
|
||||
page4:
|
||||
Title: Page 2
|
||||
Title: Page 4
|
||||
home:
|
||||
Title: Home
|
||||
URLSegment: home
|
||||
|
Loading…
Reference in New Issue
Block a user