API CHANGE Default to /admin/pages rather than homepage edit view when CMS is first opened (#6762)

This commit is contained in:
Ingo Schommer 2012-01-24 14:02:02 +01:00
parent 36a867f737
commit 908a98b55b
4 changed files with 9 additions and 4 deletions

View File

@ -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',
));

View File

@ -11,7 +11,7 @@
*/
class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionProvider {
static $url_segment = '';
static $url_segment = 'page';
static $url_rule = '/$Action/$ID/$OtherID';

View File

@ -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());
}

View File

@ -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',