mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
API CHANGE Default to /admin/pages rather than homepage edit view when CMS is first opened (#6762)
This commit is contained in:
parent
36a867f737
commit
908a98b55b
@ -13,6 +13,11 @@ Director::addRules(50, array(
|
||||
'dev/buildcache/$Action' => 'RebuildStaticCacheTask',
|
||||
));
|
||||
|
||||
// Default to "pages" view unless a URLSegment within /admin is specified
|
||||
Director::addRules(20, array(
|
||||
'admin//$action/$ID/$OtherID' => '->admin/pages'
|
||||
));
|
||||
|
||||
Director::addRules(1, array(
|
||||
'$URLSegment//$Action/$ID/$OtherID' => 'ModelAsController',
|
||||
));
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionProvider {
|
||||
|
||||
static $url_segment = '';
|
||||
static $url_segment = 'page';
|
||||
|
||||
static $url_rule = '/$Action/$ID/$OtherID';
|
||||
|
||||
|
@ -62,7 +62,7 @@ class CMSMainTest extends FunctionalTest {
|
||||
//$this->assertRegexp('/Done: Published 4 pages/', $response->getBody())
|
||||
|
||||
/*
|
||||
$response = Director::test("admin/publishitems", array(
|
||||
$response = Director::test("admin/page/publishitems", array(
|
||||
'ID' => ''
|
||||
'Title' => ''
|
||||
'action_publish' => 'Save and publish',
|
||||
@ -187,7 +187,7 @@ class CMSMainTest extends FunctionalTest {
|
||||
function testDeletedPagesSiteTreeFilter() {
|
||||
$id = $this->idFromFixture('Page', 'page3');
|
||||
$this->logInWithPermission('ADMIN');
|
||||
$result = $this->get('admin/getsubtree?filter=CMSSiteTreeFilter_DeletedPages&ajax=1&ID=' . $id);
|
||||
$result = $this->get('admin/pages/getsubtree?filter=CMSSiteTreeFilter_DeletedPages&ajax=1&ID=' . $id);
|
||||
$this->assertEquals(200, $result->getStatusCode());
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ class CMSMainSearchFormTest extends FunctionalTest {
|
||||
$this->session()->inst_set('loggedInAs', $this->idFromFixture('Member', 'admin'));
|
||||
|
||||
$response = $this->get(
|
||||
'admin/SearchForm/?' .
|
||||
'admin/page/SearchForm/?' .
|
||||
http_build_query(array(
|
||||
'Title' => 'Page 10',
|
||||
'FilterClass' => 'CMSSiteTreeFilter_Search',
|
||||
|
Loading…
Reference in New Issue
Block a user